Found the bug in the engine: RodLocusView was using the wrong seek method so that it would only move to the first locus of a shard (and with multi-locus shards, this meant that we never processed RODs from the other positions). In fact, because the seek(Shard) method is extremely misleading and now no longer used, I think it's safer to delete it and make everyone use the much more transparent seek(GenomeLoc). Note that I have not re-enabled my improvements to the intervals accumulation of ReferenceDataSource because that inefficiency is still present downstream in RodLocusView; need to discuss those changes with Matt.

This commit is contained in:
Eric Banks 2011-12-26 14:45:19 -05:00
parent 24c84da60d
commit 2130b39f33
2 changed files with 1 additions and 12 deletions

View File

@ -80,7 +80,7 @@ public class RodLocusView extends LocusView implements ReferenceOrderedView {
// grab the ROD iterator from the data source, and compute the first location in this shard, forwarding
// the iterator to immediately before it, so that it can be added to the merging iterator primed for
// next() to return the first real ROD in this shard
LocationAwareSeekableRODIterator it = dataSource.seek(provider.getShard());
LocationAwareSeekableRODIterator it = dataSource.seek(provider.getLocus());
it.seekForward(genomeLocParser.createGenomeLoc(loc.getContig(), loc.getStart()-1));
states.add(new ReferenceOrderedDataState(dataSource,it));

View File

@ -26,7 +26,6 @@ package org.broadinstitute.sting.gatk.datasources.rmd;
import net.sf.samtools.SAMSequenceDictionary;
import org.broadinstitute.sting.commandline.Tags;
import org.broadinstitute.sting.gatk.datasources.reads.Shard;
import org.broadinstitute.sting.gatk.refdata.SeekableRODIterator;
import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrack;
import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrackBuilder;
@ -154,16 +153,6 @@ public class ReferenceOrderedDataSource {
return (name.equals(fileDescriptor.getName()) && (type.getClass().isAssignableFrom(getType().getClass())));
}
/**
* Seek to the specified position and return an iterator through the data.
* @param shard Shard that points to the selected position.
* @return Iterator through the data.
*/
public LocationAwareSeekableRODIterator seek( Shard shard ) {
DataStreamSegment dataStreamSegment = shard.getGenomeLocs().size() != 0 ? new MappedStreamSegment(shard.getGenomeLocs().get(0)) : new EntireStream();
return iteratorPool.iterator(dataStreamSegment);
}
/**
* Seek to the specified position and return an iterator through the data.
*