Package phase

Class EstPhase

java.lang.Object
phase.EstPhase

public final class EstPhase extends 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 Details

    • 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:
      NullPointerException - if fpd == null
  • Method Details

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