Fixed another bug in the original sharding system. Updated integration tests

as appropriate.


git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2947 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
hanna 2010-03-07 15:32:18 +00:00
parent 8f4fbf29a7
commit dd6122f682
3 changed files with 13 additions and 6 deletions

View File

@ -169,9 +169,13 @@ public class IndexDrivenSAMDataSource extends SAMDataSource {
if(shard.getGenomeLocs().size() > 1)
throw new StingException("This SAMDataSource does not support multiple intervals within a single shard");
GenomeLoc shardGenomeLoc = shard.getGenomeLocs().get(0);
if (mLastInterval != null && shard.getShardType() == Shard.ShardType.READ_INTERVAL )
iterator = new PlusOneFixIterator(shardGenomeLoc,new IntervalOverlapIterator(iterator,mLastInterval,false));
mLastInterval = shardGenomeLoc;
if(shard.getShardType() == Shard.ShardType.READ_INTERVAL) {
if (mLastInterval != null)
iterator = new PlusOneFixIterator(shardGenomeLoc,new IntervalOverlapIterator(iterator,mLastInterval,false));
else
iterator = new PlusOneFixIterator(shardGenomeLoc,iterator);
mLastInterval = shardGenomeLoc;
}
} else {
throw new StingException("seek: Unknown shard type");

View File

@ -181,6 +181,9 @@ public abstract class SAMDataSource implements SimpleDataSource {
Double downsamplingFraction,
Boolean noValidationOfReadOrder,
Collection<SamRecordFilter> supplementalFilters) {
wrappedIterator = new MalformedSAMFilteringIterator(getHeader(),wrappedIterator,violations );
wrappedIterator = new ReadWrappingIterator(wrappedIterator);
// 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
if (downsamplingFraction != null)

View File

@ -51,9 +51,9 @@ public class RecalibrationWalkersIntegrationTest extends WalkerTest {
public void testTableRecalibrator1() {
HashMap<String, String> e = new HashMap<String, String>();
e.put( validationDataLocation + "NA12892.SLX.SRP000031.2009_06.selected.bam", "6c59d291c37d053e0f188b762f3060a5" );
e.put( validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SOLID.bam", "d0e902b071831bc10cc396e7e082b3c1");
e.put( validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SOLID.bam", "e5d9fc628dcf4f0ae115a6e6cc5423fe");
e.put( validationDataLocation + "NA12873.454.SRP000031.2009_06.chr1.10_20mb.bam", "7ebdce416b72679e1cf88cc9886a5edc" );
e.put( validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.allTechs.bam", "467c7304cd049d1629c3675fdd61fc00" );
e.put( validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.allTechs.bam", "4cd060de1e4e6d21fcd1c7a4ce7824f5" );
for ( Map.Entry<String, String> entry : e.entrySet() ) {
String bam = entry.getKey();
@ -81,7 +81,7 @@ public class RecalibrationWalkersIntegrationTest extends WalkerTest {
@Test
public void testTableRecalibratorMaxQ70() {
HashMap<String, String> e = new HashMap<String, String>();
e.put( validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SOLID.bam", "e7e6443bc4debc26e5e06b8765b60042" );
e.put( validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SOLID.bam", "0e2bca11d09b1b93bfc4af5c185e0d1d" );
for ( Map.Entry<String, String> entry : e.entrySet() ) {
String bam = entry.getKey();