r117: fixed a bug in logic

This commit is contained in:
Heng Li 2017-06-30 11:52:42 -04:00
parent 91e1c4d6db
commit 5dcd8f8965
2 changed files with 4 additions and 3 deletions

View File

@ -146,7 +146,7 @@ static void mm_align1(void *km, const mm_mapopt_t *opt, const mm_idx_t *mi, int
{
int32_t rid = a[r->as].x<<1>>33, rev = a[r->as].x>>63;
uint8_t *tseq, *qseq;
int32_t i, l, bw, rs0, re0, qs0, qe0;
int32_t i, l, bw, dropped = 0, rs0, re0, qs0, qe0;
int32_t rs, re, qs, qe;
int32_t rs1, qs1, re1, qe1;
int8_t mat[25];
@ -229,6 +229,7 @@ static void mm_align1(void *km, const mm_mapopt_t *opt, const mm_idx_t *mi, int
for (j = i - 1; j >= 0; --j)
if ((int32_t)a[r->as + j].x < re + ez->max_t)
break;
dropped = 1;
r->p->score += ez->max;
re1 = rs + (ez->max_t + 1);
qe1 = qs + (ez->max_q + 1);
@ -245,7 +246,7 @@ static void mm_align1(void *km, const mm_mapopt_t *opt, const mm_idx_t *mi, int
}
}
if (!r->split && qe < qe0 && re < re0) { // right extension
if (!dropped && qe < qe0 && re < re0) { // right extension
qseq = &qseq0[rev][qe];
mm_idx_getseq(mi, rid, re, re0, tseq);
ksw_extz2_sse(km, qe0 - qe, qseq, re0 - re, tseq, 5, mat, opt->q, opt->e, bw, opt->zdrop, KSW_EZ_EXTZ_ONLY, ez);

2
main.c
View File

@ -10,7 +10,7 @@
#include "minimap.h"
#include "mmpriv.h"
#define MM_VERSION "2.0-r116-pre"
#define MM_VERSION "2.0-r117-pre"
void liftrlimit()
{