dev-473: added a few assertions
to make sure the new change works as is expected
This commit is contained in:
parent
8638cfadc8
commit
f02cd42679
1
bwamem.c
1
bwamem.c
|
|
@ -1036,6 +1036,7 @@ mem_aln_t mem_reg2aln2(const mem_opt_t *opt, const bntseq_t *bns, const uint8_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
a.rid = bns_pos2rid(bns, pos);
|
a.rid = bns_pos2rid(bns, pos);
|
||||||
|
assert(a.rid == ar->rid);
|
||||||
a.pos = pos - bns->anns[a.rid].offset;
|
a.pos = pos - bns->anns[a.rid].offset;
|
||||||
a.score = ar->score; a.sub = ar->sub > ar->csub? ar->sub : ar->csub;
|
a.score = ar->score; a.sub = ar->sub > ar->csub? ar->sub : ar->csub;
|
||||||
free(query);
|
free(query);
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,7 @@ void mem_reg2ovlp(const mem_opt_t *opt, const bntseq_t *bns, const uint8_t *pac,
|
||||||
int64_t pos, rb = p->rb, re = p->re;
|
int64_t pos, rb = p->rb, re = p->re;
|
||||||
pos = bns_depos(bns, rb < bns->l_pac? rb : re - 1, &is_rev);
|
pos = bns_depos(bns, rb < bns->l_pac? rb : re - 1, &is_rev);
|
||||||
rid = bns_pos2rid(bns, pos);
|
rid = bns_pos2rid(bns, pos);
|
||||||
|
assert(rid == a->rid);
|
||||||
pos -= bns->anns[rid].offset;
|
pos -= bns->anns[rid].offset;
|
||||||
kputs(s->name, &str); kputc('\t', &str);
|
kputs(s->name, &str); kputc('\t', &str);
|
||||||
kputw(s->l_seq, &str); kputc('\t', &str);
|
kputw(s->l_seq, &str); kputc('\t', &str);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue