List<Object[]> tests = new ArrayList<Object[]>();
final SAMFileHeader header = ArtificialSAMUtils.createArtificialSamHeader(seq.getSequenceDictionary());
for ( final int start : Arrays.asList(1, 10, 100, contigLength - 10, contigLength - 1) ) {
for ( final int readStartOffset : Arrays.asList(-100, -10, 0, 10, 100) ) {
for ( final int readSize : Arrays.asList(10, 100, 1000) ) {
final GenomeLoc loc = genomeLocParser.createGenomeLocOnContig(contig, start, start + 10);
final int readStart = Math.max(start + readStartOffset, 1);
final int readStop = Math.min(readStart + readSize, contigLength);
final int readLength = readStop - readStart + 1;
if ( readLength > 0 ) {
GATKSAMRecord read = ArtificialSAMUtils.createArtificialRead(header, "read", 0, readStart, readLength);
final GenomeLoc readLoc = genomeLocParser.createGenomeLoc(read);
if ( readLoc.overlapsP(loc) )
tests.add(new Object[]{loc, read});
}
}
}
}