r562: fixed a severe bug: wrong query start

This commit is contained in:
Heng Li 2017-11-08 22:31:05 -05:00
parent e896c9ec05
commit a7b38f6900
2 changed files with 6 additions and 3 deletions

View File

@ -110,8 +110,11 @@ static void mm_fix_cigar(mm_reg1_t *r, const uint8_t *qseq, const uint8_t *tseq,
}
if ((p->cigar[0]&0xf) == 1 || (p->cigar[0]&0xf) == 2) { // get rid of leading I or D
int32_t l = p->cigar[0] >> 4;
if ((p->cigar[0]&0xf) == 1) r->qs += l, *qshift = l;
else r->rs += l, *tshift = l;
if ((p->cigar[0]&0xf) == 1) {
if (r->rev) r->qe -= l;
else r->qs += l;
*qshift = l;
} else r->rs += l, *tshift = l;
--p->n_cigar;
memmove(p->cigar, p->cigar + 1, p->n_cigar * 4);
}

2
main.c
View File

@ -6,7 +6,7 @@
#include "mmpriv.h"
#include "getopt.h"
#define MM_VERSION "2.4-r559-dirty"
#define MM_VERSION "2.4-r562-dirty"
#ifdef __linux__
#include <sys/resource.h>