r415: bug in the new (optional) mapQ computation
I may use the new method as the default. Testing needed.
This commit is contained in:
parent
ebb7b02e9b
commit
7144a0cefc
2
bwamem.c
2
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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue