use of com.google.api.services.genomics.model.Position in project gatk by broadinstitute.
the class GATKReadAdaptersUnitTest method mateIsUnmappedData.
@DataProvider(name = "MateIsUnmappedData")
public Object[][] mateIsUnmappedData() {
SAMRecord samWithUnmappedMate = basicSAMRecord();
samWithUnmappedMate.setMateUnmappedFlag(true);
SAMRecord samWithUnmappedMate2 = basicSAMRecord();
samWithUnmappedMate2.setMateReferenceName(SAMRecord.NO_ALIGNMENT_REFERENCE_NAME);
SAMRecord samWithUnmappedMate3 = basicSAMRecord();
samWithUnmappedMate3.setMateAlignmentStart(SAMRecord.NO_ALIGNMENT_START);
Read googleReadWithUnmappedMate = basicGoogleGenomicsRead();
// We have to explicitly set the mate reverse strand flag in order to ensure that we can call getSAMString
// on the read once its been wrapped by the adapter; if it hasn't been explicitly set the adapter will
// throw when we query for the flags.
Position newPosition = new Position();
newPosition.setReverseStrand(false);
googleReadWithUnmappedMate.setNextMatePosition(newPosition);
Read googleReadWithUnmappedMate2 = basicGoogleGenomicsRead();
googleReadWithUnmappedMate2.getNextMatePosition().setReferenceName(SAMRecord.NO_ALIGNMENT_REFERENCE_NAME);
Read googleReadWithUnmappedMate3 = basicGoogleGenomicsRead();
googleReadWithUnmappedMate3.getNextMatePosition().setPosition(-1l);
Read googleReadWithUnmappedMate4 = basicGoogleGenomicsRead();
googleReadWithUnmappedMate4.getNextMatePosition().setReferenceName(null);
Read googleReadWithUnmappedMate5 = basicGoogleGenomicsRead();
googleReadWithUnmappedMate5.getNextMatePosition().setPosition(null);
return new Object[][] { { basicReadBackedBySam(), false }, { basicReadBackedByGoogle(), false }, { new SAMRecordToGATKReadAdapter(samWithUnmappedMate), true }, { new SAMRecordToGATKReadAdapter(samWithUnmappedMate2), true }, { new SAMRecordToGATKReadAdapter(samWithUnmappedMate3), true }, { new GoogleGenomicsReadToGATKReadAdapter(googleReadWithUnmappedMate), true }, { new GoogleGenomicsReadToGATKReadAdapter(googleReadWithUnmappedMate2), true }, { new GoogleGenomicsReadToGATKReadAdapter(googleReadWithUnmappedMate3), true }, { new GoogleGenomicsReadToGATKReadAdapter(googleReadWithUnmappedMate4), true }, { new GoogleGenomicsReadToGATKReadAdapter(googleReadWithUnmappedMate5), true } };
}
Aggregations