Package phase

Class HmmParamData


  • public class HmmParamData
    extends java.lang.Object

    Class HmmParamData generates data for estimating allele mismatch and recombination intensity parameters for a haploid Li and Stephens hidden Markov model.

    Instances of class HmmParamData are not thread-safe.

    • Constructor Summary

      Constructors 
      Constructor Description
      HmmParamData​(PbwtPhaseIbs phaseIbs)
      Creates a HmmParamData instance for the specified data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addEstimationData​(ParamEstimates paramEst)
      Adds the generated data for estimating allele mismatch and recombination intensity parameters to the specified object.
      int nTargSamples()
      Returns the number of target samples.
      double sumSwitchProbs()
      Returns the sum of the probabilities of switching reference haplotypes between consecutive markers obtained from the generated data.
      void update​(int sample)
      Uses the specified sample to generate data for estimating the allele mismatch and recombination intensity HMM parameters.
      • Methods inherited from class java.lang.Object

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

      • HmmParamData

        public HmmParamData​(PbwtPhaseIbs phaseIbs)
        Creates a HmmParamData instance for the specified data.
        Parameters:
        phaseIbs - the IBS haplotype segments
        Throws:
        java.lang.NullPointerException - if phaseIbs == null
    • Method Detail

      • nTargSamples

        public int nTargSamples()
        Returns the number of target samples.
        Returns:
        the number of target samples
      • addEstimationData

        public void addEstimationData​(ParamEstimates paramEst)
        Adds the generated data for estimating allele mismatch and recombination intensity parameters to the specified object. The generated data is not cleared.
        Parameters:
        paramEst - the object that estimates model parameters
        Throws:
        java.lang.NullPointerException - if paramEst == null
      • sumSwitchProbs

        public double sumSwitchProbs()
        Returns the sum of the probabilities of switching reference haplotypes between consecutive markers obtained from the generated data.
        Returns:
        the sum of the probabilities of switching reference haplotypes between consecutive markers obtained from the generated data
      • update

        public void update​(int sample)
        Uses the specified sample to generate data for estimating the allele mismatch and recombination intensity HMM parameters.
        Parameters:
        sample - a sample index
        Throws:
        java.lang.IndexOutOfBoundsException - if sample < 0 || sample >= this.nTargSamples()