From 7144a0cefce0da81fea16b2e64a3ca285b78731e Mon Sep 17 00:00:00 2001 From: Heng Li Date: Mon, 9 Sep 2013 17:51:05 -0400 Subject: [PATCH] r415: bug in the new (optional) mapQ computation I may use the new method as the default. Testing needed. --- bwamem.c | 2 +- main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bwamem.c b/bwamem.c index 6cc4639..293dd55 100644 --- a/bwamem.c +++ b/bwamem.c @@ -807,7 +807,7 @@ int mem_approx_mapq_se(const mem_opt_t *opt, const mem_alnreg_t *a) } else if (opt->mapQ_coef_len > 0) { double tmp; tmp = l < opt->mapQ_coef_len? 1. : opt->mapQ_coef_fac / log(l); - tmp *= a->seedcov < l? (double)a->seedcov / identity : 1; + tmp *= identity * identity; mapq = (int)(6.02 * (a->score - sub) / opt->a * tmp * tmp + .499); } else { mapq = (int)(MEM_MAPQ_COEF * (1. - (double)sub / a->score) * log(a->seedcov) + .499); diff --git a/main.c b/main.c index d1e3895..998719f 100644 --- a/main.c +++ b/main.c @@ -3,7 +3,7 @@ #include "utils.h" #ifndef PACKAGE_VERSION -#define PACKAGE_VERSION "0.7.5a-r414" +#define PACKAGE_VERSION "0.7.5a-r415" #endif int bwa_fa2pac(int argc, char *argv[]);