next up previous
Next: Multiple Alignment with Profile Up: Profile Alignment Previous: Aligning Sequences to a

   
Forward and Backward Probabilities for a Profile HMM

In the previous section we modeled the problem of aligning a string to a profile. As with general HMMs, the main problem is to assign meaningful values to the transition and emission probabilities to a profile HMM. It is possible to use the Baum-Welch algorithm for training the model probabilities, but it remains to show how to compute the forward and backward probabilities needed for the algorithm.
Given a string $X=(x_{1},\ldots,x_{m})$ we define: Computing the Forward Probabilities:
1.
Initialization:

fbegin(0) = 1 (6.52)

2.
Recursion:

\begin{displaymath}\begin{split}
f_{j}^{M}(i) = e_{M_{j}}(x_{i}) \, \cdot \,
...
...\
&f^{D}_{j-1}(i-1)\cdot a_{D_{j-1},M_{j}}]
\end{split}
\end{displaymath} (6.53)


\begin{displaymath}\begin{split}
f^{I}_{j}(i) = e_{I_{j}}(x_{i}) \, \cdot \,
...
...}}+\\
&f^{D}_{j}(i-1)\cdot a_{D_{j},I_{j}}]
\end{split}
\end{displaymath} (6.54)


\begin{displaymath}\begin{split}
f^{D}_{j}(i) = \; &f^{M}_{j-1}(i)\cdot a_{M_{...
...}+\\
&f^{D}_{j-1}(i)\cdot a_{D_{j-1},D_{j}}
\end{split}
\end{displaymath} (6.55)

Computing the Backward Probabilities:
1.
Initialization:

bML(m) = aML,end (6.56)


bIL(m) = aIL,end (6.57)


bDL(m) = aDL,end (6.58)

2.
Recursion:

\begin{displaymath}\begin{split}
b_{j}^{M}(i) = \; &b^{M}_{j+1}(i+1)\cdot a_{M...
...+ \\
&b^{D}_{j+1}(i)\cdot a_{M_{j},D_{j+1}}
\end{split}
\end{displaymath} (6.59)


\begin{displaymath}\begin{split}
b^{I}_{j}(i) = \; &b^{M}_{j+1}(i+1)\cdot a_{I...
...)+\\
&b^{D}_{j+1}(i)\cdot a_{I_{j},D_{j+1}}
\end{split}
\end{displaymath} (6.60)


\begin{displaymath}\begin{split}
b^{D}_{j}(i) = \; &b^{M}_{j+1}(i+1)\cdot a_{D...
...)+\\
&b^{D}_{j+1}(i)\cdot a_{D_{j},D_{j+1}}
\end{split}
\end{displaymath} (6.61)






next up previous
Next: Multiple Alignment with Profile Up: Profile Alignment Previous: Aligning Sequences to a
Itshack Pe`er
1999-01-24