Moving ReduceRead TAG to GATKSAMRecord

ReduceReads are now a feature of a GATKSAMRecord, so the tag and the special methods needed to use it will now be housed by the GATKSAMRecord.
This commit is contained in:
Mauricio Carneiro 2011-11-01 17:11:47 -04:00
parent 2b200c34a6
commit b004489c6d
3 changed files with 3 additions and 4 deletions

View File

@ -43,6 +43,7 @@ import java.util.Map;
* *
*/ */
public class GATKSAMRecord extends BAMRecord { public class GATKSAMRecord extends BAMRecord {
public static final String REDUCED_READ_QUALITY_TAG = "RR";
// the SAMRecord data we're caching // the SAMRecord data we're caching
private String mReadString = null; private String mReadString = null;
private GATKSAMReadGroupRecord mReadGroup = null; private GATKSAMReadGroupRecord mReadGroup = null;
@ -151,7 +152,7 @@ public class GATKSAMRecord extends BAMRecord {
public byte[] getReducedReadCounts() { public byte[] getReducedReadCounts() {
if ( ! retrievedReduceReadCounts ) { if ( ! retrievedReduceReadCounts ) {
reducedReadCounts = getByteArrayAttribute(ReadUtils.REDUCED_READ_QUALITY_TAG); reducedReadCounts = getByteArrayAttribute(REDUCED_READ_QUALITY_TAG);
retrievedReduceReadCounts = true; retrievedReduceReadCounts = true;
} }

View File

@ -51,8 +51,6 @@ public class ReadUtils {
// //
// ---------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------------
public static final String REDUCED_READ_QUALITY_TAG = "RQ";
// ---------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------------
// //
// General utilities // General utilities

View File

@ -29,7 +29,7 @@ public class ReadUtilsUnitTest extends BaseTest {
reducedRead = ArtificialSAMUtils.createArtificialRead(header, "reducedRead", 0, 1, BASES.length()); reducedRead = ArtificialSAMUtils.createArtificialRead(header, "reducedRead", 0, 1, BASES.length());
reducedRead.setReadBases(BASES.getBytes()); reducedRead.setReadBases(BASES.getBytes());
reducedRead.setBaseQualityString(QUALS); reducedRead.setBaseQualityString(QUALS);
reducedRead.setAttribute(ReadUtils.REDUCED_READ_QUALITY_TAG, REDUCED_READ_COUNTS); reducedRead.setAttribute(GATKSAMRecord.REDUCED_READ_QUALITY_TAG, REDUCED_READ_COUNTS);
} }
private void testReadBasesAndQuals(SAMRecord read, int expectedStart, int expectedStop) { private void testReadBasesAndQuals(SAMRecord read, int expectedStart, int expectedStop) {