GSA-515 Nanoscheduler GSA-550 ThreadSafeMapReduce shouldn't be super interface of TreeReducible
This commit is contained in:
parent
c5f1ceaa95
commit
e11915aa0a
|
|
@ -116,7 +116,7 @@ public abstract class MicroScheduler implements MicroSchedulerMBean {
|
||||||
return new HierarchicalMicroScheduler(engine, walker, reads, reference, rods, threadAllocation);
|
return new HierarchicalMicroScheduler(engine, walker, reads, reference, rods, threadAllocation);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ( threadAllocation.getNumCPUThreadsPerDataThread() > 1 && ! (walker instanceof ThreadSafeMapReduce) )
|
if ( threadAllocation.getNumCPUThreadsPerDataThread() > 1 && ! (walker instanceof NanoSchedulable) )
|
||||||
throw badNT("cnt", engine, walker);
|
throw badNT("cnt", engine, walker);
|
||||||
return new LinearMicroScheduler(engine, walker, reads, reference, rods, threadAllocation);
|
return new LinearMicroScheduler(engine, walker, reads, reference, rods, threadAllocation);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ import java.text.NumberFormat;
|
||||||
*/
|
*/
|
||||||
@DocumentedGATKFeature( groupName = "Quality Control and Simple Analysis Tools", extraDocs = {CommandLineGATK.class} )
|
@DocumentedGATKFeature( groupName = "Quality Control and Simple Analysis Tools", extraDocs = {CommandLineGATK.class} )
|
||||||
@Requires({DataSource.READS})
|
@Requires({DataSource.READS})
|
||||||
public class FlagStat extends ReadWalker<FlagStat.FlagStatus, FlagStat.FlagStatus> implements ThreadSafeMapReduce {
|
public class FlagStat extends ReadWalker<FlagStat.FlagStatus, FlagStat.FlagStatus> implements NanoSchedulable {
|
||||||
@Output
|
@Output
|
||||||
PrintStream out;
|
PrintStream out;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,5 +27,5 @@ package org.broadinstitute.sting.gatk.walkers;
|
||||||
* declare that their map function is thread-safe and so multiple
|
* declare that their map function is thread-safe and so multiple
|
||||||
* map calls can be run in parallel in the same JVM instance.
|
* map calls can be run in parallel in the same JVM instance.
|
||||||
*/
|
*/
|
||||||
public interface ThreadSafeMapReduce {
|
public interface NanoSchedulable {
|
||||||
}
|
}
|
||||||
|
|
@ -52,7 +52,7 @@ import java.util.List;
|
||||||
* samtools pileup [-f in.ref.fasta] [-t in.ref_list] [-l in.site_list] [-iscg] [-T theta] [-N nHap] [-r pairDiffRate] <in.alignment>
|
* samtools pileup [-f in.ref.fasta] [-t in.ref_list] [-l in.site_list] [-iscg] [-T theta] [-N nHap] [-r pairDiffRate] <in.alignment>
|
||||||
*/
|
*/
|
||||||
@DocumentedGATKFeature( groupName = "Quality Control and Simple Analysis Tools", extraDocs = {CommandLineGATK.class} )
|
@DocumentedGATKFeature( groupName = "Quality Control and Simple Analysis Tools", extraDocs = {CommandLineGATK.class} )
|
||||||
public class Pileup extends LocusWalker<String, Integer> implements TreeReducible<Integer> {
|
public class Pileup extends LocusWalker<String, Integer> implements TreeReducible<Integer>, NanoSchedulable {
|
||||||
|
|
||||||
private static final String verboseDelimiter = "@"; // it's ugly to use "@" but it's literally the only usable character not allowed in read names
|
private static final String verboseDelimiter = "@"; // it's ugly to use "@" but it's literally the only usable character not allowed in read names
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ import java.util.*;
|
||||||
@ReadTransformersMode(ApplicationTime = ReadTransformer.ApplicationTime.HANDLED_IN_WALKER)
|
@ReadTransformersMode(ApplicationTime = ReadTransformer.ApplicationTime.HANDLED_IN_WALKER)
|
||||||
@BAQMode(QualityMode = BAQ.QualityMode.ADD_TAG, ApplicationTime = ReadTransformer.ApplicationTime.HANDLED_IN_WALKER)
|
@BAQMode(QualityMode = BAQ.QualityMode.ADD_TAG, ApplicationTime = ReadTransformer.ApplicationTime.HANDLED_IN_WALKER)
|
||||||
@Requires({DataSource.READS, DataSource.REFERENCE})
|
@Requires({DataSource.READS, DataSource.REFERENCE})
|
||||||
public class PrintReads extends ReadWalker<GATKSAMRecord, SAMFileWriter> implements ThreadSafeMapReduce {
|
public class PrintReads extends ReadWalker<GATKSAMRecord, SAMFileWriter> implements NanoSchedulable {
|
||||||
|
|
||||||
@Output(doc="Write output to this BAM filename instead of STDOUT", required = true)
|
@Output(doc="Write output to this BAM filename instead of STDOUT", required = true)
|
||||||
SAMFileWriter out;
|
SAMFileWriter out;
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ package org.broadinstitute.sting.gatk.walkers;
|
||||||
* shards of the data can reduce with each other, and the composite result
|
* shards of the data can reduce with each other, and the composite result
|
||||||
* can be reduced with other composite results.
|
* can be reduced with other composite results.
|
||||||
*/
|
*/
|
||||||
public interface TreeReducible<ReduceType> extends ThreadSafeMapReduce {
|
public interface TreeReducible<ReduceType> {
|
||||||
/**
|
/**
|
||||||
* A composite, 'reduce of reduces' function.
|
* A composite, 'reduce of reduces' function.
|
||||||
* @param lhs 'left-most' portion of data in the composite reduce.
|
* @param lhs 'left-most' portion of data in the composite reduce.
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ import java.util.ArrayList;
|
||||||
@ReadFilters({MappingQualityZeroFilter.class, MappingQualityUnavailableFilter.class}) // only look at covered loci, not every loci of the reference file
|
@ReadFilters({MappingQualityZeroFilter.class, MappingQualityUnavailableFilter.class}) // only look at covered loci, not every loci of the reference file
|
||||||
@Requires({DataSource.READS, DataSource.REFERENCE}) // filter out all reads with zero or unavailable mapping quality
|
@Requires({DataSource.READS, DataSource.REFERENCE}) // filter out all reads with zero or unavailable mapping quality
|
||||||
@PartitionBy(PartitionType.LOCUS) // this walker requires both -I input.bam and -R reference.fasta
|
@PartitionBy(PartitionType.LOCUS) // this walker requires both -I input.bam and -R reference.fasta
|
||||||
public class BaseRecalibrator extends LocusWalker<Long, Long> implements TreeReducible<Long> {
|
public class BaseRecalibrator extends LocusWalker<Long, Long> implements TreeReducible<Long>, NanoSchedulable {
|
||||||
@ArgumentCollection
|
@ArgumentCollection
|
||||||
private final RecalibrationArgumentCollection RAC = new RecalibrationArgumentCollection(); // all the command line arguments for BQSR and it's covariates
|
private final RecalibrationArgumentCollection RAC = new RecalibrationArgumentCollection(); // all the command line arguments for BQSR and it's covariates
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ import java.util.*;
|
||||||
// TODO -- When LocusIteratorByState gets cleaned up, we should enable multiple @By sources:
|
// TODO -- When LocusIteratorByState gets cleaned up, we should enable multiple @By sources:
|
||||||
// TODO -- @By( {DataSource.READS, DataSource.REFERENCE_ORDERED_DATA} )
|
// TODO -- @By( {DataSource.READS, DataSource.REFERENCE_ORDERED_DATA} )
|
||||||
@Downsample(by=DownsampleType.BY_SAMPLE, toCoverage=250)
|
@Downsample(by=DownsampleType.BY_SAMPLE, toCoverage=250)
|
||||||
public class UnifiedGenotyper extends LocusWalker<List<VariantCallContext>, UnifiedGenotyper.UGStatistics> implements TreeReducible<UnifiedGenotyper.UGStatistics>, AnnotatorCompatible {
|
public class UnifiedGenotyper extends LocusWalker<List<VariantCallContext>, UnifiedGenotyper.UGStatistics> implements TreeReducible<UnifiedGenotyper.UGStatistics>, AnnotatorCompatible, NanoSchedulable {
|
||||||
|
|
||||||
@ArgumentCollection
|
@ArgumentCollection
|
||||||
private UnifiedArgumentCollection UAC = new UnifiedArgumentCollection();
|
private UnifiedArgumentCollection UAC = new UnifiedArgumentCollection();
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
|
||||||
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
||||||
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
|
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
|
||||||
import org.broadinstitute.sting.gatk.walkers.LocusWalker;
|
import org.broadinstitute.sting.gatk.walkers.LocusWalker;
|
||||||
|
import org.broadinstitute.sting.gatk.walkers.NanoSchedulable;
|
||||||
import org.broadinstitute.sting.gatk.walkers.TreeReducible;
|
import org.broadinstitute.sting.gatk.walkers.TreeReducible;
|
||||||
import org.broadinstitute.sting.utils.help.DocumentedGATKFeature;
|
import org.broadinstitute.sting.utils.help.DocumentedGATKFeature;
|
||||||
|
|
||||||
|
|
@ -40,7 +41,7 @@ import java.io.PrintStream;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@DocumentedGATKFeature( groupName = "Quality Control and Simple Analysis Tools", extraDocs = {CommandLineGATK.class} )
|
@DocumentedGATKFeature( groupName = "Quality Control and Simple Analysis Tools", extraDocs = {CommandLineGATK.class} )
|
||||||
public class CountLoci extends LocusWalker<Integer, Long> implements TreeReducible<Long> {
|
public class CountLoci extends LocusWalker<Integer, Long> implements TreeReducible<Long>, NanoSchedulable {
|
||||||
@Output(doc="Write count to this file instead of STDOUT")
|
@Output(doc="Write count to this file instead of STDOUT")
|
||||||
PrintStream out;
|
PrintStream out;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
|
||||||
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
||||||
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
|
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
|
||||||
import org.broadinstitute.sting.gatk.refdata.utils.RODRecordList;
|
import org.broadinstitute.sting.gatk.refdata.utils.RODRecordList;
|
||||||
|
import org.broadinstitute.sting.gatk.walkers.NanoSchedulable;
|
||||||
import org.broadinstitute.sting.gatk.walkers.RodWalker;
|
import org.broadinstitute.sting.gatk.walkers.RodWalker;
|
||||||
import org.broadinstitute.sting.gatk.walkers.TreeReducible;
|
import org.broadinstitute.sting.gatk.walkers.TreeReducible;
|
||||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||||
|
|
@ -73,7 +74,7 @@ import java.util.*;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@DocumentedGATKFeature( groupName = "Quality Control and Simple Analysis Tools", extraDocs = {CommandLineGATK.class} )
|
@DocumentedGATKFeature( groupName = "Quality Control and Simple Analysis Tools", extraDocs = {CommandLineGATK.class} )
|
||||||
public class CountRODs extends RodWalker<CountRODs.Datum, Pair<ExpandingArrayList<Long>, Long>> implements TreeReducible<Pair<ExpandingArrayList<Long>, Long>> {
|
public class CountRODs extends RodWalker<CountRODs.Datum, Pair<ExpandingArrayList<Long>, Long>> implements TreeReducible<Pair<ExpandingArrayList<Long>, Long>>, NanoSchedulable {
|
||||||
@Output
|
@Output
|
||||||
public PrintStream out;
|
public PrintStream out;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ import org.broadinstitute.sting.gatk.CommandLineGATK;
|
||||||
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
||||||
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
|
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
|
||||||
import org.broadinstitute.sting.gatk.walkers.DataSource;
|
import org.broadinstitute.sting.gatk.walkers.DataSource;
|
||||||
|
import org.broadinstitute.sting.gatk.walkers.NanoSchedulable;
|
||||||
import org.broadinstitute.sting.gatk.walkers.ReadWalker;
|
import org.broadinstitute.sting.gatk.walkers.ReadWalker;
|
||||||
import org.broadinstitute.sting.gatk.walkers.Requires;
|
import org.broadinstitute.sting.gatk.walkers.Requires;
|
||||||
import org.broadinstitute.sting.gatk.walkers.ThreadSafeMapReduce;
|
|
||||||
import org.broadinstitute.sting.utils.help.DocumentedGATKFeature;
|
import org.broadinstitute.sting.utils.help.DocumentedGATKFeature;
|
||||||
import org.broadinstitute.sting.utils.sam.GATKSAMRecord;
|
import org.broadinstitute.sting.utils.sam.GATKSAMRecord;
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@ import org.broadinstitute.sting.utils.sam.GATKSAMRecord;
|
||||||
*/
|
*/
|
||||||
@DocumentedGATKFeature( groupName = "Quality Control and Simple Analysis Tools", extraDocs = {CommandLineGATK.class} )
|
@DocumentedGATKFeature( groupName = "Quality Control and Simple Analysis Tools", extraDocs = {CommandLineGATK.class} )
|
||||||
@Requires({DataSource.READS, DataSource.REFERENCE})
|
@Requires({DataSource.READS, DataSource.REFERENCE})
|
||||||
public class CountReads extends ReadWalker<Integer, Integer> implements ThreadSafeMapReduce {
|
public class CountReads extends ReadWalker<Integer, Integer> implements NanoSchedulable {
|
||||||
public Integer map(ReferenceContext ref, GATKSAMRecord read, RefMetaDataTracker tracker) {
|
public Integer map(ReferenceContext ref, GATKSAMRecord read, RefMetaDataTracker tracker) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue