r713: a bug in retrieving ref seq on rev

This commit is contained in:
Heng Li 2014-04-14 09:55:55 -04:00
parent f2b7d67ed9
commit 836d464239
2 changed files with 3 additions and 3 deletions

View File

@ -397,8 +397,8 @@ uint8_t *bns_fetch_seq(const bntseq_t *bns, const uint8_t *pac, int64_t *beg, in
far_end = far_beg + bns->anns[*rid].len;
if (is_rev) { // flip to the reverse strand
int64_t tmp = far_beg;
far_beg = (bns->l_pac<<1) - 1 - far_end;
far_end = (bns->l_pac<<1) - 1 - tmp;
far_beg = (bns->l_pac<<1) - far_end;
far_end = (bns->l_pac<<1) - tmp;
}
*beg = *beg > far_beg? *beg : far_beg;
*end = *end < far_end? *end : far_end;

2
main.c
View File

@ -4,7 +4,7 @@
#include "utils.h"
#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION "0.7.8-r705-dirty"
#define PACKAGE_VERSION "0.7.8-r713-dirty"
#endif
int bwa_fa2pac(int argc, char *argv[]);