Package Executable

Class Case


  • public class Case
    extends java.lang.Object
    Represent the LinkImputeR inputs for a single case (filters, caller, imputer and combiner)
    • Constructor Detail

      • Case

        public Case​(java.lang.String name,
                    java.util.List<VCFFilter> filters,
                    Caller caller,
                    ImputationOption imputer,
                    CombinerOption combiner,
                    PrintStats print,
                    java.lang.String additional)
        Constructor
        Parameters:
        name - The name of the case
        filters - The filters to be applied
        caller - The caller to use
        imputer - The imputer options
        combiner - The combiner options
        print - The stats printing options
        additional - Additional string to be used in output (currently used to show minimum read depth)
      • Case

        public Case​(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

      • applyFilters

        public void applyFilters​(VCF vcf)
                          throws VCFDataException
        Apply the filters of this case to a VCF
        Parameters:
        vcf - The VCF
        Throws:
        VCFDataException - If there is a problem with the data in the VCF
      • getCaller

        public Caller getCaller()
        Get the caller for this case
        Returns:
        The caller
      • getImputer

        public Imputer getImputer​(double[][][] original,
                                  int[][][] readCounts,
                                  java.util.List<SingleGenotypeProbability> maskedprobs,
                                  java.util.List<SingleGenotypeMasked> list)
        Get the imputer for this case. If the case imputer is optimizable return an optimized version else return the imputer
        Parameters:
        original - The called genotype probabilities
        readCounts - The read counts
        maskedprobs - The masked genotype probabilities
        list - List of masked positions
        Returns:
        The imputer
      • getImputer

        public Imputer getImputer()
        Get the imputer for this case if it doesn't require optimizing, else throw an error
        Returns:
        The imputer
      • getCombiner

        public Combiner getCombiner​(java.util.List<SingleGenotypeProbability> called,
                                    java.util.List<SingleGenotypeProbability> imputed,
                                    java.util.List<SingleGenotypeReads> reads,
                                    java.util.List<SingleGenotypeCall> correct,
                                    java.util.List<SingleGenotypeMasked> masked)
        Get the combiner for this case. If the case combiner is optimizable return an optimized version else return the imputer
        Parameters:
        called - The called genotype probabilities
        imputed - The imputed genotype probabilities
        reads - The read counts
        correct - The correct genotypes
        masked - A list of masked genotypes
        Returns:
        The combiner
      • getCombiner

        public Combiner getCombiner()
        Get the combiner for this case if it doesn't require optimizing, else throw an error
        Returns:
        The combiner
      • getPrintStats

        public PrintStats getPrintStats()
        Get the PrintStats object for this case
        Returns:
        The print stats object
      • getName

        public java.lang.String getName()
        Get the name of this case
        Returns:
        The name
      • getFilterSummary

        public java.lang.String getFilterSummary()
        Get a summary of filters used in this case
        Returns:
        The summary
      • getAdditional

        public java.lang.String getAdditional()
        Get the additional information for this case
        Returns:
        The additional information
      • getConfig

        public org.apache.commons.configuration2.tree.ImmutableNode getConfig()
        Get the config for this case
        Returns:
        The config
      • getImputeConfig

        public org.apache.commons.configuration2.tree.ImmutableNode getImputeConfig​(Caller caller,
                                                                                    Imputer imputer,
                                                                                    Combiner combiner)
        Get the final imputation stage config for this case
        Parameters:
        caller - The caller to be used in the final imputation stage
        imputer - The optimized imputer to be used in the final imputation stage
        combiner - The optimized combiner to be used in the final imputation stage
        Returns:
        The config