. Class 5: HMMs and Profile HMMs
Review of HMM u Hidden Markov Models l Probabilistic models of sequences u Consist of two parts: l Hidden states These act like a stochastic automata l Observations These are determined (stochastically) by the hidden state
Example Possible Sequence: 1: 1/6 2: 1/6 3: 1/6 4: 1/6 5: 1/6 6: 1/6 1: 1/10 2: 1/10 3: 1/10 4: 1/10 5: 1/10 6: 1/ Begin Fair Loaded 1.0
Hidden Markov Models Two components: A Markov chain of hidden states H 1,…,H n with L values P(H i+1 =k |H i =l ) = A kl Observations X 1,…,X n Assumption: X i depends only on hidden state H i l P(X i =a |H i =k ) = B ka
HMM Three aspects: u Representation u Computation l Viterbi algorithm l Forward-Backward algorithm u Learning
Example: pair-HMM u We want to model the joint distribution of two aligned sequences u We start with ungapped alignment AA 0.21 AC 0.01 AG 0.05 AT 0.04 CA 0.02 …. 1.0 Begin Match 1.0
Pair-HMM u This model is equivalent to ungapped models we treated two classes ago u Can we add gaps? AA 0.21 AC 0.01 AG 0.05 AT 0.04 CA 0.02 …. 1.0 Begin Match 1.0
Adding GAP States AA 0.21 AC 0.01 AG 0.05 AT 0.04 CA 0.02 …. 1-2 Match A- 0.2 C- 0.4 G- 0.3 T- 0.1 Gap Y 1- -A 0.2 -C 0.4 -G 0.3 -T 0.1 Gap X 1- Begin
Gapped Alignment What happens if we do not observe skips? u Suppose input is AAT and ATATT Each sequence of hidden states determines an alignment!!
Viterbi in Pair-HMM u Finding most probable sequence of hidden states is exactly global sequence alignment
Scoring Alignments with HMMs u Viterbi finds most probable alignment l The probability of this alignment can be small… u Using HMM algorithm we can compute the probability of generating the two sequences l This sums over all possible alignments of the two strings u Such methods are more sensitive than standard alignment procedures u We can easily extend the pair-HMM for dealing with local alignment