diff --git a/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java b/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java index 2b0a7e2db..cff23ca8b 100755 --- a/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java +++ b/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java @@ -210,9 +210,9 @@ public class GenomeAnalysisEngine { long toPruneSize = includeSortedSet.coveredSize(); long toExcludeSize = excludeSortedSet.coveredSize(); long intervalSize = intervals.coveredSize(); - logger.info(String.format("Initial include intervals cover %d bases", toPruneSize)); - logger.info(String.format("Excluding %d bases from original intervals (%.2f%% reduction)", - toExcludeSize, (toPruneSize - intervalSize) / (0.01 * toPruneSize))); + logger.info(String.format("Initial include intervals span %d loci; exclude intervals span %d loci", toPruneSize, toExcludeSize)); + logger.info(String.format("Excluding %d loci from original intervals (%.2f%% reduction)", + toPruneSize - intervalSize, (toPruneSize - intervalSize) / (0.01 * toPruneSize))); } } @@ -295,7 +295,7 @@ public class GenomeAnalysisEngine { * @param walkerType Type of walker. * @return Name of the walker. */ - public String getWalkerName(Class walkerType) { + public String getWalkerName(Class walkerType) { return walkerManager.getName(walkerType); } diff --git a/java/src/org/broadinstitute/sting/gatk/executive/HierarchicalMicroScheduler.java b/java/src/org/broadinstitute/sting/gatk/executive/HierarchicalMicroScheduler.java index 494c534d6..4ac840d29 100755 --- a/java/src/org/broadinstitute/sting/gatk/executive/HierarchicalMicroScheduler.java +++ b/java/src/org/broadinstitute/sting/gatk/executive/HierarchicalMicroScheduler.java @@ -96,7 +96,7 @@ public class HierarchicalMicroScheduler extends MicroScheduler implements Hierar public Object execute( Walker walker, ShardStrategy shardStrategy, int maxIterations ) { // Fast fail for walkers not supporting TreeReducible interface. if (!( walker instanceof TreeReducible )) - throw new IllegalArgumentException("Hierarchical microscheduler only works with TreeReducible walkers"); + throw new IllegalArgumentException("The GATK can currently run in parallel only with TreeReducible walkers"); // Having maxiterations in the execute method is a holdover from the old TraversalEngine days. // Lets do something else with this. diff --git a/java/src/org/broadinstitute/sting/gatk/executive/MicroScheduler.java b/java/src/org/broadinstitute/sting/gatk/executive/MicroScheduler.java index 6b39852ca..af3befc82 100755 --- a/java/src/org/broadinstitute/sting/gatk/executive/MicroScheduler.java +++ b/java/src/org/broadinstitute/sting/gatk/executive/MicroScheduler.java @@ -37,7 +37,9 @@ import org.broadinstitute.sting.gatk.iterators.StingSAMIterator; import org.broadinstitute.sting.gatk.iterators.NullSAMIterator; import org.broadinstitute.sting.gatk.Reads; import org.broadinstitute.sting.gatk.GenomeAnalysisEngine; +import org.broadinstitute.sting.gatk.WalkerManager; import org.broadinstitute.sting.utils.fasta.IndexedFastaSequenceFile; +import org.broadinstitute.sting.utils.StingException; import java.util.*; import java.io.File; @@ -80,10 +82,13 @@ public abstract class MicroScheduler { */ public static MicroScheduler create(GenomeAnalysisEngine engine, Walker walker, SAMDataSource reads, IndexedFastaSequenceFile reference, Collection rods, int nThreadsToUse) { if (walker instanceof TreeReducible && nThreadsToUse > 1) { - logger.info("Creating hierarchical microscheduler"); + if(walker.isReduceByInterval()) + throw new StingException(String.format("The analysis %s aggregates results by interval. Due to a current limitation of the GATK, analyses of this type do not support parallel execution. Please run your analysis without the -nt option.", engine.getWalkerName(walker.getClass()))); + logger.info(String.format("Running the GATK in parallel mode with %d concurrent threads",nThreadsToUse)); return new HierarchicalMicroScheduler(engine, walker, reads, reference, rods, nThreadsToUse); } else { - logger.info("Creating linear microscheduler"); + if(nThreadsToUse > 1) + throw new StingException(String.format("The analysis %s currently does not support parallel execution. Please run your analysis without the -nt option.", engine.getWalkerName(walker.getClass()))); return new LinearMicroScheduler(engine, walker, reads, reference, rods); } }