A few misc usability fixes:
- Clarify the message emitted when -XL is supplied so I don't spend another half day chasing a bug that doesn't exist. - Crash with a helpful message when running -nt with non-TreeReducible walkers. - Crash with a helpful message when running -nt with reduceByInterval walkers. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3405 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
b543dd4ac4
commit
7389077b3b
|
|
@ -210,9 +210,9 @@ public class GenomeAnalysisEngine {
|
||||||
long toPruneSize = includeSortedSet.coveredSize();
|
long toPruneSize = includeSortedSet.coveredSize();
|
||||||
long toExcludeSize = excludeSortedSet.coveredSize();
|
long toExcludeSize = excludeSortedSet.coveredSize();
|
||||||
long intervalSize = intervals.coveredSize();
|
long intervalSize = intervals.coveredSize();
|
||||||
logger.info(String.format("Initial include intervals cover %d bases", toPruneSize));
|
logger.info(String.format("Initial include intervals span %d loci; exclude intervals span %d loci", toPruneSize, toExcludeSize));
|
||||||
logger.info(String.format("Excluding %d bases from original intervals (%.2f%% reduction)",
|
logger.info(String.format("Excluding %d loci from original intervals (%.2f%% reduction)",
|
||||||
toExcludeSize, (toPruneSize - intervalSize) / (0.01 * toPruneSize)));
|
toPruneSize - intervalSize, (toPruneSize - intervalSize) / (0.01 * toPruneSize)));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -295,7 +295,7 @@ public class GenomeAnalysisEngine {
|
||||||
* @param walkerType Type of walker.
|
* @param walkerType Type of walker.
|
||||||
* @return Name of the walker.
|
* @return Name of the walker.
|
||||||
*/
|
*/
|
||||||
public String getWalkerName(Class<Walker> walkerType) {
|
public String getWalkerName(Class<? extends Walker> walkerType) {
|
||||||
return walkerManager.getName(walkerType);
|
return walkerManager.getName(walkerType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ public class HierarchicalMicroScheduler extends MicroScheduler implements Hierar
|
||||||
public Object execute( Walker walker, ShardStrategy shardStrategy, int maxIterations ) {
|
public Object execute( Walker walker, ShardStrategy shardStrategy, int maxIterations ) {
|
||||||
// Fast fail for walkers not supporting TreeReducible interface.
|
// Fast fail for walkers not supporting TreeReducible interface.
|
||||||
if (!( walker instanceof TreeReducible ))
|
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.
|
// Having maxiterations in the execute method is a holdover from the old TraversalEngine days.
|
||||||
// Lets do something else with this.
|
// Lets do something else with this.
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,9 @@ import org.broadinstitute.sting.gatk.iterators.StingSAMIterator;
|
||||||
import org.broadinstitute.sting.gatk.iterators.NullSAMIterator;
|
import org.broadinstitute.sting.gatk.iterators.NullSAMIterator;
|
||||||
import org.broadinstitute.sting.gatk.Reads;
|
import org.broadinstitute.sting.gatk.Reads;
|
||||||
import org.broadinstitute.sting.gatk.GenomeAnalysisEngine;
|
import org.broadinstitute.sting.gatk.GenomeAnalysisEngine;
|
||||||
|
import org.broadinstitute.sting.gatk.WalkerManager;
|
||||||
import org.broadinstitute.sting.utils.fasta.IndexedFastaSequenceFile;
|
import org.broadinstitute.sting.utils.fasta.IndexedFastaSequenceFile;
|
||||||
|
import org.broadinstitute.sting.utils.StingException;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.io.File;
|
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<ReferenceOrderedDataSource> rods, int nThreadsToUse) {
|
public static MicroScheduler create(GenomeAnalysisEngine engine, Walker walker, SAMDataSource reads, IndexedFastaSequenceFile reference, Collection<ReferenceOrderedDataSource> rods, int nThreadsToUse) {
|
||||||
if (walker instanceof TreeReducible && nThreadsToUse > 1) {
|
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);
|
return new HierarchicalMicroScheduler(engine, walker, reads, reference, rods, nThreadsToUse);
|
||||||
} else {
|
} 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);
|
return new LinearMicroScheduler(engine, walker, reads, reference, rods);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue