Package Accuracy
Class DepthMask
- java.lang.Object
-
- Accuracy.DepthMask
-
public class DepthMask extends java.lang.Object
Creates a mask where reads for some genotypes are masked to a given depth
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DepthMask.Method
Represents the method to be used to select genotypes to be masked
-
Constructor Summary
Constructors Constructor Description DepthMask(int[][][] depths, int number, int minDepth, int maskTo, DepthMask.Method method, Caller caller)
Masks a given number of genotypes to a given depthDepthMask(int[][][] depths, int number, int minDepth, int maskTo, Caller caller)
Masks a given number of genotypes to a given depthDepthMask(int[][][] depths, int number, int minDepth, ComparableDistribution<java.lang.Integer> maskToDistribution, DepthMask.Method method, java.util.List<SingleGenotypePosition> dontUse, Caller caller)
Masks a given number of genotypes to a given distribution of depthsDepthMask(int[][][] depths, int number, int minDepth, ComparableDistribution<java.lang.Integer> maskToDistribution, Caller caller)
Masks a given number of genotypes to a given depth
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[][][]
maskedArray()
Get an array of masked reads.java.util.List<SingleGenotypeMasked>
maskedList()
Get a list of masked readsjava.util.List<SingleGenotypePosition>
maskedPositions()
Get a list of masked positionsint
size()
Returns the number of genotypes masked
-
-
-
Constructor Detail
-
DepthMask
public DepthMask(int[][][] depths, int number, int minDepth, int maskTo, Caller caller) throws NotEnoughMaskableGenotypesException
Masks a given number of genotypes to a given depth- Parameters:
depths
- The original read countsnumber
- The number of genotypes to maskminDepth
- Only mask genotypes with more than this read depthmaskTo
- Mask to read depthcaller
- The genotype caller- Throws:
NotEnoughMaskableGenotypesException
- If there is not enough maskable genotypes
-
DepthMask
public DepthMask(int[][][] depths, int number, int minDepth, int maskTo, DepthMask.Method method, Caller caller) throws NotEnoughMaskableGenotypesException
Masks a given number of genotypes to a given depth- Parameters:
depths
- The original read countsnumber
- The number of genotypes to maskminDepth
- Only mask genotypes with more than this read depthmaskTo
- Mask to read depthmethod
- The method to be used to mask genotypescaller
- The genotype caller- Throws:
NotEnoughMaskableGenotypesException
- If there is not enough maskable genotypes
-
DepthMask
public DepthMask(int[][][] depths, int number, int minDepth, ComparableDistribution<java.lang.Integer> maskToDistribution, Caller caller) throws NotEnoughMaskableGenotypesException
Masks a given number of genotypes to a given depth- Parameters:
depths
- The original read countsnumber
- The number of genotypes to maskminDepth
- Only mask genotypes with more than this read depthcaller
- The genotype callermaskToDistribution
- Mask to this distribution of read depths- Throws:
NotEnoughMaskableGenotypesException
- If there is not enough maskable genotypes
-
DepthMask
public DepthMask(int[][][] depths, int number, int minDepth, ComparableDistribution<java.lang.Integer> maskToDistribution, DepthMask.Method method, java.util.List<SingleGenotypePosition> dontUse, Caller caller) throws NotEnoughMaskableGenotypesException
Masks a given number of genotypes to a given distribution of depths- Parameters:
depths
- The original read countsnumber
- The number of genotypes to maskminDepth
- Only mask genotypes with more than this number of readsmaskToDistribution
- Mask to this distribution of read depthsmethod
- The method to be used to mask genotypesdontUse
- A list of genotypes not to use for maskingcaller
- The genotype caller- Throws:
NotEnoughMaskableGenotypesException
- If there is not enough maskable genotypes
-
-
Method Detail
-
maskedArray
public int[][][] maskedArray()
Get an array of masked reads. All reads are included, masked where appropriate and unmasked for the other- Returns:
- Array of masked read
-
maskedList
public java.util.List<SingleGenotypeMasked> maskedList()
Get a list of masked reads- Returns:
- List of masked reads
-
maskedPositions
public java.util.List<SingleGenotypePosition> maskedPositions()
Get a list of masked positions- Returns:
- List of positions - one per masked genotype
-
size
public int size()
Returns the number of genotypes masked- Returns:
- The number of masked genotypes
-
-