From d59d78838cbf918f462dfc06d58064b7a828b287 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Wed, 30 Apr 2014 14:55:44 -0400 Subject: [PATCH] r737: fixed an assertion when failed to convert sa A bug pointed out by Mikkle Schubert --- bwape.c | 1 + main.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bwape.c b/bwape.c index 82fc50b..a5dc3ad 100644 --- a/bwape.c +++ b/bwape.c @@ -297,6 +297,7 @@ int bwa_cal_pac_pos_pe(const bntseq_t *bns, const char *prefix, bwt_t *const _bw p[j]->seQ = p[j]->mapQ = bwa_approx_mapQ(p[j], max_diff); p[j]->pos = bwa_sa2pos(bns, bwt, p[j]->sa, p[j]->len + p[j]->ref_shift, &strand); p[j]->strand = strand; + if (p[j]->pos == (bwtint_t)-1) p[j]->type = BWA_TYPE_NO_MATCH; } } } diff --git a/main.c b/main.c index 7394f5f..bcbcb22 100644 --- a/main.c +++ b/main.c @@ -4,7 +4,7 @@ #include "utils.h" #ifndef PACKAGE_VERSION -#define PACKAGE_VERSION "0.7.8-r736-dirty" +#define PACKAGE_VERSION "0.7.8-r737-dirty" #endif int bwa_fa2pac(int argc, char *argv[]);