From b6874f30cb922e7fb039cd27cad2367aede82bfe Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 28 Apr 2009 17:57:54 +0000 Subject: [PATCH] Added changes to bounded read iterator, it now explicitly takes a MSRI2 instead of the interfaces ClosableIterator. 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 --- .../sting/gatk/iterators/BoundedReadIterator.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/iterators/BoundedReadIterator.java b/java/src/org/broadinstitute/sting/gatk/iterators/BoundedReadIterator.java index 17729d20c..a59f28f4e 100755 --- a/java/src/org/broadinstitute/sting/gatk/iterators/BoundedReadIterator.java +++ b/java/src/org/broadinstitute/sting/gatk/iterators/BoundedReadIterator.java @@ -1,5 +1,6 @@ package org.broadinstitute.sting.gatk.iterators; +import net.sf.samtools.SAMFileHeader; import net.sf.samtools.SAMRecord; import net.sf.samtools.util.CloseableIterator; @@ -39,7 +40,7 @@ public class BoundedReadIterator implements CloseableIterator, Iterab private long currentCount = 0; // the iterator we want to decorate - private final CloseableIterator iterator; + private final MergingSamRecordIterator2 iterator; // our unmapped read flag private boolean doNotUseThatUnmappedReadPile = false; @@ -55,7 +56,7 @@ public class BoundedReadIterator implements CloseableIterator, Iterab * @param iter * @param readCount */ - public BoundedReadIterator(CloseableIterator iter, long readCount) { + public BoundedReadIterator(MergingSamRecordIterator2 iter, long readCount) { if (iter != null) { isOpen = true; @@ -69,6 +70,10 @@ public class BoundedReadIterator implements CloseableIterator, 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 * count, then yes