<p>I know this can be very problem-specific -- but it seemed to me the standard approach to train an HMM to recognize a binding pattern of a protein is to use the multiple sequence alignment (MSA), instead of using Baum Welch. I suspect that this is the case because this is what I saw in the current version of HMMer3, which does not provide a baum-welch training procedure for unaligned sequence.</p>

<p>The thing that I saw training with Baum Welch is that once a HMM is trained, using the Viterbi can give a pattern that contains a lot of insertions in the motif, which doesn't make biological sense. This could be mitigated by using Viterbi training, however, I don't see much literature discussing this as a viable approach.</p>

<p>It'd be appreciated if someone could share their experience on training a profile HMM to finding motifs.</p>

CC BY-SA 4.0
2019-11-02T08:14:39.520Z
A wee caveat about the biological relevance of indels. The alignment step in HMMer3 is done with hmmalign, a local aligner that lacks a flag to change penalties as far as I known. But you can use a different aligner —but no gblocks. If done correctly, MSA indels biologically somewhat correspond to actual indel in the encoding DNA. Generally these are protein loops. And lastly, the gappy regions get really low weights the hmmbuild step, so it does not matter much. So getting too many gaps is a sign one of the sequences may be too different (non-homologous or partially in global alignment).
Matteo Ferla
CC BY-SA 4.0
2019-11-02T14:47:03.180Z
Could you explain why you feel B-W is a better approach? The reason we want MSAs for this is because that lets us use _real_ data. I'm about as math challenged as a professional scientist can be, so I don't pretend to even understand what the B-W algorithm does, but as a biologist, training on real protein alignments makes intuitive sense to me. Why would you not want to go down that route?
terdon
CC BY-SA 4.0
2019-11-03T02:32:54.330Z
@terdon Because HMM itself is a full probabilistic model and the typical way to train a HMM is to use BW (expectation maximization), which tries to maximize the conditional expected log likelihood. I am simply thinking about using entirely just this statistical model to tell me what is happening in the binding pattern given a set of unaligned sequences.
skc
<modelling><motifs><hidden-markov-models><hmmer><transcription-factors>
Profile HMM to find sequence motif using Baum-Welch instead of using a given multiple sequence alignment?
# Profile HMM to find sequence motif using Baum-Welch instead of using a given multiple sequence alignment?

(Asked by: username_0 on 2019-11-02)

I know this can be very problem-specific -- but it seemed to me the standard approach to train an HMM to recognize a binding pattern of a protein is to use the multiple sequence alignment (MSA), instead of using Baum Welch. I suspect that this is the case because this is what I saw in the current version of HMMer3, which does not provide a baum-welch training procedure for unaligned sequence.

The thing that I saw training with Baum Welch is that once a HMM is trained, using the Viterbi can give a pattern that contains a lot of insertions in the motif, which doesn't make biological sense. This could be mitigated by using Viterbi training, however, I don't see much literature discussing this as a viable approach.

It'd be appreciated if someone could share their experience on training a profile HMM to finding motifs.

**Tags:** modelling, motifs, hidden-markov-models, hmmer, transcription-factors
> **Comments:**
> **username_1**: A wee caveat about the biological relevance of indels. The alignment step in HMMer3 is done with hmmalign, a local aligner that lacks a flag to change penalties as far as I known. But you can use a different aligner —but no gblocks. If done correctly, MSA indels biologically somewhat correspond to actual indel in the encoding DNA. Generally these are protein loops. And lastly, the gappy regions get really low weights the hmmbuild step, so it does not matter much. So getting too many gaps is a sign one of the sequences may be too different (non-homologous or partially in global alignment).  
> **username_2**: Could you explain why you feel B-W is a better approach? The reason we want MSAs for this is because that lets us use _real_ data. I'm about as math challenged as a professional scientist can be, so I don't pretend to even understand what the B-W algorithm does, but as a biologist, training on real protein alignments makes intuitive sense to me. Why would you not want to go down that route?  
> **username_0**: @terdon Because HMM itself is a full probabilistic model and the typical way to train a HMM is to use BW (expectation maximization), which tries to maximize the conditional expected log likelihood. I am simply thinking about using entirely just this statistical model to tell me what is happening in the binding pattern given a set of unaligned sequences.  

---

## 0 answers

