Question: Set a %coverage threshold during a hmmsearch using HMMer
gravatar for CrLs
6.2 years ago by
CrLs10 wrote:

Hi everyone,

I would like to know if there is a way to set a %coverage treshold using hmmsearch. I've read the user guide, but i haven't found it.




sequence • 2.0k views
ADD COMMENTlink modified 6.2 years ago by Travis Wheeler100 • written 6.2 years ago by CrLs10
gravatar for Travis Wheeler
6.2 years ago by
United States
Travis Wheeler100 wrote:

You'll need to provide a definition of "%coverage" to be sure, but the answer is almost certainly "no". 

When I hear "%coverage", I think of a measure of shared length, probably "what percent of the sequence is aligned to the model" (or vice versa).  If this is what you're after, you may want to use hmmsearch's --tblout flag. This will give you an easy-to-parse space-delimited file that includes start/end-positions for both the query model and the target sequence, along with the total target sequence length. Knowing the model length also, the %coverage math from there is pretty easy to pull off.

ADD COMMENTlink written 6.2 years ago by Travis Wheeler100

Hello Travis,

That's a great answer. Have you any advice on which parser i should use ? If there is one for python or perl ?

Thaks again !

ADD REPLYlink written 6.2 years ago by CrLs10

I recommend writing your own "parser".  First run hmmsearch

% hmmsearch --tblout my_output.tblout  query.hmm  target.fa

Then look at the format of the file produced when using hmmsearch's --tblout flag  (in the example above: my_output.tblout). You'll find that this is likely the easiest parsing task you'll ever do.  Simply walk through the lines of the table file one-at-a-time, (a) ignoring lines starting with "#", and (b) accessing the content of each line using either split or a regex (I'm imagining Perl here).   Heck, you could even use awk to parse the file, if you're a fan of awk


ADD REPLYlink written 6.2 years ago by Travis Wheeler100

Ok. Thanks for you time and your answer. i'll try. (i'd give you a 'biostar gold' if it was available)

ADD REPLYlink written 6.2 years ago by CrLs10
Please log in to add an answer.


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