Interface StatePath

  • All Superinterfaces:
    Alignment, Changeable, SymbolList
    All Known Implementing Classes:
    SimpleStatePath

    public interface StatePath
    extends Alignment
    Extends the Alignment interface so that it is explicitly used to represent a state path through an HMM, and the associated emitted sequence and likelihoods.

    A state path should have the following structure: STATES -> list of all states used by the machine
    SCORES -> list of step-wise scores for each state (transition + emission)
    SEQUENCE -> sequence emitted by the machine
    The sequence emitted by the machine will be some function of the sequences that were aligned to the machine, and the state-path taken. Whenever the state used is a non-emitting state, this emitted sequence is a gap. Whenever it is an emission state, it is the symbol matched by that state. This is modeled by the following nesting:

     SEQUENCE
       -> Gapped view (gap inserted for every position aligned with a dot-state
         -> Sequence emitted by emission states as Alignment
           label_n = input_SymbolList_n
             -> gapped view of SymbolList_n
     
    A multi-head HMM (2 or more) emits a single sequence that is an alignment of the input sequences with gaps added. In this case, the emitted sequence should be an Alignment object with labels being the input sequences, and the associated SymbolList objects being gapped views. For the sake of least-suprise, single-head HMMs should emit an alignment of one sequence, where the label is the input sequence, and the associated SymbolList is also the input sequence.

    I think that this scheme keeps the emitted alignment as close as possible to a sensible path through the sequence coordinate space, while making this gappable adapts this to the same co-ordinate system as the HMM state-path space.

    Author:
    Matthew Pocock
    • Field Detail

      • SEQUENCE

        static final Object SEQUENCE
        Alignment label for the emitted sequence.
      • STATES

        static final Object STATES
        Alignment label for the state path.
      • SCORES

        static final Object SCORES
        Alignment label for the likelyhood at each step.
    • Method Detail

      • getScore

        double getScore()
        Return the overall score for this state-path and it's emissions.
        Returns:
        the score