diff --git a/public/java/src/org/broadinstitute/sting/utils/locusiterator/ReadStateManager.java b/public/java/src/org/broadinstitute/sting/utils/locusiterator/ReadStateManager.java index 74caef6a7..2dcf01d72 100644 --- a/public/java/src/org/broadinstitute/sting/utils/locusiterator/ReadStateManager.java +++ b/public/java/src/org/broadinstitute/sting/utils/locusiterator/ReadStateManager.java @@ -84,6 +84,7 @@ class ReadStateManager { * @return Iterator over the reads associated with that sample. */ public Iterator iterator(final String sample) { + // TODO -- why is this wrapped? return new Iterator() { private Iterator wrappedIterator = readStatesBySample.get(sample).iterator(); @@ -138,6 +139,18 @@ class ReadStateManager { } // fast testing of position + + /** + * TODO -- this function needs to be optimized + * + * Notes: + * -- the only place where it's called is in a block where we know isEmpty is false + * -- getFirst() is quite expensive, and it seems that we could cache this value in the outer + * block, and then pass this in as an argument + * + * @param read + * @return + */ private boolean readIsPastCurrentPosition(GATKSAMRecord read) { if (isEmpty()) return false;