fixed a off-by-1 bug

This commit is contained in:
Heng Li 2011-10-27 13:55:48 -04:00
parent 7babb54e4c
commit 02946df28a
2 changed files with 3 additions and 3 deletions

View File

@ -290,7 +290,7 @@ int bsw2_resolve_duphits(const bntseq_t *bns, const bwt_t *bwt, bwtsw2_t *b, int
b->hits[j].k = bns_depos(bns, bwt_sa(bwt, k), &is_rev);
b->hits[j].l = 0;
b->hits[j].is_rev = is_rev;
if (is_rev) b->hits[j].k -= p->len;
if (is_rev) b->hits[j].k -= p->len - 1;
++j;
}
} else if (p->G > 0) {
@ -299,7 +299,7 @@ int bsw2_resolve_duphits(const bntseq_t *bns, const bwt_t *bwt, bwtsw2_t *b, int
b->hits[j].l = 0;
b->hits[j].flag |= 1;
b->hits[j].is_rev = is_rev;
if (is_rev) b->hits[j].k -= p->len;
if (is_rev) b->hits[j].k -= p->len - 1;
++j;
}
}

2
main.c
View File

@ -4,7 +4,7 @@
#include "utils.h"
#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION "0.6.0-r68-dev"
#define PACKAGE_VERSION "0.6.0-r69-dev"
#endif
static int usage()