Added changes to bounded read iterator, it now explicitly takes a MSRI2 instead of the interfaces ClosableIterator<SAMRecord>. It would be good to fix this in the future with an interface that lets you get the (possibly merged) header.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@552 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
395aaf48b0
commit
b6874f30cb
|
|
@ -1,5 +1,6 @@
|
||||||
package org.broadinstitute.sting.gatk.iterators;
|
package org.broadinstitute.sting.gatk.iterators;
|
||||||
|
|
||||||
|
import net.sf.samtools.SAMFileHeader;
|
||||||
import net.sf.samtools.SAMRecord;
|
import net.sf.samtools.SAMRecord;
|
||||||
import net.sf.samtools.util.CloseableIterator;
|
import net.sf.samtools.util.CloseableIterator;
|
||||||
|
|
||||||
|
|
@ -39,7 +40,7 @@ public class BoundedReadIterator implements CloseableIterator<SAMRecord>, Iterab
|
||||||
private long currentCount = 0;
|
private long currentCount = 0;
|
||||||
|
|
||||||
// the iterator we want to decorate
|
// the iterator we want to decorate
|
||||||
private final CloseableIterator<SAMRecord> iterator;
|
private final MergingSamRecordIterator2 iterator;
|
||||||
|
|
||||||
// our unmapped read flag
|
// our unmapped read flag
|
||||||
private boolean doNotUseThatUnmappedReadPile = false;
|
private boolean doNotUseThatUnmappedReadPile = false;
|
||||||
|
|
@ -55,7 +56,7 @@ public class BoundedReadIterator implements CloseableIterator<SAMRecord>, Iterab
|
||||||
* @param iter
|
* @param iter
|
||||||
* @param readCount
|
* @param readCount
|
||||||
*/
|
*/
|
||||||
public BoundedReadIterator(CloseableIterator<SAMRecord> iter, long readCount) {
|
public BoundedReadIterator(MergingSamRecordIterator2 iter, long readCount) {
|
||||||
if (iter != null) {
|
if (iter != null) {
|
||||||
isOpen = true;
|
isOpen = true;
|
||||||
|
|
||||||
|
|
@ -69,6 +70,10 @@ public class BoundedReadIterator implements CloseableIterator<SAMRecord>, Iterab
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public SAMFileHeader getMergedHeader() {
|
||||||
|
return iterator.getMergedHeader();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Do we have a next? If the iterator has a read and we're not over the read
|
* Do we have a next? If the iterator has a read and we're not over the read
|
||||||
* count, then yes
|
* count, then yes
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue