Package phase

Class CodedSteps


  • public class CodedSteps
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      CodedSteps​(EstPhase estPhase)
      Constructs a new CodedSteps instance from the specified data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      XRefGT allHaps()
      Return the phased target and reference genotype data that was used to construct this CodedSteps instance.
      IndexArray get​(int step)
      Returns a map from haplotype index to allele sequence index for the specified step
      java.util.Optional<XRefGT> refHaps()
      Returns the reference haplotypes
      Steps steps()
      Returns the partition of the markers into non-overlapping intervals.
      Samples targSamples()
      Returns the target samples.
      • Methods inherited from class java.lang.Object

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

      • 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:
        java.lang.NullPointerException - if estPhase == null
    • Method Detail

      • 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:
        java.lang.IllegalArgumentException - if step < 0 || step >= this.steps().size()
      • targSamples

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

        public java.util.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