-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed bug where SamPairUtil.setMateInfo() would omit the MQ tag if on… #647
Conversation
@ktibbett Want to take a quick look at this? This will effect |
@@ -246,12 +246,14 @@ else if (rec1.getReadUnmappedFlag() && rec2.getReadUnmappedFlag()) { | |||
mapped.setMateUnmappedFlag(true); | |||
// For the mapped read, set it's mateCigar to null, since the other read must be unmapped | |||
mapped.setAttribute(SAMTag.MC.name(), null); | |||
mapped.setAttribute(SAMTag.MQ.name(), null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to before setting the MC
since that's the order elsewhere: it makes it easier to find.
mapped.setInferredInsertSize(0); | ||
|
||
unmapped.setMateReferenceIndex(mapped.getReferenceIndex()); | ||
unmapped.setMateAlignmentStart(mapped.getAlignmentStart()); | ||
unmapped.setMateNegativeStrandFlag(mapped.getReadNegativeStrandFlag()); | ||
unmapped.setMateUnmappedFlag(false); | ||
unmapped.setAttribute(SAMTag.MQ.name(), mapped.getMappingQuality()); | ||
// For the unmapped read, set it's mateCigar to the mate's Cigar, since the mate must be mapped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it was like that before...can you remove the '
from "it's"
👍 though I protest that this class lacks tests...we should at least open a ticket to record this fact... |
…e read was mapped and the other unmapped.
3ec1736
to
4b22d5d
Compare
Updates applied. @yfarjoun If we logged issues for everything that needed testing... we'd have a lot of issues 😞 . |
👍 |
Description
Fix a small but annoying bug that was causing unmapped reads with mapped mates to get most mate information set except
MQ
which is set in all other cases.Checklist
…e read was mapped and the other unmapped.