check to see if the parsed interval list is empty, since we now allow interval files that are empty. If so, make sure we default to a non-interval based traversal.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2559 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
aaron 2010-01-12 17:52:27 +00:00
parent 040fdfee61
commit 3c5f5177b1
2 changed files with 3 additions and 4 deletions

View File

@ -597,7 +597,7 @@ public class GenomeAnalysisEngine {
if (walker instanceof LocusWalker) {
if (walker instanceof RodWalker) SHARD_SIZE *= 1000;
if (intervals != null) {
if (intervals != null && !intervals.isEmpty()) {
shardType = (walker.isReduceByInterval()) ?
ShardStrategyFactory.SHATTER_STRATEGY.INTERVAL :
ShardStrategyFactory.SHATTER_STRATEGY.LINEAR;
@ -615,7 +615,7 @@ public class GenomeAnalysisEngine {
shardType = ShardStrategyFactory.SHATTER_STRATEGY.READS;
if (intervals != null) {
if (intervals != null && !intervals.isEmpty()) {
shardStrategy = ShardStrategyFactory.shatter(shardType,
drivingDataSource.getSequenceDictionary(),
SHARD_SIZE,
@ -626,7 +626,7 @@ public class GenomeAnalysisEngine {
SHARD_SIZE, maxIterations);
}
} else if (walker instanceof LocusWindowWalker) {
if (intervals == null)
if (intervals == null || intervals.isEmpty())
throw new StingException("Unable to shard: walker is of type LocusWindow, but no intervals were provided");
shardStrategy = ShardStrategyFactory.shatter(ShardStrategyFactory.SHATTER_STRATEGY.INTERVAL,
drivingDataSource.getSequenceDictionary(),

View File

@ -85,7 +85,6 @@ public class IntervalShardStrategy implements ShardStrategy {
throw new StingException("IntervalShardStrategy: genomic regions list is empty.");
}
this.regions = locations.clone();
this.size = size;
}
/**