Compute single-end MAPQ score better by considering at least two mappings. #600
Open
ksahlin wants to merge 1 commit into
Open
Compute single-end MAPQ score better by considering at least two mappings. #600ksahlin wants to merge 1 commit into
ksahlin wants to merge 1 commit into
Conversation
…nts most (but not all) of the false MAPQ=60 assignments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We knew for a long time that our MAPQ assignments have not always been the most representative. We should consider whether we want to make such an effort (see also the PE mapq fix in PR #596).
This commit prevents most (but not all) of the false MAPQ=60 assignments. In some cases, we also get a couple of more correct alignments (although very few).
It does slow down the mapping a tad, I did some preliminary benchmark below based on some datasets I had generated for other analyses (diagnosing the sweep PR). The outlier of -18% in runtime is just an anomaly because I benchmarked on my laptop. Overall, it seems we fix 40–98% of false MAPQ=60 assignments, at a cost of <2% increease in runtime.
However, I also looked at 10,000 bp reads, and the runtime increased by 6%, while we corrected nearly none of the (much fewer) false mapq=60 assignments. So this is an example where we may not want to do the same for long reads, as discussed here: #599
Corrected MAPQ
Runtime