diff --git a/bwamem.c b/bwamem.c index 5fbe937..f373ef0 100644 --- a/bwamem.c +++ b/bwamem.c @@ -240,7 +240,13 @@ mem_aln_t mem_chain2aln(const mem_opt_t *opt, int64_t l_pac, const uint8_t *pac, a.qe = qe + qle; a.re = rmax[0] + re + tle; } else a.qe = l_query, a.re = s->rbeg + s->len; - printf("[%d] score=%d\t[%d,%d)\t[%lld,%lld)\n", c->n, a.score, a.qb, a.qe, a.rb, a.re); + a.is_all = 1; + if (c->n > 1) { // check if all the seeds have been included + s = &c->seeds[c->n - 1]; + if (s->qbeg + s->len > a.qe) a.is_all = 0; + } + + printf("[%d] score=%d\t[%d,%d) <=> [%lld,%lld)\tis_all=%d\n", c->n, a.score, a.qb, a.qe, a.rb, a.re, a.is_all); free(rseq); return a; diff --git a/bwamem.h b/bwamem.h index 7bea0ad..fae4529 100644 --- a/bwamem.h +++ b/bwamem.h @@ -30,7 +30,7 @@ typedef struct { typedef struct { int64_t pos, rb, re; - int n_cigar, len, score, qb, qe; + int n_cigar, len, score, qb, qe, is_all; uint32_t *cigar; } mem_aln_t;