From 6e3fa0515ad8a8374f33fbab432f4133011554cc Mon Sep 17 00:00:00 2001 From: Heng Li Date: Wed, 20 Nov 2013 09:50:46 -0500 Subject: [PATCH] r420: inferred bandwidth is not used in the final --- bwamem.c | 4 +++- main.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bwamem.c b/bwamem.c index c1f190f..689c74e 100644 --- a/bwamem.c +++ b/bwamem.c @@ -920,7 +920,9 @@ mem_aln_t mem_reg2aln(const mem_opt_t *opt, const bntseq_t *bns, const uint8_t * exit(1); } w2 = infer_bw(qe - qb, re - rb, ar->truesc, opt->a, opt->q, opt->r); - w2 = w2 < opt->w? w2 : opt->w; + if (bwa_verbose >= 4) fprintf(stderr, "Band width: infer=%d, opt=%d, alnreg=%d\n", w2, opt->w, ar->w); + if (w2 > opt->w) w2 = w2 < ar->w? w2 : ar->w; + else w2 = opt->w; a.cigar = bwa_gen_cigar(opt->mat, opt->q, opt->r, w2, bns->l_pac, pac, qe - qb, (uint8_t*)&query[qb], rb, re, &score, &a.n_cigar, &NM); a.NM = NM; pos = bns_depos(bns, rb < bns->l_pac? rb : re - 1, &is_rev); diff --git a/main.c b/main.c index a783924..fb90dbd 100644 --- a/main.c +++ b/main.c @@ -4,7 +4,7 @@ #include "utils.h" #ifndef PACKAGE_VERSION -#define PACKAGE_VERSION "0.7.5a-r419" +#define PACKAGE_VERSION "0.7.5a-r420" #endif int bwa_fa2pac(int argc, char *argv[]);