Fixing the naming of the function I checked in earlier.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@713 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
aaron 2009-05-14 19:27:10 +00:00
parent 5858f20902
commit d8c1b010f1
4 changed files with 10 additions and 11 deletions

View File

@ -350,7 +350,7 @@ public abstract class TraversalEngine {
samReader = initializeSAMFile(allReadsFiles.get(0)); samReader = initializeSAMFile(allReadsFiles.get(0));
else else
samReader = null; samReader = null;
return WrapReadsIterator(getReadsIterator(samReader), true); return wrapReadsIterator(getReadsIterator(samReader), true);
} }
protected Iterator<SAMRecord> getReadsIterator(final SAMFileReader samReader) { protected Iterator<SAMRecord> getReadsIterator(final SAMFileReader samReader) {
@ -381,9 +381,9 @@ public abstract class TraversalEngine {
} }
@Deprecated @Deprecated
protected StingSAMIterator WrapReadsIterator( final Iterator<SAMRecord> rawIterator, final boolean enableVerification ) { protected StingSAMIterator wrapReadsIterator( final Iterator<SAMRecord> rawIterator, final boolean enableVerification ) {
StingSAMIterator wrappedIterator = StingSAMIteratorAdapter.adapt(rawIterator); StingSAMIterator wrappedIterator = StingSAMIteratorAdapter.adapt(rawIterator);
wrappedIterator = ApplyDecoratingIterators(enableVerification, wrappedIterator); wrappedIterator = applyDecoratingIterators(enableVerification, wrappedIterator);
if (THREADED_IO) { if (THREADED_IO) {
@ -394,7 +394,7 @@ public abstract class TraversalEngine {
return wrappedIterator; return wrappedIterator;
} }
protected StingSAMIterator ApplyDecoratingIterators(boolean enableVerification, StingSAMIterator wrappedIterator) { protected StingSAMIterator applyDecoratingIterators(boolean enableVerification, StingSAMIterator wrappedIterator) {
// NOTE: this (and other filtering) should be done before on-the-fly sorting // NOTE: this (and other filtering) should be done before on-the-fly sorting
// as there is no reason to sort something that we will end of throwing away // as there is no reason to sort something that we will end of throwing away
if (DOWNSAMPLE_BY_FRACTION) if (DOWNSAMPLE_BY_FRACTION)

View File

@ -81,7 +81,7 @@ public class TraverseByLoci extends TraversalEngine {
(int)interval.getStart(), (int)interval.getStart(),
(int)interval.getStop()+1 ); (int)interval.getStop()+1 );
Iterator<SAMRecord> wrappedIter = WrapReadsIterator( readIter, false ); Iterator<SAMRecord> wrappedIter = wrapReadsIterator( readIter, false );
sum = carryWalkerOverInterval(walker, wrappedIter, sum, interval); sum = carryWalkerOverInterval(walker, wrappedIter, sum, interval);
readIter.close(); readIter.close();
} }
@ -89,7 +89,7 @@ public class TraverseByLoci extends TraversalEngine {
else { else {
// We aren't locus oriented // We aren't locus oriented
logger.debug("Doing non-interval-based traversal"); logger.debug("Doing non-interval-based traversal");
samReadIter = WrapReadsIterator(getReadsIterator(samReader), true); samReadIter = wrapReadsIterator(getReadsIterator(samReader), true);
sum = carryWalkerOverInterval(walker, samReadIter, sum, null); sum = carryWalkerOverInterval(walker, samReadIter, sum, null);
} }

View File

@ -9,7 +9,6 @@ import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
import org.broadinstitute.sting.gatk.iterators.ReferenceIterator; import org.broadinstitute.sting.gatk.iterators.ReferenceIterator;
import org.broadinstitute.sting.utils.GenomeLoc; import org.broadinstitute.sting.utils.GenomeLoc;
import org.broadinstitute.sting.utils.Utils; import org.broadinstitute.sting.utils.Utils;
import org.broadinstitute.sting.utils.Pair;
import java.util.*; import java.util.*;
import java.io.File; import java.io.File;
@ -90,7 +89,7 @@ public class TraverseByLocusWindows extends TraversalEngine {
CloseableIterator<SAMRecord> readIter = samReader.queryOverlapping( interval.getContig(), CloseableIterator<SAMRecord> readIter = samReader.queryOverlapping( interval.getContig(),
(int)interval.getStart(), (int)interval.getStart(),
(int)interval.getStop()); (int)interval.getStop());
Iterator<SAMRecord> wrappedIter = WrapReadsIterator(readIter, false); Iterator<SAMRecord> wrappedIter = wrapReadsIterator(readIter, false);
LocusContext locus = getLocusContext(wrappedIter, interval); LocusContext locus = getLocusContext(wrappedIter, interval);
readIter.close(); readIter.close();
@ -150,7 +149,7 @@ public class TraverseByLocusWindows extends TraversalEngine {
// otherwise, we're past the interval so first deal with the collected reads and then this one // otherwise, we're past the interval so first deal with the collected reads and then this one
else { else {
if ( intervalReads.size() > 0 ) { if ( intervalReads.size() > 0 ) {
Iterator<SAMRecord> wrappedIter = WrapReadsIterator(intervalReads.iterator(), false); Iterator<SAMRecord> wrappedIter = wrapReadsIterator(intervalReads.iterator(), false);
LocusContext locus = getLocusContext(wrappedIter, currentInterval); LocusContext locus = getLocusContext(wrappedIter, currentInterval);
if ( nextLociToCarry.size() == 0 ) { if ( nextLociToCarry.size() == 0 ) {
@ -186,7 +185,7 @@ public class TraverseByLocusWindows extends TraversalEngine {
} }
// some cleanup // some cleanup
if ( intervalReads.size() > 0 ) { if ( intervalReads.size() > 0 ) {
Iterator<SAMRecord> wrappedIter = WrapReadsIterator(intervalReads.iterator(), false); Iterator<SAMRecord> wrappedIter = wrapReadsIterator(intervalReads.iterator(), false);
LocusContext locus = getLocusContext(wrappedIter, currentInterval); LocusContext locus = getLocusContext(wrappedIter, currentInterval);
if ( nextLociToCarry.size() == 0 ) { if ( nextLociToCarry.size() == 0 ) {
nextLociToCarry.add(locus); nextLociToCarry.add(locus);

View File

@ -89,7 +89,7 @@ public class TraverseReads extends TraversalEngine {
ReadWalker<M, T> readWalker = (ReadWalker<M, T>) walker; ReadWalker<M, T> readWalker = (ReadWalker<M, T>) walker;
// we allow a bunch of wrapping iterators for down sampling, threadingIO, etc. // we allow a bunch of wrapping iterators for down sampling, threadingIO, etc.
StingSAMIterator it = ApplyDecoratingIterators(true, dataProvider.getReadIterator()); StingSAMIterator it = applyDecoratingIterators(true, dataProvider.getReadIterator());
// while we still have more reads // while we still have more reads
for (SAMRecord read : it) { for (SAMRecord read : it) {