Adding a synthetic read for filtered data

* Generalized the concept of a synthetic read to cread both running consensus and a synthetic reads of filtered data.
* Synthetic reads can now have deletions (but not insertions)
* New reduced read tag for filtered data synthetic reads *(RF)*
* Sliding window header now keeps information of consensus and filtered data
* Synthetic reads are created simultaneously, new functionality is controlled internally by addToSyntheticReads
This commit is contained in:
Mauricio Carneiro 2011-11-09 20:09:12 -05:00
parent 3afbd0e526
commit d00b2c6599
2 changed files with 5 additions and 3 deletions

View File

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

View File

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