Package imp

Class ImpStates

java.lang.Object
imp.ImpStates

public final class ImpStates extends Object

Class ImpStates identifies a list of pseudo-reference haplotypes for a target haplotype. Each pseudo-reference haplotype is a one-dimensional mosaic of reference haplotype segments.

Instances of ImpStates are not thread-safe.

  • Constructor Summary

    Constructors
    Constructor
    Description
    ImpStates(ImpIbs ibsHaps)
    Constructs a new ImpStates object from the specified data.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    ibsStates(int targHap, int[][] haps, boolean[][] alMatch)
    Stores the reference haplotype for the j-th state at the m-th marker in hapIndices[m][j], and stores the equality of the allele carried by the reference haplotype for the j-th state and the allele carried by the target haplotype at the m-th marker in alMatch[m][j].
    int
    Returns the maximum number of HMM states at a marker.

    Methods inherited from class java.lang.Object

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

    • ImpStates

      public ImpStates(ImpIbs ibsHaps)
      Constructs a new ImpStates object from the specified data.
      Parameters:
      ibsHaps - the IBS haplotype segments
      Throws:
      NullPointerException - if ibsHaps == null
  • Method Details

    • maxStates

      public int maxStates()
      Returns the maximum number of HMM states at a marker.
      Returns:
      the maximum number of HMM states at a marker
    • ibsStates

      public int ibsStates(int targHap, int[][] haps, boolean[][] alMatch)
      Stores the reference haplotype for the j-th state at the m-th marker in hapIndices[m][j], and stores the equality of the allele carried by the reference haplotype for the j-th state and the allele carried by the target haplotype at the m-th marker in alMatch[m][j]. The number of HMM states states at each marker is returned.
      Parameters:
      targHap - the haplotype index
      haps - the two-dimensional array in which reference haplotype indices for each HMM state will be stored
      alMatch - the two-dimensional array in which allele match status between the target haplotype and HMM state will be stored
      Returns:
      the number of HMM states at each marker
      Throws:
      IndexOutOfBoundsException - if targHap < 0 || targHap >= this.impData().nTargHaps()
      IndexOutOfBoundsException - if either two-dimensional array is not large enough to contain the rectangular array of HMM states
      NullPointerException - if any array is null