@Test public void testWholeIndelReadInIsolation() { final int firstLocus = 44367789; // create a test version of the Reads object ReadProperties readAttributes = createTestReadProperties(); SAMRecord indelOnlyRead = ArtificialSAMUtils.createArtificialRead(header, "indelOnly", 0, firstLocus, 76); indelOnlyRead.setReadBases(Utils.dupBytes((byte) 'A', 76)); indelOnlyRead.setBaseQualities(Utils.dupBytes((byte) '@', 76)); indelOnlyRead.setCigarString("76I"); List<SAMRecord> reads = Arrays.asList(indelOnlyRead); // create the iterator by state with the fake reads and fake records li = makeLTBS(reads, readAttributes); // Traditionally, reads that end with indels bleed into the pileup at the following locus. // Verify that the next pileup contains this read // and considers it to be an indel-containing read. Assert.assertTrue( li.hasNext(), "Should have found a whole-indel read in the normal base pileup without extended events enabled"); AlignmentContext alignmentContext = li.next(); Assert.assertEquals( alignmentContext.getLocation().getStart(), firstLocus, "Base pileup is at incorrect location."); ReadBackedPileup basePileup = alignmentContext.getBasePileup(); Assert.assertEquals(basePileup.getReads().size(), 1, "Pileup is of incorrect size"); Assert.assertSame(basePileup.getReads().get(0), indelOnlyRead, "Read in pileup is incorrect"); }