Body: <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>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-02T08:14:39.520Z
Comments.Text: 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).
Comments.UserDisplayName: Matteo Ferla
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-02T14:47:03.180Z
Comments.Text: 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?
Comments.UserDisplayName: terdon
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-03T02:32:54.330Z
Comments.Text: @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.
Comments.UserDisplayName: skc
Tags: <modelling><motifs><hidden-markov-models><hmmer><transcription-factors>
Title: Profile HMM to find sequence motif using Baum-Welch instead of using a given multiple sequence alignment?
ThreadText: # 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**: @username_2 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
  
  