Package phase

Class CodedSteps

java.lang.Object
phase.CodedSteps

public class CodedSteps extends Object

Class CodedSteps divides phased genotype data into non-overlapping intervals (the steps), indexes the unique allele sequences in each interval, and stores a map of haplotype index to allele sequence index for each interval.

Instances of class CodedSteps are immutable.

  • Constructor Details

    • CodedSteps

      public CodedSteps(EstPhase estPhase)
      Constructs a new CodedSteps instance from the specified data.
      Parameters:
      estPhase - the input data genotype phasing and the current phase estimate for each target sample
      Throws:
      NullPointerException - if estPhase == null
  • Method Details

    • get

      public IndexArray get(int step)
      Returns a map from haplotype index to allele sequence index for the specified step
      Parameters:
      step - a step index
      Returns:
      a map from haplotype index to allele sequence index for the specified step
      Throws:
      IllegalArgumentException - if step < 0 || step >= this.steps().size()
    • targSamples

      public Samples targSamples()
      Returns the target samples.
      Returns:
      the target samples
    • refHaps

      public Optional<XRefGT> refHaps()
      Returns the reference haplotypes
      Returns:
      the reference haplotypes
    • allHaps

      public XRefGT allHaps()
      Return the phased target and reference genotype data that was used to construct this CodedSteps instance. The target haplotypes precede the reference haplotypes.
      Returns:
      the phased target and reference genotype data
    • steps

      public Steps steps()
      Returns the partition of the markers into non-overlapping intervals.
      Returns:
      the partition of the markers into non-overlapping intervals