This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Scan multiple sequences on multiple hmm profiles

I want to "align" multiple protein sequences in a multi-fasta file against thousand of hmm profiles (.hmm) that I've downloaded. I though on using hmmscan.

  1. Should I do that on each profile separately? Or is there a way to work on multiple profile to scan all-vs-all?
  2. Should I process the hmm file with hmmpress?
hmm hmmer

1 answer

Because you wrote "align" I am assuming that you actually want to perform a search and pairwise alignments as a result. If you truly want to align sequences, you will need the aptly named hmmalign.

Yes, hmmscan is your tool. You need to process your HMM database with hmmpress and multiple sequences can be searched against multiple HMMs in one pass:

hmmscan -o aln_hits.out --tblout table_hits.out -E 0.01 --cpu 8 DB.hmm proteins.fa

In aln_hits.out you will get matches of each sequence, sequentially, to the the whole HMM database. Some sequences may not have any matches in which case you get [No hits detected that satisfy reporting thresholds]. Tabular output in table_hits.out is more compact as it contains only matches that satisfy the E-value threshold, so some sequences will be completely absent from it.

Thank you so much Mensur. One thing that is not clear to me is how to build one database from multiple hmm files (the documentation of hmmpress seem to be for one .hmm file at a time).

Based on that reply it seems that all profiles should be concatenated first! Thank you.

Yes, all HMMs should be first concatenated into a single file - which I randomly named DB.hmm in the example above - and hmmpress-ed before use. After pressing several files will be created with .h3? extensions, but the database should still be referred to in commands by its root name (DB.hmm).

If my answers helped or completely solved your problem, consider upvoting or accepting them.

Log in to answer this question.