Skip to content

Commit

Permalink
Add downsampling arguments to Mutect
Browse files Browse the repository at this point in the history
	- maxReadsInRegionPErSample, minReadsPerAlignment start are now M2 args
	- maxReadsInMemoryPerSample is an activeRegionWalker arg
  • Loading branch information
davidbenjamin authored and Geraldine Van der Auwera committed Dec 5, 2016
1 parent 4473e65 commit 3a80156
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
Expand Up @@ -162,8 +162,8 @@ public void initialize(GenomeAnalysisEngine engine, Walker walker, ProgressMeter
activityProfile = new BandPassActivityProfile(engine.getGenomeLocParser(), engine.getIntervals(), this.walker.maxProbPropagationDistance, this.walker.activeProbThreshold,
BandPassActivityProfile.MAX_FILTER_SIZE, bandPassSigma);

final int maxReadsAcrossSamples = annotation.maxReadsToHoldInMemoryPerSample() * ReadUtils.getSAMFileSamples(engine.getSAMFileHeader()).size();
final int maxReadsToHoldInMemory = Math.min(maxReadsAcrossSamples, annotation.maxReadsToHoldTotal());
final int maxReadsAcrossSamples = this.walker.maxReadsInMemoryPerSample * ReadUtils.getSAMFileSamples(engine.getSAMFileHeader()).size();
final int maxReadsToHoldInMemory = Math.min(maxReadsAcrossSamples, this.walker.maxTotalReadsInMemory);
myReads = new TAROrderedReadCache(maxReadsToHoldInMemory);
}

Expand Down
Expand Up @@ -78,20 +78,4 @@
* @return the breadth of the band pass gaussian kernel we want for our traversal
*/
public double bandPassSigma() default BandPassActivityProfile.DEFAULT_SIGMA;

/**
* What is the maximum number of reads we're willing to hold in memory per sample
* during the traversal? This limits our exposure to unusually large amounts
* of coverage in the engine.
* @return the maximum number of reads we're willing to hold in memory
*/
public int maxReadsToHoldInMemoryPerSample() default 30000;

/**
* No matter what the per sample value says, we will never hold more than this
* number of reads in memory at any time. Provides an upper bound on the total number
* of reads in the case where we have a lot of samples.
* @return the maximum number of reads to hold in memory
*/
public int maxReadsToHoldTotal() default 10000000;
}
Expand Up @@ -108,6 +108,24 @@ public abstract class ActiveRegionWalker<MapType, ReduceType> extends Walker<Map
@Argument(fullName="bandPassSigma", shortName="bandPassSigma", doc="The sigma of the band pass filter Gaussian kernel; if not provided defaults to Walker annotated default", required = false)
public Double bandPassSigma = null;

/**
* What is the maximum number of reads we're willing to hold in memory per sample
* during the traversal? This limits our exposure to unusually large amounts
* of coverage in the engine.
*/
@Advanced
@Argument(fullName="maxReadsInMemoryPerSample", shortName="maxReadsInMemoryPerSample", doc="Maximum reads per sample given to traversal map() function", required = false)
public int maxReadsInMemoryPerSample = 30000;

/**
* What is the maximum number of reads we're willing to hold in memory per sample
* during the traversal? This limits our exposure to unusually large amounts
* of coverage in the engine.
*/
@Advanced
@Argument(fullName="maxTotalReadsInMemory", shortName="maxTotalReadsInMemory", doc="Maximum total reads given to traversal map() function", required = false)
public int maxTotalReadsInMemory = 10000000;

/*
* For active region limits in ActivityProfile
* */
Expand Down

0 comments on commit 3a80156

Please sign in to comment.