forked from broadinstitute/gatk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make HaplotypeCallerSpark extend AssemblyRegionWalkerSpark (broadins…
…titute#5386) * Factor out command line options for assembly region walkers (Spark) * Make HaplotypeCallerSpark extend AssemblyRegionWalkerSpark, while still allowing ReadsPipelineSpark to share common code.
- Loading branch information
1 parent
56d443d
commit 575b014
Showing
7 changed files
with
336 additions
and
381 deletions.
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
...ain/java/org/broadinstitute/hellbender/engine/spark/AssemblyRegionArgumentCollection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package org.broadinstitute.hellbender.engine.spark; | ||
|
||
import org.broadinstitute.barclay.argparser.Advanced; | ||
import org.broadinstitute.barclay.argparser.Argument; | ||
|
||
import java.io.Serializable; | ||
|
||
public abstract class AssemblyRegionArgumentCollection implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
@Argument(fullName = "minAssemblyRegionSize", shortName = "minAssemblyRegionSize", doc = "Minimum size of an assembly region", optional = true) | ||
public int minAssemblyRegionSize = defaultMinAssemblyRegionSize(); | ||
|
||
@Argument(fullName = "maxAssemblyRegionSize", shortName = "maxAssemblyRegionSize", doc = "Maximum size of an assembly region", optional = true) | ||
public int maxAssemblyRegionSize = defaultMaxAssemblyRegionSize(); | ||
|
||
@Argument(fullName = "assemblyRegionPadding", shortName = "assemblyRegionPadding", doc = "Number of additional bases of context to include around each assembly region", optional = true) | ||
public int assemblyRegionPadding = defaultAssemblyRegionPadding(); | ||
|
||
@Argument(fullName = "maxReadsPerAlignmentStart", shortName = "maxReadsPerAlignmentStart", doc = "Maximum number of reads to retain per alignment start position. Reads above this threshold will be downsampled. Set to 0 to disable.", optional = true) | ||
public int maxReadsPerAlignmentStart = defaultMaxReadsPerAlignmentStart(); | ||
|
||
@Advanced | ||
@Argument(fullName = "activeProbabilityThreshold", shortName = "activeProbabilityThreshold", doc="Minimum probability for a locus to be considered active.", optional = true) | ||
public double activeProbThreshold = defaultActiveProbThreshold(); | ||
|
||
@Advanced | ||
@Argument(fullName = "maxProbPropagationDistance", shortName = "maxProbPropagationDistance", doc="Upper limit on how many bases away probability mass can be moved around when calculating the boundaries between active and inactive assembly regions", optional = true) | ||
public int maxProbPropagationDistance = defaultMaxProbPropagationDistance(); | ||
|
||
/** | ||
* @return Default value for the {@link #minAssemblyRegionSize} parameter, if none is provided on the command line | ||
*/ | ||
protected abstract int defaultMinAssemblyRegionSize(); | ||
|
||
/** | ||
* @return Default value for the {@link #maxAssemblyRegionSize} parameter, if none is provided on the command line | ||
*/ | ||
protected abstract int defaultMaxAssemblyRegionSize(); | ||
|
||
/** | ||
* @return Default value for the {@link #assemblyRegionPadding} parameter, if none is provided on the command line | ||
*/ | ||
protected abstract int defaultAssemblyRegionPadding(); | ||
|
||
/** | ||
* @return Default value for the {@link #maxReadsPerAlignmentStart} parameter, if none is provided on the command line | ||
*/ | ||
protected abstract int defaultMaxReadsPerAlignmentStart(); | ||
|
||
/** | ||
* @return Default value for the {@link #activeProbThreshold} parameter, if none is provided on the command line | ||
*/ | ||
protected abstract double defaultActiveProbThreshold(); | ||
|
||
/** | ||
* @return Default value for the {@link #maxProbPropagationDistance} parameter, if none is provided on the command line | ||
*/ | ||
protected abstract int defaultMaxProbPropagationDistance(); | ||
} |
18 changes: 18 additions & 0 deletions
18
...org/broadinstitute/hellbender/engine/spark/AssemblyRegionReadShardArgumentCollection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.broadinstitute.hellbender.engine.spark; | ||
|
||
import org.broadinstitute.barclay.argparser.Argument; | ||
|
||
import java.io.Serializable; | ||
|
||
public class AssemblyRegionReadShardArgumentCollection implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
public static final int DEFAULT_READSHARD_SIZE = 5000; | ||
public static final int DEFAULT_READSHARD_PADDING_SIZE = 100; | ||
|
||
@Argument(fullName="readShardSize", shortName="readShardSize", doc = "Maximum size of each read shard, in bases. For good performance, this should be much larger than the maximum assembly region size.", optional = true) | ||
public int readShardSize = DEFAULT_READSHARD_SIZE; | ||
|
||
@Argument(fullName="readShardPadding", shortName="readShardPadding", doc = "Each read shard has this many bases of extra context on each side. Read shards must have as much or more padding than assembly regions.", optional = true) | ||
public int readShardPadding = DEFAULT_READSHARD_PADDING_SIZE; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.