Package phase

Class EstPhase


  • public final class EstPhase
    extends java.lang.Object

    Class EstPhase stores input genotype data and the current estimated phased genotypes for each target sample.

    Instances of class EstPhase are thread-safe.

    • Constructor Summary

      Constructors 
      Constructor Description
      EstPhase​(FixedPhaseData fpd, long seed)
      Constructs a new EstPhase instance from the specified data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FixedPhaseData fpd()
      Returns the input data for phasing that is the same in each iteration.
      SamplePhase get​(int sample)
      Return the estimated phase for the specified sample.
      XRefGT phasedHaps()
      Returns the current estimated phased genotypes for the target samples.
      void set​(int sample, SamplePhase samplePhase)
      Sets the specified phased genotypes for the specified sample.
      BitArrayRefGTRec[] toGTRecs()
      Returns the current estimated phased genotypes for the target samples.
      • Methods inherited from class java.lang.Object

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

      • EstPhase

        public EstPhase​(FixedPhaseData fpd,
                        long seed)
        Constructs a new EstPhase instance from the specified data.
        Parameters:
        fpd - the input data for phasing
        seed - the seed for random number generation
        Throws:
        java.lang.NullPointerException - if fpd == null
    • Method Detail

      • fpd

        public FixedPhaseData fpd()
        Returns the input data for phasing that is the same in each iteration.
        Returns:
        the input data for phasing that is the same in each iteration
      • set

        public void set​(int sample,
                        SamplePhase samplePhase)
        Sets the specified phased genotypes for the specified sample.
        Parameters:
        sample - the sample index
        samplePhase - the estimated phased genotypes
        Throws:
        java.lang.IndexOutOfBoundsException - if sample < 0 || sample >= this.fpd().stage1TargGT().nSamples()
        java.lang.NullPointerException - if samplePhase == null
      • get

        public SamplePhase get​(int sample)
        Return the estimated phase for the specified sample.
        Parameters:
        sample - a sample index
        Returns:
        the estimated phase for the specified sample
        Throws:
        java.lang.IndexOutOfBoundsException - if sample < 0 || sample >= this.fpd().targGT().nSamples()
      • phasedHaps

        public XRefGT phasedHaps()
        Returns the current estimated phased genotypes for the target samples.
        Returns:
        the current estimated phased genotypes for the target samples
      • toGTRecs

        public BitArrayRefGTRec[] toGTRecs()
        Returns the current estimated phased genotypes for the target samples.
        Returns:
        the current estimated phased genotypes for the target samples