mirror of
https://github.com/lh3/minimap2.git
synced 2026-09-15 13:07:55 +08:00
r1190: output unadjusted dp_max to ms:i
This was an oversight affecting v2.22+. The latest minimap2 ranks hits and estimates mapping quality with an adjusted alignment score (see the minimap2 update paper). This score however is not calculated when there is only one hit. As a result, the ms:i tag varies depends on other sequences in the reference genome, which is confusing. This change lets minimap2 to output the unadjusted score at ms:i. At present, the adjusted score is not outputted. Resolves #1146
This commit is contained in:
2
align.c
2
align.c
@@ -295,7 +295,7 @@ static void mm_update_extra(mm_reg1_t *r, const uint8_t *qseq, const uint8_t *ts
|
||||
toff += len;
|
||||
}
|
||||
}
|
||||
p->dp_max = (int32_t)(max + .499);
|
||||
p->dp_max = p->dp_max0 = (int32_t)(max + .499);
|
||||
assert(qoff == r->qe - r->qs && toff == r->re - r->rs);
|
||||
if (is_eqx) mm_update_cigar_eqx(r, qseq, tseq); // NB: it has to be called here as changes to qseq and tseq are not returned
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user