Skip to content

Welcome to our weekly research support coffee hour on Zoom! Click here for more information.

HMMER

Hidden Markov Models (HMM) are mathematical tools that can be used to describe and analyze related or similar sequence areas. HMM-models can be derived from multiple sequence alignments so that they contain position specific information about the probabilities of having certain nucleotides or amino acids in each position of an alignment.

The HMMER package contains tools to create and modify sequence alignment based HMM-models, use them to do database searches and extend sequence alignments.

Database searches with HMM profiles can require very long computing times in normal computers.

License

Free to use and open source under the BSD 3-Clause License.

Available

  • Roihu-CPU: 3.4, via the bio-apps module.

Usage

HMMER is part of the bio-apps collection on Roihu. Load the bio-apps module tree and then the HMMER module:

module load bio-apps/v202603
module load hmmer/3.4

Check the available versions with:

module spider hmmer

After this, the command line options of each hmmer command can be checked with the option -h. For example:

hmmsearch -h

Pfam database

CSC provides the Pfam-A HMM database (Pfam 38.2) on Roihu, already prepared for searching with hmmpress. The hmmer module sets the HMMER_DB environment variable to its directory, so you can search against $HMMER_DB/Pfam-A.hmm.

You can also search against your own HMM databases. Prepare them for searching with hmmpress first:

hmmpress my_models.hmm

With native HMMER, you can speed up the hmmscan and hmmsearch commands by using several processors. The number of processors, e.g. 4, to be used is indicated with the option --cpu 4, but the number is better replaced with an environment variable which already has it, i.e. $SLURM_CPUS_PER_TASK, so it's always in sync with the batch script request.

You can run the search in an interactive session. On the Roihu interactive partition each reserved core provides 1.875 GB of memory (up to 32 cores / 60 GB / 36 hours), so request enough cores for the memory you need, for example:

sinteractive --account <project> --cores 4
module load bio-apps/v202603
module load hmmer/3.4
hmmscan --cpu $SLURM_CPUS_PER_TASK $HMMER_DB/Pfam-A.hmm protein.fasta > result.txt

HMMER jobs should be run as interactive batch jobs or normal batch jobs. Here is an example batch job script using 4 processor cores:

#!/bin/bash 
#SBATCH --job-name=hmmer_job
#SBATCH --account=<project>
#SBATCH --output=output_%j.txt
#SBATCH --error=errors_%j.txt
#SBATCH --time=04:00:00
#SBATCH --partition=small
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4
#SBATCH --mem-per-cpu=2000M

module load bio-apps/v202603
module load hmmer/3.4

hmmscan --cpu $SLURM_CPUS_PER_TASK $HMMER_DB/Pfam-A.hmm protein.fasta > result.txt

Replace <project> with your CSC project (for example project_2001234).

The job is submitted with the command (where batch_job_file.sh is the name of your batch job file):

sbatch batch_job_file.sh

For more information on running batch jobs, see creating a batch job script for Roihu.

Support

CSC Service Desk

More information

Do you find this page useful?
Thank you for your feedback!
Thank you! Your feedback is appreciated.

Please let us know how we could improve this page by contacting us or by creating an issue in GitHub. You can also edit this page yourself and contribute your improvements by creating a pull request.