Package Accuracy
Class DepthMaskFactory
- java.lang.Object
-
- Accuracy.DepthMaskFactory
-
public class DepthMaskFactory extends java.lang.Object
Utility class for easily creating multiple DepthMasks with the same parameters
-
-
Constructor Summary
Constructors Constructor Description DepthMaskFactory(int number, int minDepth, int limitDist, DepthMask.Method method)
Default constructorDepthMaskFactory(org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> params)
Creates the factory from the given configuration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.commons.configuration2.tree.ImmutableNode
getConfig()
Get the config for the factoryDepthMask
getDepthMask(int[][][] readCounts, Caller caller)
Get a depth maskDepthMask
getDepthMask(int[][][] readCounts, java.util.List<SingleGenotypePosition> dontUse, Caller caller)
Get a depth mask
-
-
-
Constructor Detail
-
DepthMaskFactory
public DepthMaskFactory(int number, int minDepth, int limitDist, DepthMask.Method method)
Default constructor- Parameters:
number
- The number of genotypes to makes reads fromminDepth
- Only mask genotypes with a greater read depth than thislimitDist
- The distribution to mask the reads tomethod
- The method to be used to select genotypes to be masked
-
DepthMaskFactory
public DepthMaskFactory(org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> params)
Creates the factory from the given configuration- Parameters:
params
- The configuration
-
-
Method Detail
-
getDepthMask
public DepthMask getDepthMask(int[][][] readCounts, java.util.List<SingleGenotypePosition> dontUse, Caller caller) throws NotEnoughMaskableGenotypesException
Get a depth mask- Parameters:
readCounts
- The reads to maskdontUse
- A list of genotypes not to maskcaller
- The genotype caller to use- Returns:
- A depth mask
- Throws:
NotEnoughMaskableGenotypesException
- If there is not enough maskable genotypes
-
getDepthMask
public DepthMask getDepthMask(int[][][] readCounts, Caller caller) throws NotEnoughMaskableGenotypesException
Get a depth mask- Parameters:
readCounts
- The reads to maskcaller
- The genotype caller to use- Returns:
- A depth mask
- Throws:
NotEnoughMaskableGenotypesException
- If there is not enough maskable genotypes
-
getConfig
public org.apache.commons.configuration2.tree.ImmutableNode getConfig()
Get the config for the factory- Returns:
- The config
-
-