public void close() { this.readIterator.close(); }
public WindowMaker(Shard shard, GenomeLocParser genomeLocParser, GATKSAMIterator iterator, List<GenomeLoc> intervals, Collection<String> sampleNames) { this.sourceInfo = shard.getReadProperties(); this.readIterator = new GATKSAMRecordIterator(iterator); this.libs = new LocusIteratorByState(readIterator, sourceInfo.getDownsamplingMethod(), sourceInfo.includeReadsWithDeletionAtLoci(), sourceInfo.keepUniqueReadListInLIBS(), genomeLocParser,sampleNames); this.sourceIterator = new PeekableIterator<AlignmentContext>(libs); this.intervalIterator = intervals.size()>0 ? new PeekableIterator<GenomeLoc>(intervals.iterator()) : null; }
/** * Create a new LocusIteratorByState based on a SamReader using reads in an iterator it * * Simple constructor that uses the samples in the reader, doesn't do any downsampling, * and makes a new GenomeLocParser using the reader. This constructor will be slow(ish) * if you continually invoke this constructor, but it's easy to make. * * @param reader a non-null reader * @param it an iterator from reader that has the reads we want to use to create ReadBackPileups */ public LocusIteratorByState(final SamReader reader, final CloseableIterator<SAMRecord> it) { this(new GATKSAMRecordIterator(it), new LIBSDownsamplingInfo(false, 0), true, new GenomeLocParser(reader.getFileHeader().getSequenceDictionary()), ReadUtils.getSAMFileSamples(reader.getFileHeader()), false); }
final GATKSAMRecordIterator iterator = new GATKSAMRecordIterator(rawIterator);
iterator = (CloseableIterator<SAMRecord>)(Object)new GATKSAMRecordIterator(iterator); iterator = new MalformedBAMErrorReformatingIterator(id.getSamFile(), iterator); if(shard.getGenomeLocs().size() > 0)