mirror of
https://github.com/lh3/minimap2.git
synced 2026-10-03 01:18:12 +08:00
r546: minor mapQ tuning
This commit is contained in:
@@ -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 * 3) / 4;
|
||||
if (r[1]->mapq < mapq_pe) r[1]->mapq = (r[1]->mapq + mapq_pe * 3) / 4;
|
||||
if (r[0]->mapq < mapq_pe) r[0]->mapq = (int)(.2f * r[0]->mapq + .8f * mapq_pe + .499f);
|
||||
if (r[1]->mapq < mapq_pe) r[1]->mapq = (int)(.2f * r[1]->mapq + .8f * mapq_pe + .499f);
|
||||
if (sc.n == 1) {
|
||||
if (r[0]->mapq < 2) r[0]->mapq = 2;
|
||||
if (r[1]->mapq < 2) r[1]->mapq = 2;
|
||||
|
||||
Reference in New Issue
Block a user