Package phase

Class HmmParamData

java.lang.Object
phase.HmmParamData

public class HmmParamData extends 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
    Creates a HmmParamData instance for the specified data.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds the generated data for estimating allele mismatch and recombination intensity parameters to the specified object.
    int
    Returns the number of target samples.
    double
    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 Details

    • HmmParamData

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

    • 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:
      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:
      IndexOutOfBoundsException - if sample < 0 || sample >= this.nTargSamples()