diff --git a/align.c b/align.c index b22a3f2..cd28d6a 100644 --- a/align.c +++ b/align.c @@ -563,11 +563,12 @@ static void mm_align1(void *km, const mm_mapopt_t *opt, const mm_idx_t *mi, int re = (int32_t)a[as1+cnt1-1].x + 1; qe = (int32_t)a[as1+cnt1-1].y + 1; } else { - if (is_splice) { - mm_fix_bad_ends_splice(km, opt, mi, r, mat, qlen, qseq0, a, &as1, &cnt1); - } else { - mm_fix_bad_ends(r, a, opt->bw, opt->min_chain_score * 2, &as1, &cnt1); - } + if (!(opt->flag & MM_F_NO_END_FLT)) { + if (is_splice) + mm_fix_bad_ends_splice(km, opt, mi, r, mat, qlen, qseq0, a, &as1, &cnt1); + else + mm_fix_bad_ends(r, a, opt->bw, opt->min_chain_score * 2, &as1, &cnt1); + } else as1 = r->as, cnt1 = r->cnt; mm_filter_bad_seeds(km, as1, cnt1, a, 10, 40, opt->max_gap>>1, 10); mm_filter_bad_seeds_alt(km, as1, cnt1, a, 30, opt->max_gap>>1); mm_adjust_minier(mi, qseq0, &a[as1], &rs, &qs); diff --git a/main.c b/main.c index 87540ea..079155c 100644 --- a/main.c +++ b/main.c @@ -10,7 +10,7 @@ #include "getopt.h" #endif -#define MM_VERSION "2.11-r821-dirty" +#define MM_VERSION "2.11-r822-dirty" #ifdef __linux__ #include @@ -62,6 +62,7 @@ static struct option long_options[] = { { "eqx", no_argument, 0, 0 }, // 32 { "paf-no-hit", no_argument, 0, 0 }, // 33 { "split-prefix", required_argument, 0, 0 }, // 34 + { "no-end-flt", no_argument, 0, 0 }, // 35 { "help", no_argument, 0, 'h' }, { "max-intron-len", required_argument, 0, 'G' }, { "version", no_argument, 0, 'V' }, @@ -183,6 +184,7 @@ int main(int argc, char *argv[]) else if (c == 0 && long_idx ==32) opt.flag |= MM_F_EQX; // --eqx else if (c == 0 && long_idx ==33) opt.flag |= MM_F_PAF_NO_HIT; // --paf-no-hit else if (c == 0 && long_idx ==34) opt.split_prefix = optarg; // --split-prefix + else if (c == 0 && long_idx ==35) opt.flag |= MM_F_NO_END_FLT; // --no-end-flt else if (c == 0 && long_idx == 14) { // --frag yes_or_no(&opt, MM_F_FRAG_MODE, long_idx, optarg, 1); } else if (c == 0 && long_idx == 15) { // --secondary diff --git a/minimap.h b/minimap.h index 40a5d25..27ba911 100644 --- a/minimap.h +++ b/minimap.h @@ -33,6 +33,7 @@ #define MM_F_COPY_COMMENT 0x2000000 #define MM_F_EQX 0x4000000 // use =/X instead of M #define MM_F_PAF_NO_HIT 0x8000000 // output unmapped reads to PAF +#define MM_F_NO_END_FLT 0x10000000 #define MM_I_HPC 0x1 #define MM_I_NO_SEQ 0x2 diff --git a/minimap2.1 b/minimap2.1 index ced6c8c..bd67591 100644 --- a/minimap2.1 +++ b/minimap2.1 @@ -360,6 +360,10 @@ the length of the terminal gap in the chain. This option is only effective with .BR --splice . It helps to avoid tiny terminal exons. [6] +.TP +.B --no-end-flt +Don't filter seeds towards the ends of chains before performing base-level +alignment. .SS Input/output options .TP 10 .B -a