use of org.broadinstitute.hellbender.utils.pileup.ReadPileup in project gatk by broadinstitute.
the class LocusIteratorByStateUnitTest method testXandEQOperators.
@Test
public void testXandEQOperators() {
final byte[] bases1 = { 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A' };
final byte[] bases2 = { 'A', 'A', 'A', 'C', 'A', 'A', 'A', 'A', 'A', 'C' };
final GATKRead r1 = ArtificialReadUtils.createArtificialRead(header, "r1", 0, 1, 10);
r1.setBases(bases1);
r1.setBaseQualities(new byte[] { 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 });
r1.setCigar("10M");
final GATKRead r2 = ArtificialReadUtils.createArtificialRead(header, "r2", 0, 1, 10);
r2.setBases(bases2);
r2.setBaseQualities(new byte[] { 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 });
r2.setCigar("3=1X5=1X");
final GATKRead r3 = ArtificialReadUtils.createArtificialRead(header, "r3", 0, 1, 10);
r3.setBases(bases2);
r3.setBaseQualities(new byte[] { 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 });
r3.setCigar("3=1X5M1X");
final GATKRead r4 = ArtificialReadUtils.createArtificialRead(header, "r4", 0, 1, 10);
r4.setBases(bases2);
r4.setBaseQualities(new byte[] { 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 });
r4.setCigar("10M");
final List<GATKRead> reads = Arrays.asList(r1, r2, r3, r4);
// create the iterator by state with the fake reads and fake records
final LocusIteratorByState li;
li = makeLIBS(reads, header);
while (li.hasNext()) {
final AlignmentContext context = li.next();
final ReadPileup pileup = context.getBasePileup();
Assert.assertEquals(pileup.size(), 4);
}
}
Aggregations