GenomeLoc lastLoc = range.get(range.size()-1);
GenomeLoc bounds = genomeLocParser.createGenomeLoc(firstLoc.getContig(),firstLoc.getStart(),lastLoc.getStop());
for( int i = bounds.getStart(); i <= bounds.getStop(); i++ ) {
GenomeLoc site = genomeLocParser.createGenomeLoc("chr1",i);
AlignmentContext locusContext = allLocusView.next();
Assert.assertEquals(locusContext.getLocation(), site, "Locus context location is incorrect");
int expectedReadsAtSite = 0;
for( GATKSAMRecord read: reads ) {
if(genomeLocParser.createGenomeLoc(read).containsP(locusContext.getLocation())) {
Assert.assertTrue(locusContext.getReads().contains(read),"Target locus context does not contain reads");
expectedReadsAtSite++;
}
}
Assert.assertEquals(locusContext.getReads().size(), expectedReadsAtSite, "Found wrong number of reads at site");
}
}