Package imp

Class StateProbsFactory

java.lang.Object
imp.StateProbsFactory

public class StateProbsFactory extends Object

Class StateProbsFactory stores HMM state probabilities that that can be used to imputed impute missing HMM state probabilities using linear interpolation.

Instances of class StateProbsFactory are not thread-safe.

  • Constructor Summary

    Constructors
    Constructor
    Description
    StateProbsFactory(int nTargMarkers)
    Creates an StateProbsFactory instance from the specified data.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the number of target marker.
    stateProbs(int targHap, int nStates, int[][] hapIndices, float[][] stateProbs)
    Stores the reference haplotypes and state probabilities that will be used to imputed missing state probabilities using linear interpolation.

    Methods inherited from class java.lang.Object

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

    • StateProbsFactory

      public StateProbsFactory(int nTargMarkers)
      Creates an StateProbsFactory instance from the specified data.
      Parameters:
      nTargMarkers - the number of target markers
      Throws:
      IllegalArgumentException - if nTargMarkers <= 0
  • Method Details

    • nTargMarkers

      public int nTargMarkers()
      Returns the number of target marker.
      Returns:
      the number of target marker
    • stateProbs

      public StateProbs stateProbs(int targHap, int nStates, int[][] hapIndices, float[][] stateProbs)
      Stores the reference haplotypes and state probabilities that will be used to imputed missing state probabilities using linear interpolation. If a HMM state probability at a marker or the following marker are greater than or equal to Math.min(0.005f, 1.0f/nStates), then the reference haplotype, the state probability at the marker, and the state probability at the succeeding marker are stored.
      Parameters:
      targHap - a target data haplotype index
      nStates - the number of HMM states at each marker
      hapIndices - the reference haplotype indices corresponding to each state at each marker
      stateProbs - the HMM state probabilities at each marker
      Returns:
      the state probabilities
      Throws:
      IllegalArgumentException - if hapIndices.length != this.nTargMarkers()
      IllegalArgumentException - if stateProbs.length != this.nTargMarkers()
      IndexOutOfBoundsException - if there exists j satisfying (0 <= j && j <= this.nTargMarkers()) such that (hapIndices[j].length < nStates || stateProbs[j].length < nStates)
      NullPointerException - if hapIndices == null || stateProbs == null
      NullPointerException - if there exists j satisfying (0 <= j && j <= this.nTargMarkers()) such that (hapIndices[j] == null || stateProbs[j] == null)