Skip to content

Commit 54a4718

Browse files
committed
r1259: --jump-bed now functional
1 parent dbc12b2 commit 54a4718

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

jump.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static void mm_jump_split_left(void *km, const mm_idx_t *mi, const mm_mapopt_t *
6363
for (i = 0; i < n; ++i) { // traverse possible jumps
6464
const mm_idx_jjump1_t *ai = &a[i];
6565
int32_t tlen, tl1, j, mm1, mm2;
66-
assert(ai->off >= r->rs - extt && ai->off < r->rs + ext);
66+
assert(ai->off >= r->rs - extt && ai->off <= r->rs + ext);
6767
if (ts_strand * ai->strand < 0) continue; // wrong strand
6868
if (ai->off2 >= ai->off) continue; // wrong direction
6969
if (ai->off2 < clip + ext) continue; // not long enough
@@ -125,7 +125,7 @@ static void mm_jump_split_right(void *km, const mm_idx_t *mi, const mm_mapopt_t
125125
for (i = 0; i < n; ++i) { // traverse possible jumps
126126
const mm_idx_jjump1_t *ai = &a[i];
127127
int32_t tlen, tl1, j, mm1, mm2;
128-
assert(ai->off >= r->re - ext && ai->off < r->re + extt);
128+
assert(ai->off >= r->re - ext && ai->off <= r->re + extt);
129129
if (ts_strand * ai->strand < 0) continue; // wrong strand
130130
if (ai->off2 <= ai->off) continue; // wrong direction
131131
if (ai->off2 + clip + ext > mi->seq[r->rid].len) continue; // not long enough
@@ -155,7 +155,6 @@ static void mm_jump_split_right(void *km, const mm_idx_t *mi, const mm_mapopt_t
155155
l = m > 0? r->re - a[i0].off : 0; // may be negative
156156
if (m == 1 && clip + l >= opt->jump_min_alen) { // add one more exon
157157
mm_enlarge_cigar(r, 2);
158-
memmove(r->p->cigar + 2, r->p->cigar, r->p->n_cigar * 4);
159158
r->p->cigar[r->p->n_cigar - 1] = ((r->p->cigar[r->p->n_cigar - 1]>>4) - l) << 4 | MM_CIGAR_MATCH;
160159
r->p->cigar[r->p->n_cigar] = (a[i0].off2 - a[i0].off) << 4 | MM_CIGAR_N_SKIP;
161160
r->p->cigar[r->p->n_cigar + 1] = (clip + l) << 4 | MM_CIGAR_MATCH;

minimap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <stdio.h>
66
#include <sys/types.h>
77

8-
#define MM_VERSION "2.28-r1258-dirty"
8+
#define MM_VERSION "2.28-r1259-dirty"
99

1010
#define MM_F_NO_DIAG (0x001LL) // no exact diagonal hit
1111
#define MM_F_NO_DUAL (0x002LL) // skip pairs where query name is lexicographically larger than target name

0 commit comments

Comments
 (0)