From c19e3ccb86b7f86e6673db4ba3466ee6c03cc605 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Mon, 14 Apr 2025 22:26:47 -0400 Subject: [PATCH] r1277: don't apply rescored filtering with -P Since v2.19-ish, minimap2 rescores base alignment based on the best alignment of a read. This heuristic sometimes improve the mapping accuracy of the best alignment but may too aggressively filter weaker hits. Resolve #969 --- align.c | 2 +- minimap.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/align.c b/align.c index 832369b..d436007 100644 --- a/align.c +++ b/align.c @@ -1059,7 +1059,7 @@ mm_reg1_t *mm_align_skeleton(void *km, const mm_mapopt_t *opt, const mm_idx_t *m kfree(km, qseq0[0]); kfree(km, ez.cigar); mm_filter_regs(opt, qlen, n_regs_, regs); - if (!(opt->flag&MM_F_SR) && !opt->split_prefix && qlen >= opt->rank_min_len) { + if (!(opt->flag&(MM_F_SR|MM_F_SR_RNA|MM_F_ALL_CHAINS)) && !opt->split_prefix && qlen >= opt->rank_min_len) { mm_update_dp_max(qlen, *n_regs_, regs, opt->rank_frac, opt->a, opt->b); mm_filter_regs(opt, qlen, n_regs_, regs); } diff --git a/minimap.h b/minimap.h index 68406b1..7934f4a 100644 --- a/minimap.h +++ b/minimap.h @@ -5,7 +5,7 @@ #include #include -#define MM_VERSION "2.28-r1276-dirty" +#define MM_VERSION "2.28-r1277-dirty" #define MM_F_NO_DIAG (0x001LL) // no exact diagonal hit #define MM_F_NO_DUAL (0x002LL) // skip pairs where query name is lexicographically larger than target name