Fixed bug where SamPairUtil.setMateInfo() would omit the MQ tag if on… #647

Merged
merged 1 commit into from Jun 28, 2016
Jump to file or symbol
Failed to load files and symbols.
+3 −2
Split
@@ -244,15 +244,16 @@ else if (rec1.getReadUnmappedFlag() && rec2.getReadUnmappedFlag()) {
mapped.setMateAlignmentStart(unmapped.getAlignmentStart());
mapped.setMateNegativeStrandFlag(unmapped.getReadNegativeStrandFlag());
mapped.setMateUnmappedFlag(true);
- // For the mapped read, set it's mateCigar to null, since the other read must be unmapped
+ mapped.setAttribute(SAMTag.MQ.name(), null);
mapped.setAttribute(SAMTag.MC.name(), null);
mapped.setInferredInsertSize(0);
unmapped.setMateReferenceIndex(mapped.getReferenceIndex());
unmapped.setMateAlignmentStart(mapped.getAlignmentStart());
unmapped.setMateNegativeStrandFlag(mapped.getReadNegativeStrandFlag());
unmapped.setMateUnmappedFlag(false);
- // For the unmapped read, set it's mateCigar to the mate's Cigar, since the mate must be mapped
+ unmapped.setAttribute(SAMTag.MQ.name(), mapped.getMappingQuality());
+ // For the unmapped read, set mateCigar to the mate's Cigar, since the mate must be mapped
if (setMateCigar) unmapped.setAttribute(SAMTag.MC.name(), mapped.getCigarString());
else unmapped.setAttribute(SAMTag.MC.name(), null);
unmapped.setInferredInsertSize(0);