Package phase

Class ParamEstimates


  • public class ParamEstimates
    extends java.lang.Object

    Class ParamEstimates estimates the allele mismatch probability and the recombination intensity for a haploid Li and Stephens hidden Markov model.

    Instances of class ParamEstimates are thread-safe.

    • Constructor Summary

      Constructors 
      Constructor Description
      ParamEstimates()
      Constructs a new ParamEstimates instance for the specified data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addMismatchData​(int markerCnt, double pMismatchSum)
      Records the specified allele mismatch data if markerCnt and pMismatchSum are finite positive values.
      void addSwitchData​(double genDistances, double switchProbs)
      Records the specified genetic distance and switch probability if genDistances and switchProbs are finite positive values.
      void clear()
      Clears all data that has been added via the this.addMismatchData and this.addSwitchData() methods.
      float pMismatch()
      Returns the estimated allele mismatch rate.
      float recombIntensity()
      Returns the estimated recombination intensities.
      • Methods inherited from class java.lang.Object

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

      • ParamEstimates

        public ParamEstimates()
        Constructs a new ParamEstimates instance for the specified data.
    • Method Detail

      • addMismatchData

        public void addMismatchData​(int markerCnt,
                                    double pMismatchSum)
        Records the specified allele mismatch data if markerCnt and pMismatchSum are finite positive values.
        Parameters:
        markerCnt - the number of markers with mismatch data
        pMismatchSum - the sum of estimated allele mismatch probabilities
      • addSwitchData

        public void addSwitchData​(double genDistances,
                                  double switchProbs)
        Records the specified genetic distance and switch probability if genDistances and switchProbs are finite positive values.
        Parameters:
        genDistances - the list of genetic distance
        switchProbs - the list of haplotype switch probabilities
      • pMismatch

        public float pMismatch()
        Returns the estimated allele mismatch rate. Returns Float.NaN if there is no data to estimate the allele mismatch rate. The returned value is not an atomic snapshot. Invocation in the absence of concurrent update will return an accurate result, but concurrent updates that occur white the sum is being calculated might not be incorporated in the returned result.
        Returns:
        the estimated allele mismatch rate
      • recombIntensity

        public float recombIntensity()
        Returns the estimated recombination intensities. Returns Float.NaN if there is no data from which to estimate recombination intensities. The returned value is NOT an atomic snapshot. An accurate result is guaranteed only if no concurrent updates occur during method invocation.
        Returns:
        the estimated recombination intensities
      • clear

        public void clear()
        Clears all data that has been added via the this.addMismatchData and this.addSwitchData() methods.