Fix for accumulator exception when running reduce by interval walkers without
intervals. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2935 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
366771d5a6
commit
7104a3a96c
|
|
@ -48,7 +48,7 @@ public abstract class Accumulator {
|
||||||
* @return Accumulator suitable for this walker.s
|
* @return Accumulator suitable for this walker.s
|
||||||
*/
|
*/
|
||||||
public static Accumulator create( GenomeAnalysisEngine engine, Walker walker ) {
|
public static Accumulator create( GenomeAnalysisEngine engine, Walker walker ) {
|
||||||
if( walker.isReduceByInterval() )
|
if( walker.isReduceByInterval() && engine.getIntervals() != null)
|
||||||
return new IntervalAccumulator( walker, engine.getIntervals() );
|
return new IntervalAccumulator( walker, engine.getIntervals() );
|
||||||
else
|
else
|
||||||
return new StandardAccumulator( walker );
|
return new StandardAccumulator( walker );
|
||||||
|
|
|
||||||
|
|
@ -410,5 +410,16 @@ public class DepthOfCoverageWalker extends LocusWalker<DepthOfCoverageWalker.DoC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
// This is an executive summary, included mainly so that integration tests will pass.
|
||||||
|
// TODO: Add a more compelling summary.
|
||||||
|
return String.format("Summary: total coverage = %d; # of deletions = %d; # of bad mapping quality reads = %d; minimum covered depth =%d",
|
||||||
|
totalCoverage,
|
||||||
|
numDeletions,
|
||||||
|
numBadMQReads,
|
||||||
|
minDepthCoveredLoci);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,4 +46,12 @@ public class DepthOfCoverageIntegrationTest extends WalkerTest {
|
||||||
Arrays.asList("a332d1539b29dff615b198818a3d4dd1"));
|
Arrays.asList("a332d1539b29dff615b198818a3d4dd1"));
|
||||||
executeTest("testDepthOfCoverage454", spec);
|
executeTest("testDepthOfCoverage454", spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDepthOfCoverageNoIntervals() {
|
||||||
|
WalkerTestSpec spec = new WalkerTestSpec( "-T DepthOfCoverage -R " + validationDataLocation + "human_b36_both.partial.fasta -I " + validationDataLocation + "NA12878.chrom1.SLX.SRP000032.2009_06.bam -o %s",
|
||||||
|
1, // just one output file
|
||||||
|
Arrays.asList("7b8fc75dd1995d270831b31c268392a5"));
|
||||||
|
executeTest("testDepthOfCoverageNoIntervals", spec);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue