Package Accuracy

Class 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 depth
      DepthMask​(int[][][] depths, int number, int minDepth, int maskTo, Caller caller)
      Masks a given number of genotypes to a given depth
      DepthMask​(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 depths
      DepthMask​(int[][][] depths, int number, int minDepth, ComparableDistribution<java.lang.Integer> maskToDistribution, Caller caller)
      Masks a given number of genotypes to a given depth
    • 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 counts
        number - The number of genotypes to mask
        minDepth - Only mask genotypes with more than this read depth
        maskTo - Mask to read depth
        caller - 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 counts
        number - The number of genotypes to mask
        minDepth - Only mask genotypes with more than this read depth
        maskTo - Mask to read depth
        method - The method to be used to mask genotypes
        caller - 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 counts
        number - The number of genotypes to mask
        minDepth - Only mask genotypes with more than this read depth
        caller - The genotype caller
        maskToDistribution - 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 counts
        number - The number of genotypes to mask
        minDepth - Only mask genotypes with more than this number of reads
        maskToDistribution - Mask to this distribution of read depths
        method - The method to be used to mask genotypes
        dontUse - A list of genotypes not to use for masking
        caller - 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