Package imp

Class StateProbsFactory


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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int nTargMarkers()
      Returns the number of target marker.
      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.
      • Methods inherited from class java.lang.Object

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

      • StateProbsFactory

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

      • 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:
        java.lang.IllegalArgumentException - if hapIndices.length != this.nTargMarkers()
        java.lang.IllegalArgumentException - if stateProbs.length != this.nTargMarkers()
        java.lang.IndexOutOfBoundsException - if there exists j satisfying (0 <= j && j <= this.nTargMarkers()) such that (hapIndices[j].length < nStates || stateProbs[j].length < nStates)
        java.lang.NullPointerException - if hapIndices == null || stateProbs == null
        java.lang.NullPointerException - if there exists j satisfying (0 <= j && j <= this.nTargMarkers()) such that (hapIndices[j] == null || stateProbs[j] == null)