Consider "low" mapping quality reads to be unaligned for the purpose of Marking Duplicates. #1460
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.
Fixes #128 and #1285 (which are similar issues and about a factor of 10 difference in issue number...)
The main thrust here is to consider "low mapping quality" as an indication of the read being effectively unmapped, as its location is not well determined and thus two identical fragments where each have one read with low (=0, e.g) mapping quality should be considered to be duplicates, or not, based on the well-mapped reads, and not the semi-random low-mapping quality read.
Since this uses the same mechanism of unmapped reads, it will also not mark the low-mapping quality read as duplicate when its mate is marked so. Unless the file is queryname sorted, in which case the unmapped and the low-mapping quality reads are marked like their well-aligned mate.
Description
Give your PR a concise yet descriptive title
Please explain the changes you made here.
Explain the motivation for making this change. What existing problem does the pull request solve?
Mention any issues fixed, addressed or otherwise related to this pull request, including issue numbers or hard links for issues in other repos.
You can delete these instructions once you have written your PR description.
Checklist (never delete this)
Never delete this, it is our record that procedure was followed. If you find that for whatever reason one of the checklist points doesn't apply to your PR, you can leave it unchecked but please add an explanation below.
Content
Review
For more detailed guidelines, see https://github.com/broadinstitute/picard/wiki/Guidelines-for-pull-requests