From 7a540c37cac7e1f26505cf0abed1bf48c778f36d Mon Sep 17 00:00:00 2001 From: Heng Li Date: Wed, 16 Apr 2025 21:55:59 -0400 Subject: [PATCH] r1278: reduced --min-dp-len to 20 for splice:sr 30% reduced time at 0.01% more junction errors --- align.c | 4 ++-- minimap.h | 2 +- minimap2.1 | 2 +- options.c | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/align.c b/align.c index d436007..20b9838 100644 --- a/align.c +++ b/align.c @@ -753,14 +753,14 @@ static void mm_align1(void *km, const mm_mapopt_t *opt, const mm_idx_t *mi, int re1 = rs, qe1 = qs; assert(qs1 >= 0 && rs1 >= 0); - for (i = is_sr? cnt1 - 1 : 1; i < cnt1; ++i) { // gap filling + for (i = is_sr? cnt1 - 1 : 1; i < cnt1; ++i) { // gap filling; for short genomic reads, fill from the first seed to the last if ((a[as1+i].y & (MM_SEED_IGNORE|MM_SEED_TANDEM)) && i != cnt1 - 1) continue; if (is_sr && !(mi->flag & MM_I_HPC)) { re = (int32_t)a[as1 + i].x + 1; qe = (int32_t)a[as1 + i].y + 1; } else mm_adjust_minier(mi, qseq0, &a[as1 + i], &re, &qe); re1 = re, qe1 = qe; - if (i == cnt1 - 1 || (a[as1+i].y&MM_SEED_LONG_JOIN) || (qe - qs >= opt->min_ksw_len && re - rs >= opt->min_ksw_len)) { + if (i == cnt1 - 1 || (a[as1+i].y&MM_SEED_LONG_JOIN) || (qe - qs >= opt->min_ksw_len && re - rs >= opt->min_ksw_len)) { // gap filling int j, bw1 = bw_long, zdrop_code; if (a[as1+i].y & MM_SEED_LONG_JOIN) bw1 = qe - qs > re - rs? qe - qs : re - rs; diff --git a/minimap.h b/minimap.h index 7934f4a..38a8c1d 100644 --- a/minimap.h +++ b/minimap.h @@ -5,7 +5,7 @@ #include #include -#define MM_VERSION "2.28-r1277-dirty" +#define MM_VERSION "2.28-r1278-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 diff --git a/minimap2.1 b/minimap2.1 index b852c88..d4001d8 100644 --- a/minimap2.1 +++ b/minimap2.1 @@ -708,7 +708,7 @@ Spliced alignment for accurate long RNA-seq reads such as PacBio iso-seq .B splice:sr Spliced alignment for short RNA-seq reads .RB ( -xsplice:hq -.B --frag=yes -m25 -s40 -2K100m --heap-sort=yes --pairing=weak --sr=rna +.B --frag=yes -m25 -s40 -2K100m --heap-sort=yes --pairing=weak --sr=rna --min-dp-len=20 .BR --secondary=no ). .TP .B sr diff --git a/options.c b/options.c index c9474e7..b67cd06 100644 --- a/options.c +++ b/options.c @@ -183,6 +183,7 @@ int mm_set_opt(const char *preset, mm_idxopt_t *io, mm_mapopt_t *mo) mo->noncan = 5, mo->b = 4, mo->q = 6, mo->q2 = 24; mo->min_chain_score = 25; mo->min_dp_max = 40; + mo->min_ksw_len = 20; mo->pe_ori = 0<<1|1; // FR mo->best_n = 10; mo->mini_batch_size = 100000000;