r544: increased PE mapQ

This commit is contained in:
Heng Li 2017-10-31 16:55:02 -04:00
parent 311fa90030
commit b8e758df0f
2 changed files with 3 additions and 3 deletions

2
main.c
View File

@ -6,7 +6,7 @@
#include "mmpriv.h"
#include "getopt.h"
#define MM_VERSION "2.3-r543-dirty"
#define MM_VERSION "2.3-r544-dirty"
#ifdef __linux__
#include <sys/resource.h>

4
pe.c
View File

@ -159,8 +159,8 @@ void mm_pair(void *km, int max_gap_ref, int pe_bonus, int sub_diff, int match_sc
mapq_pe_alt = (int)(6.02f * ((max>>32) - (sc.a[sc.n - 2]>>32)) / match_sc - 4.343f * logf(n_sub)); // n_sub > 0 because it counts the optimal, too
mapq_pe = mapq_pe < mapq_pe_alt? mapq_pe : mapq_pe_alt;
}
if (r[0]->mapq < mapq_pe) r[0]->mapq = (r[0]->mapq + mapq_pe) / 2;
if (r[1]->mapq < mapq_pe) r[1]->mapq = (r[1]->mapq + mapq_pe) / 2;
if (r[0]->mapq < mapq_pe) r[0]->mapq = (r[0]->mapq + mapq_pe * 3) / 4;
if (r[1]->mapq < mapq_pe) r[1]->mapq = (r[1]->mapq + mapq_pe * 3) / 4;
if (sc.n == 1) {
if (r[0]->mapq < 2) r[0]->mapq = 2;
if (r[1]->mapq < 2) r[1]->mapq = 2;