Package Imputers

Class KnniLDProb

  • All Implemented Interfaces:
    Imputer

    public class KnniLDProb
    extends java.lang.Object
    implements Imputer
    Class to perform standard LD-kNNi imputation using probabilities
    • Constructor Summary

      Constructors 
      Constructor Description
      KnniLDProb​(int k, int l, int knownDepth)
      Creates an object to perform LD-kNNi with given values of k and l.
      KnniLDProb​(org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> params)
      Constructor from a config (read in from a XML file)
    • 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 imputer
      double[][][] impute​(double[][][] callprobs, int[][][] readCounts)
      Imputes a genotype table
      java.util.List<SingleGenotypeProbability> impute​(double[][][] callprobs, int[][][] readCounts, java.util.List<SingleGenotypeProbability> maskedprobs, java.util.List<SingleGenotypeMasked> list)
      Imputes a list of genotypes.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KnniLDProb

        public KnniLDProb​(int k,
                          int l,
                          int knownDepth)
        Creates an object to perform LD-kNNi with given values of k and l.
        Parameters:
        k - The value of k to be used
        l - The value of l to be used
        knownDepth - At depths at or above this no imputation is done and the imputed probability is the same as the called probability
      • KnniLDProb

        public KnniLDProb​(org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> params)
        Constructor from a config (read in from a XML file)
        Parameters:
        params - The config
    • Method Detail

      • impute

        public double[][][] impute​(double[][][] callprobs,
                                   int[][][] readCounts)
        Description copied from interface: Imputer
        Imputes a genotype table
        Specified by:
        impute in interface Imputer
        Parameters:
        callprobs - Genotype probabilities (from a caller)
        readCounts - Read counts for each genotype
        Returns:
        Table of imputed genotype probabilities
      • impute

        public java.util.List<SingleGenotypeProbability> impute​(double[][][] callprobs,
                                                                int[][][] readCounts,
                                                                java.util.List<SingleGenotypeProbability> maskedprobs,
                                                                java.util.List<SingleGenotypeMasked> list)
        Description copied from interface: Imputer
        Imputes a list of genotypes. Used to calculate accuracy. Need both unmasked probs (probs) and masked probs (maskedprobs) so that the calculation for each genotype is independent (i.e. using the full reads for the other masked genotypes if they're used in the imputation calculation).
        Specified by:
        impute in interface Imputer
        Parameters:
        callprobs - Genotype probabilities (from a caller)
        readCounts - Read counts for each genotype
        maskedprobs - Genotype probabilities (from a caller) using masked reads
        list - List of genotypes to impute
        Returns:
        List of imputed genotype probabilities
      • getConfig

        public org.apache.commons.configuration2.tree.ImmutableNode getConfig()
        Description copied from interface: Imputer
        Get the config for the imputer
        Specified by:
        getConfig in interface Imputer
        Returns:
        The config