From cf55c8405629922267f8d1957a464f7427bd419e Mon Sep 17 00:00:00 2001 From: Heng Li Date: Wed, 4 Oct 2017 12:08:44 -0400 Subject: [PATCH] r460: added option --no-long-join --- main.c | 4 +++- map.c | 2 +- minimap.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 88194ff..cf43b51 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ #include "mmpriv.h" #include "getopt.h" -#define MM_VERSION "2.2-r459-dirty" +#define MM_VERSION "2.2-r460-dirty" #ifdef __linux__ #include @@ -38,6 +38,7 @@ static struct option long_options[] = { { "no-sam-sq", no_argument, 0, 0 }, { "sr", no_argument, 0, 0 }, { "multi-seg", optional_argument, 0, 0 }, + { "no-long-join", no_argument, 0, 0 }, { "help", no_argument, 0, 'h' }, { "max-intron-len", required_argument, 0, 'G' }, { "version", no_argument, 0, 'V' }, @@ -116,6 +117,7 @@ int main(int argc, char *argv[]) else if (c == 0 && long_idx ==11) opt.noncan = atoi(optarg); // --cost-non-gt-ag else if (c == 0 && long_idx ==12) opt.flag |= MM_F_NO_SAM_SQ; // --no-sam-sq else if (c == 0 && long_idx ==13) opt.flag |= MM_F_SR; // --sr + else if (c == 0 && long_idx ==15) opt.flag |= MM_F_NO_LJOIN; // --no-long-join else if (c == 0 && long_idx ==14) { // --multi-seg if (optarg == 0 || strcmp(optarg, "yes") == 0 || strcmp(optarg, "y") == 0) opt.flag |= MM_F_MULTI_SEG; diff --git a/map.c b/map.c index 6c747bd..5492e8c 100644 --- a/map.c +++ b/map.c @@ -242,7 +242,7 @@ static void chain_post(const mm_mapopt_t *opt, const mm_idx_t *mi, void *km, int mm_set_parent(km, opt->mask_level, *n_regs, regs, opt->a * 2 + opt->b); if (n_segs <= 1) mm_select_sub(km, opt->pri_ratio, mi->k*2, opt->best_n, n_regs, regs); else mm_select_sub_multi(km, opt->pri_ratio, 0.2f, 0.7f, opt->max_gap_ref, mi->k*2, opt->best_n, n_segs, qlens, n_regs, regs); - if (!(opt->flag & MM_F_SPLICE) && !(opt->flag & MM_F_SR)) + if (!(opt->flag & MM_F_SPLICE) && !(opt->flag & MM_F_SR) && !(opt->flag & MM_F_NO_LJOIN)) mm_join_long(km, opt, qlen, n_regs, regs, a); // TODO: this can be applied to all-vs-all in principle } } diff --git a/minimap.h b/minimap.h index 55ab281..349c8e9 100644 --- a/minimap.h +++ b/minimap.h @@ -15,6 +15,7 @@ #define MM_F_SPLICE 0x080 // splice mode #define MM_F_SPLICE_FOR 0x100 // match GT-AG #define MM_F_SPLICE_REV 0x200 // match CT-AC, the reverse complement of GT-AG +#define MM_F_NO_LJOIN 0x400 #define MM_F_NO_SAM_SQ 0x800 #define MM_F_SR 0x1000 #define MM_F_MULTI_SEG 0x2000