Package imp

Interface StateProbs


  • public interface StateProbs

    Class StateProbs stores a subset of Li and Stephens HMM states and associated probabilities for a target haplotype.

    All instances of interface StateProbs are required to be immutable.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int nStates​(int targMarker)
      Returns the number of stored HMM states at the specified target marker.
      int nTargMarkers()
      Returns the number of target markers.
      float probs​(int targMarker, int index)
      Returns the probability of the specified state at the specified target marker.
      float probsP1​(int targMarker, int index)
      Returns the probability of the specified state at the marker following the specified target marker.
      int refHap​(int targMarker, int index)
      Returns the specified reference haplotype index.
      int targHap()
      Returns the target haplotype index.
    • Method Detail

      • targHap

        int targHap()
        Returns the target haplotype index.
        Returns:
        the target haplotype index
      • nTargMarkers

        int nTargMarkers()
        Returns the number of target markers.
        Returns:
        the number of target markers
      • nStates

        int nStates​(int targMarker)
        Returns the number of stored HMM states at the specified target marker.
        Parameters:
        targMarker - a target marker index
        Returns:
        the number of stored HMM states at the specified target marker
        Throws:
        java.lang.IndexOutOfBoundsException - if marker < 0 || marker >= this.nTargMarkers()
      • refHap

        int refHap​(int targMarker,
                   int index)
        Returns the specified reference haplotype index.
        Parameters:
        targMarker - a target marker index
        index - a stored state index at the specified target marker
        Returns:
        the specified reference haplotype index
        Throws:
        java.lang.IndexOutOfBoundsException - if targMarker < 0 || targMarker >= this.nTargMarkers()
        java.lang.IndexOutOfBoundsException - if index < 0 || index >= this.nStates(targMarker)
      • probs

        float probs​(int targMarker,
                    int index)
        Returns the probability of the specified state at the specified target marker.
        Parameters:
        targMarker - a target marker index
        index - a stored state index
        Returns:
        the probability of the specified state at the specified target marker
        Throws:
        java.lang.IndexOutOfBoundsException - if targMarker < 0 || targMarker >= this.nTargMarkers()
        java.lang.IndexOutOfBoundsException - if index < 0 || index >= this.nStates(targMarker)
      • probsP1

        float probsP1​(int targMarker,
                      int index)
        Returns the probability of the specified state at the marker following the specified target marker. If (targMarker + 1 == this.nTargMarkers()), the probability of the specified state at the specified target marker is returned.
        Parameters:
        targMarker - a target marker index
        index - a stored state index
        Returns:
        the probability of the specified state at the marker following the specified target marker
        Throws:
        java.lang.IndexOutOfBoundsException - if targMarker < 0 || targMarker >= this.nTargMarkers()
        java.lang.IndexOutOfBoundsException - if index < 0 || index >= this.nStates(targMarker)