From bd03d975fc0ab146347f4eb06dfd49d710c5b7f1 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Mon, 7 Apr 2025 23:32:56 -0400 Subject: [PATCH] r1268: avoid extra small introns --- jump.c | 2 ++ minimap.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/jump.c b/jump.c index 5a953e4..d7a26c1 100644 --- a/jump.c +++ b/jump.c @@ -66,6 +66,7 @@ static void mm_jump_split_left(void *km, const mm_idx_t *mi, const mm_mapopt_t * assert(ai->off >= r->rs - extt && ai->off <= r->rs + ext); if (ts_strand * ai->strand < 0) continue; // wrong strand if (ai->off2 >= ai->off) continue; // wrong direction + if (ai->off - ai->off2 < 6) continue; // intron too small if (ai->off2 < clip + ext) continue; // not long enough if (tseq == 0) { tseq = Kcalloc(km, uint8_t, (clip + ext) * 2); // tseq and qseq are allocated together @@ -130,6 +131,7 @@ static void mm_jump_split_right(void *km, const mm_idx_t *mi, const mm_mapopt_t assert(ai->off >= r->re - ext && ai->off <= r->re + extt); if (ts_strand * ai->strand < 0) continue; // wrong strand if (ai->off2 <= ai->off) continue; // wrong direction + if (ai->off2 - ai->off < 6) continue; // intron too small if (ai->off2 + clip + ext > mi->seq[r->rid].len) continue; // not long enough if (tseq == 0) { tseq = Kcalloc(km, uint8_t, (clip + ext) * 2); // tseq and qseq are allocated together diff --git a/minimap.h b/minimap.h index d7140ce..cdae5ec 100644 --- a/minimap.h +++ b/minimap.h @@ -5,7 +5,7 @@ #include #include -#define MM_VERSION "2.28-r1267-dirty" +#define MM_VERSION "2.28-r1268-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