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