Question: hmm without realigning
0
gravatar for dbsseven
5 days ago by
dbsseven0
dbsseven0 wrote:

Hi all, I am trying to generate plausible aligned sequences from a MSA.

My current idea is to use hmmer's hmmbuild to build a hmm model, then hmmemit -> hmmalign to generate an aligned sequence.

However, it seems like hmmbuild is realigning the sequences. Therefore the final aligned sequence does not match my original MSA.

Does anyone have any suggestions? Thanks, David

Example

The starting MSA (using PF00313 from Pfam):

A0A1G7SQH8.1/3-67              -QGF.V..K...W..F.......NA...E......K....G...F..G............F......I........G..........P..........D...........D.........G..........G............E.......D..........V..F..VH..F....S..A.I......E...D..RG.................gF.R..S...L......D.....E.....G.A...R....V..E.....Y..E.ASP.........GQR....G...L...Q.A.D.RVTP-

Build HMM model:

hmmbuild -o test.log -O test_alignment.txt test.hmm PF00313.uniprot

checking the alignment produced by hmmbuild (test_alignment.txt) shows that the alignment has shifted

A0A1G7SQH8.1/3-67      
~QGF.V..K...W..F.......NA...E......K....G...F..G............F......I........G..........P..........D...........D.........G..........G............E.......D..........V..F..VH..F....S..A.I......E...D..RG.................gF.R..S...L......D.....E.....G.A...R....V..E.....Y..E.ASP.........GQR....G...L...Q.A.D.RVTP

Emit a sequence gives a gapless sequence:

hmmemit test.hmm

 

CSD-sample1
IDGTMCTAAATSIFKKTFGFIHQHNLPEDSYKSCTYLVHSSTVEKFLQVVKPAELLCFDVEKVGPYPVGGANALQIRS
hmm alignment • 153 views
ADD COMMENTlink modified 2 days ago by h.mon22k • written 5 days ago by dbsseven0
1

If you want hmmemit to sample an alignment, have you tried hmmemit -a?

This is in the help page and in the documentation:

Options controlling what to emit: -a : emit alignment

ADD REPLYlink written 11 hours ago by cryptogenomicon130

Could you provide the command line you are running and illustrate the issue with an example?

ADD REPLYlink written 4 days ago by h.mon22k

Added by editing the initial question.

ADD REPLYlink written 2 days ago by dbsseven0

What do you mean by plausible aligned sequences from the MSA?

If you have an MSA do you not already have aligned sequences to use?

ADD REPLYlink written 4 days ago by jrj.healey9.7k

Yes I have lots of sequences, but I would like new sequences that are not necessarily in the MSA but which fit within the HMM model. (In the same way a trained HMM model can identify unique sequences, not necessarily only those within the training MSA. But now emitting sequences rather than searching.)

ADD REPLYlink modified 2 days ago • written 2 days ago by dbsseven0
1
gravatar for h.mon
2 days ago by
h.mon22k
Brazil
h.mon22k wrote:

This is expected and explained in the UserGuide (see page 77):

-O <f> After each model is constructed, resave annotated, possi-
       bly modified source alignments to a file <f> in Stockholm 
       format. The alignments are annotated with a reference an-
       notation line indicating which columns were assigned as
       consensus, and sequences are annotated with what relative
       sequence weights were assigned. Some residues of the align-
       ment may have been shifted to accommodate restrictions of
       the Plan7 profile architecture, which disallows transitions
       between insert and delete states.
ADD COMMENTlink written 2 days ago by h.mon22k

Hi h.mon, I understood that this is expected, but should have been more clear. I was looking for suggestions on an alternative method. Either a way to re-align the emitted sequence against the MSA, or an alternative hmm model builder which would include gaps.

ADD REPLYlink written 1 day ago by dbsseven0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1230 users visited in the last hour