bugfix: wrong mate-sw qry coor for rev

This commit is contained in:
Heng Li 2013-02-22 11:02:14 -05:00
parent 81fe6f8e38
commit d5820177c6
1 changed files with 2 additions and 1 deletions

View File

@ -136,7 +136,8 @@ int mem_matesw(const mem_opt_t *opt, int64_t l_pac, const uint8_t *pac, const me
aln = ksw_align(l_ms, seq, len, ref, 5, opt->mat, opt->q, opt->r, xtra, 0);
memset(&b, 0, sizeof(mem_alnreg_t));
if (aln.score >= opt->min_seed_len) {
b.qb = aln.qb; b.qe = aln.qe + 1;
b.qb = is_rev? l_ms - (aln.qe + 1) : aln.qb;
b.qe = is_rev? l_ms - aln.qb : aln.qe + 1;
b.rb = is_rev? (l_pac<<1) - (rb + aln.te + 1) : rb + aln.tb;
b.re = is_rev? (l_pac<<1) - (rb + aln.tb) : rb + aln.te + 1;
b.score = aln.score;