First step towards indel qualities in RR

Let the BI's and BD's pass through the reduce reads machinery
This commit is contained in:
Mauricio Carneiro 2012-06-14 15:24:35 -04:00
parent e68038c5d8
commit 7d12429917
1 changed files with 6 additions and 9 deletions

View File

@ -337,17 +337,14 @@ public class GATKSAMRecord extends BAMRecord {
*/
public GATKSAMRecord simplify () {
GATKSAMReadGroupRecord rg = getReadGroup(); // save the read group information
byte [] insertionQuals = getBaseInsertionQualities(); // save the insertion quality score
byte [] deletionQualities = getBaseDeletionQualities(); // save the deletion quality score
byte[] insQuals = (this.getAttribute(BQSR_BASE_INSERTION_QUALITIES) == null) ? null : getBaseInsertionQualities();
byte[] delQuals = (this.getAttribute(BQSR_BASE_DELETION_QUALITIES) == null) ? null : getBaseDeletionQualities();
this.clearAttributes(); // clear all attributes from the read
this.setReadGroup(rg); // restore read group
if (insertionQuals != null)
this.setBaseQualities(insertionQuals, EventType.BASE_INSERTION); // restore base insertion if we had any
if (deletionQualities != null)
this.setBaseQualities(deletionQualities, EventType.BASE_DELETION); // restore base deletion if we had any
if (insQuals != null)
this.setBaseQualities(insQuals, EventType.BASE_INSERTION); // restore base insertion if we had any
if (delQuals != null)
this.setBaseQualities(delQuals, EventType.BASE_DELETION); // restore base deletion if we had any
return this;
}