Package phase

Class RecombRegress


  • public class RecombRegress
    extends java.lang.Object

    Class RecombRegress uses linear regression to estimate the recombination factor for a haploid Li and Stephens hidden Markov model.

    Instances of class RecombRegress are not thread-safe.

    • Constructor Summary

      Constructors 
      Constructor Description
      RecombRegress​(PhaseIbs phaseIbs, Regress regress)
      Creates a RecombRegress instance for the specified data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      PhaseData phaseData()
      Returns the current input data for genotype phasing.
      double sumY()
      Returns the sum of the probabilities of switching reference haplotypes between consecutive markers stored by this.update().
      void update​(int sample)
      Stores regression data for regressing the probability of switching reference haplotypes between consecutive markers on genetic distance for the specified sample.
      • Methods inherited from class java.lang.Object

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

      • RecombRegress

        public RecombRegress​(PhaseIbs phaseIbs,
                             Regress regress)
        Creates a RecombRegress instance for the specified data.
        Parameters:
        phaseIbs - the IBS haplotype segments
        regress - the object for storing data for regressing the probability of switching reference haplotypes between consecutive markers on genetic distance
        Throws:
        java.lang.NullPointerException - if (phaseIBS == null || regress == null)
    • Method Detail

      • phaseData

        public PhaseData phaseData()
        Returns the current input data for genotype phasing.
        Returns:
        the current input data for genotype phasing
      • update

        public void update​(int sample)
        Stores regression data for regressing the probability of switching reference haplotypes between consecutive markers on genetic distance for the specified sample.
        Parameters:
        sample - a sample index
        Throws:
        java.lang.IndexOutOfBoundsException - if sample < 0 || sample >= phaseData().targGT().nSamples()
      • sumY

        public double sumY()
        Returns the sum of the probabilities of switching reference haplotypes between consecutive markers stored by this.update().
        Returns:
        the sum of the probabilities of switching reference haplotypes between consecutive markers