. Class 8: Pair HMMs
FSA HHMs: Why? Advantages: u Obtain reliability of alignment u Explore alternative (sub-optimal) alignments l Score similarity of sequences independent of any specific alignment
FSA HHMs B (+1,+0) A (+1,+1) C (+0,+1) WsWs W g +W s WsWs s(s i,t j ) B q si A p sitj C q tj ε ε 1-ε1-ε 1-ε1-ε δ δ 1-2δ
Affine gap alignment: the full probabilistic model B q si A p sitj C q tj ε 1-ε-τ1-ε-τ δ δ 1-2δ-τ 1-ε-τ1-ε-τ δ τ τ τ τ Begin End 1-2δ-τ δ ε
Affine Weight Model – DP B (+1,+0) A (+1,+1) C (+0,+1) WsWs W g +W s WsWs s(s i,t j )
Viterbi in Pair-HMM u Finding the most probable sequence of hidden states is exactly the global sequence alignment B q si A p sitj C q tj ε 1-ε-τ1-ε-τ δ δ 1-2δ-τ 1-ε-τ1-ε-τ δ τ τ τ τ Begin End 1-2δ-τ δ ε
Viterbi in Pair-HMM Initial condition: Optimal alignment: B q si A p sitj C q tj ε 1-ε-τ1-ε-τ δ δ 1-2δ-τ 1-ε-τ1-ε-τ δ τ τ τ τ Begin End 1-2δ-τ δ ε
Pair-HMM for random model s q si t q tj η η 1-η η η 1-η1-η BeginEnd
Pair-HMM for local alignment Rs 1 q si Rt 1 q tj 1-η η η η η Begin B q si A p sitj C q tj ε 1-ε-τ1-ε-τ δ δ 1-2δ-τ 1-ε-τ1-ε-τ δ τ τ τ τ δ ε 1-η Rs 2 q si Rt 2 q tj 1-η η η η η End
The full probability: P(s,t) Use the “forward” algorithm: The posterior probability:
Suboptimal alignments Suboptimal alignments: alignments with nearly the same score as the best alignment l Only slightly different from the optimal alignment l Substantially or completely different
Probabilistic sampling From the forward algorithm: Choose the next step to be:
Probabilistic sampling – example
Distinct suboptimal alignments Waterman and Eggert [1987]
The posterior probability