Written and maintained by CASRAI Editorial Board
Published
On this page
HMMER is an open-source biological sequence analysis suite that uses profile hidden Markov models (profile HMMs) to detect remote protein and nucleotide homologs, annotate structural domains, and construct multiple sequence alignments. Developed by Sean Eddy and the Eddy/Rivas Laboratory, HMMER transforms multiple sequence alignments into probabilistic consensus models, capturing position-specific amino acid or nucleotide conservation and insertion/deletion frequencies. Through a multi-stage heuristic filter pipeline accelerated by SIMD vector instructions, HMMER achieves speeds competitive with BLAST while retaining the probabilistic sensitivity required to detect remote evolutionary relationships in the sequence twilight zone.
Definition, Core Concepts, and Scope
Biosequence analysis relies on detecting sequence homology—shared evolutionary ancestry—to infer protein structure, biochemical function, and phylogenetic lineages. Traditional pairwise comparison algorithms, such as Smith-Waterman local alignment and BLAST, compare individual query sequences against target databases using static substitution matrices (such as BLOSUM62) and uniform gap penalties. While effective for closely related sequences, static matrices apply identical substitution scores and gap penalties across every position, ignoring the biological reality that distinct structural and functional positions experience vastly different selective pressures.
HMMER addresses this limitation by implementing profile hidden Markov models. A profile HMM represents an entire sequence family rather than a single sequence. By taking a multiple sequence alignment (MSA) as input, HMMER calculates position-specific residue emission probabilities and position-specific transition probabilities for insertions and deletions. Conserved catalytic residues or structural hydrophobic cores exhibit strict emission distributions and high gap penalties, whereas exposed, variable loop regions permit broad amino acid substitution and frequent insertions or deletions without severe penalties.
When compiling multiple sequence alignments for model construction, researchers frequently employ external multiple alignment suites. Comparing tools such as MAFFT vs MUSCLE vs Clustal Omega vs T-Coffee illustrates how progressive and iterative alignment strategies influence resulting profile quality. Once constructed, a HMMER profile HMM functions as a statistical consensus probe capable of identifying divergent homologs sharing less than 20% to 25% pairwise sequence identity with any single known family member—the evolutionary twilight zone.
How HMMER Works: The Plan 7 Model and Heuristic Filtering Pipeline
At the theoretical core of HMMER lies the Plan 7 architecture, a linear hidden Markov model topology designed for biological sequence alignment. A Plan 7 model consists of a linear chain of consensus match states (M), insert states (I), and delete states (D) for each consensus column in the underlying alignment, supplemented by seven non-homologous flanking and terminal states: Begin (B), End (E), N-terminal flanking (N), C-terminal flanking (C), intervening loop (J), Start (S), and Terminal (T). This architecture naturally models local alignments, multiple domain hits per sequence, and multigenic architectures.
HMMER relies on ensemble scoring algorithms rather than optimal path alignment alone. While classical algorithms like Viterbi identify only the single most probable path through the dynamic programming matrix, HMMER uses the Forward-Backward algorithm to compute the total likelihood of the sequence summed across all possible alignment paths. This ensemble approach accounts for alignment uncertainty: if a target sequence aligns to a domain model through several plausible paths, HMMER accumulates that probability mass, enabling detection of remote homology that would fail to achieve statistical significance under a single Viterbi path.
Because full Forward-Backward dynamic programming is computationally demanding, HMMER3 introduced a multi-stage heuristic filter pipeline that achieves speeds comparable to BLAST while preserving mathematical rigor:
- Null Model: Computes the background probability of non-homology based on target sequence length and residue composition, establishing a baseline for log-odds bit score conversion.
- MSV Filter (Multiple Segment Viterbi): The primary acceleration engine. The MSV filter identifies optimal ungapped alignment segments using reduced-precision 8-bit integer SIMD vector instructions. Comparisons passing a default P-value threshold of ≤ 0.02 (controlled by
--F1) advance to subsequent stages. - Biased Composition Filter (Null2): Evaluates whether high MSV scores stem from genuine homology or compositional bias (such as proline-rich or hydrophobic repeats). A two-state HMM compares profile composition against the null model, penalizing low-complexity matches. This step can be bypassed using
--nobias. - Viterbi Filter: Applies an accelerated gapped alignment algorithm using 16-bit integer SIMD vectorization. Sequences must satisfy a P-value cutoff of ≤ 0.001 (configured with
--F2) to proceed. - Forward Filter and Parser: Evaluates the full sequence ensemble likelihood using 32-bit floating-point SIMD vector instructions. Matches meeting a P-value threshold of ≤ 1e-5 (controlled by
--F3) are retained. - Domain Identification and MEA Alignment: Combines Forward and Backward parser results to delineate domain envelopes. For each envelope, HMMER calculates a Maximum Expected Accuracy (MEA) alignment, delivering residue-by-residue confidence scores.
For applications where absolute sensitivity supersedes execution time, users can supply the --max argument, which disables all heuristic filters and runs the full Forward-Backward parser across every sequence in the target database.
HMMER Tool Suite: Executable Roles and Command Selection Guide
The HMMER package provides a modular suite of command-line utilities tailored for distinct biological search scenarios, sequence types, and database architectures. Selecting the appropriate utility depends on whether the query is a single sequence, a multiple alignment, or a precompiled profile database.
The core executables include:
hmmbuild: Constructs a profile HMM from an input multiple sequence alignment in Stockholm, Clustal, or FASTA format. When creating seed alignments, tools such as Clustal Omega provide compatible formats that preserve alignment headers and annotation flags.hmmpress: Indexes a flat profile HMM database file into four binary files (.h3m,.h3i,.h3f, and.h3p) for rapid memory-mapped access. Runninghmmpressis an absolute prerequisite prior to usinghmmscan.hmmsearch: Searches one or more profile HMMs against a target sequence database (such as UniProtKB in FASTA format). This is the standard workflow when searching a specific protein family model across a proteome.hmmscan: Scans one or more query protein sequences against a target database of profile HMMs (such as Pfam-A). This is the standard workflow for functional annotation of newly predicted open reading frames.phmmer: Performs sequence-to-sequence protein searches without requiring an initial multiple alignment.phmmerbuilds an internal single-sequence profile model on the fly and searches target databases using HMMER probabilistic pipeline.jackhmmer: Conducts iterative protein sequence searches analogous to PSI-BLAST. Starting from a single query sequence,jackhmmercollects significant hits, generates a multiple alignment, builds a profile HMM, and repeats the search until convergence.nhmmerandnhmmscan: Specialized tools for nucleotide sequence analysis. Rather than the protein MSV filter,nhmmeremploys a Single-Segment Viterbi (SSV) filter to search long chromosomal DNA segments without artificial sequence fragmentation.hmmalign: Aligns unaligned sequences to an existing profile HMM, producing an aligned Stockholm file where columns correspond to the model consensus match states.hmmfetchandhmmstat: Administrative tools used to retrieve specific models from multi-HMM flatfiles and display family-level summary metrics (such as model length and relative entropy).
The data table below compares the primary programs, query types, target databases, acceleration mechanisms, and indexing prerequisites across the HMMER suite.
Statistical Interpretation: Bit Scores, E-Values, and Curated Thresholds
Correctly interpreting HMMER output requires distinguishing between bit scores and expect values (E-values). A HMMER bit score measures sequence similarity as a log-odds ratio comparing the likelihood of the profile HMM hypothesis against the null hypothesis of non-homology. The bit score is calculated as the base-2 logarithm of the likelihood ratio, adjusted for sequence length and composition. A bit score of zero indicates equal likelihood under the profile HMM and null model. Each additional bit doubles the likelihood ratio: 10 bits represents approximately 1,000-to-1 odds, and 30 bits indicates a billion-to-one odds ratio.
The E-value represents statistical significance by calculating the number of false-positive matches expected by chance in a database of a given size. E-values scale linearly with database size: searching a database ten times larger increases all E-values tenfold for the same bit score. While an E-value cutoff of 1e-3 is common for exploratory screening, bit scores provide a stable, database-independent metric for automated annotation pipelines.
HMMER reports both a full-sequence score and an individual domain score for each target sequence. The full-sequence score sums log-odds likelihoods across all detected domain envelopes, whereas the best-domain score reflects only the single highest-scoring match. In multidomain proteins with repeated low-affinity modules (such as fibronectin type III), individual domains may yield modest scores while the aggregate sequence score demonstrates decisive significance. Conversely, repetitive sequences with low-complexity repeats can falsely inflate full-sequence scores through weak cumulative matches; checking domain counts and bias scores flags these artifacts.
Large-scale databases define curated bit score cutoffs directly within profile HMM headers:
- Gathering Threshold (
--cut_ga): Curated by database maintainers (such as Pfam) to define family membership. The gathering cutoff sets minimum bit scores for full sequences (GA1) and individual domains (GA2) that include all verified family members while excluding known false positives. - Trusted Cutoff (
--cut_tc): The lowest bit score observed among verified true-positive training sequences in the seed alignment. - Noise Cutoff (
--cut_nc): The highest bit score observed among non-homologous sequences tested during model curation.
In specialized biocuration pipelines, such as carbohydrate-active enzyme mapping through CAZy and dbCAN, curated HMMER cutoffs ensure that modular glycoside hydrolase and carbohydrate-binding domains are categorized with zero manual review overhead.
Step-by-Step Command Walkthrough and Tabular Output Parsing
Executing HMMER in research workflows involves a progression from alignment curation to model generation, database indexing, and output parsing. Below is an end-to-end command walkthrough illustrating both major operational modes.
Workflow A: Building a Custom Profile and Searching a Target Proteome
To build a custom profile from a verified seed alignment and search an uncharacterized bacterial proteome:
# Step 1: Build the profile HMM from a Stockholm or Clustal alignment
hmmbuild kinase_catalytic.hmm kinase_seed.sto
# Step 2: Display model summary statistics
hmmstat kinase_catalytic.hmm
# Step 3: Search the profile against a FASTA proteome with tabular reporting
hmmsearch --cpu 8 -E 1e-5 --tblout kinase_hits.tbl --domtblout kinase_domains.tbl -o kinase_search.out kinase_catalytic.hmm proteome.fasta
Workflow B: Annotating Query Sequences Against Pfam-A
To annotate newly predicted protein sequences using a multi-model profile library:
# Step 1: Prepare and index the Pfam-A flatfile (performed once)
hmmpress Pfam-A.hmm
# Step 2: Scan query sequences using Pfam gathering cutoffs
hmmscan --cpu 8 --cut_ga --tblout query_pfam.tbl --domtblout query_pfam_dom.tbl -o query_scan.out Pfam-A.hmm query_transcripts.faa
While standard HMMER output files include detailed human-readable pairwise alignments, automated pipelines rely on space-delimited tabular output files generated by --tblout and --domtblout. The target hits table (--tblout) reports one summary row per sequence with key columns:
- target name and accession: Target sequence identifiers from the FASTA header.
- query name and accession: The query profile HMM identifier.
- full sequence E-value and score: Overall statistical significance and bit score across all domains.
- bias: Bit score deduction attributable to compositional bias.
- domain counts: Diagnostic counters tracking expected domains (
exp), identified regions (reg), clusters, overlaps, envelopes, reported domains, and included domains. Discrepancies between expected domains and discrete regions alert researchers to tandem low-complexity repeat artifacts.
Research Applications: Structural Biology, Functional Annotation, and Phylogenetics
HMMER serves as foundational infrastructure across computational biology, structural genomics, and evolutionary research. In reference databases—including InterPro, Pfam, SMART, and TIGRFAMs—HMMER profiles represent the gold standard for automated domain assignment, classifying millions of proteins deposited into UniProtKB.
In structural biology, machine learning systems such as AlphaFold2 and ColabFold utilize HMMER (specifically jackhmmer and hhblits) to construct deep multiple sequence alignments from sequence archives. The evolutionary co-variation signals captured in these profile-guided MSAs provide the physical contact constraints necessary for high-accuracy tertiary structure prediction.
In evolutionary biology, researchers rely on hmmalign to align divergent homologous sequences to established profile models without distorting core structural positions. These profile-guided alignments are subsequently utilized for maximum-likelihood phylogenetic tree inference using tools like RAxML, ensuring that gap placement reflects conserved structural domains rather than progressive alignment artifacts.
Furthermore, in systems biology, automated functional annotation generated by HMMER domain assignments directly populates interaction databases and functional networks such as STRING, linking unknown microbial open reading frames to characterized biochemical pathways.
Common Pitfalls and Diagnostic Checks in HMMER Workflows
When implementing HMMER in high-throughput pipelines, researchers frequently encounter several common operational errors:
- Missing
hmmpressFormatting: Attempting to runhmmscandirectly on an unindexed flat.hmmfile causes immediate execution failure.hmmscanrequires the four binary files (.h3m,.h3i,.h3f,.h3p) generated byhmmpressto enable memory-mapped random access across thousands of models. - Confusing
hmmsearchandhmmscan: Usinghmmsearchwhen searching a single sequence against a multi-HMM database forces the program to re-read the target database for every model, resulting in massive disk I/O bottlenecks. Always usehmmscanfor sequence-versus-profile-library searches andhmmsearchfor profile-versus-sequence-database searches. - Relying on E-Values Across Database Releases: Because E-values scale directly with database size, comparing E-values between database releases causes true homologs to appear less statistically significant as databases expand. Pipeline authors should record bit scores and use curated gathering thresholds (
--cut_ga) for stable cross-version filtering. - Compositional Bias False Positives: When analyzing membrane proteins or repeat proteins, hydrophobic or proline-rich regions can elevate bit scores despite lack of homology. Always verify whether the
biascolumn approaches the total bit score; if bias is high, inspect individual domain alignments and consider tightening the Viterbi filter with--F2. - Misapplying Profile HMMs to Structural RNAs: Profile HMMs model primary linear sequence consensus and assume positional independence. They cannot model base-pairing interactions across non-contiguous residues in structured non-coding RNAs. For structural RNA homology searches, researchers should use covariance models implemented in the Infernal software suite.
Frequently asked questions
What is the difference between hmmsearch and hmmscan?
hmmsearch searches profile HMM queries against a sequence database (such as a FASTA proteome). In contrast, hmmscan scans sequence queries against a profile HMM database (such as Pfam-A). hmmscan requires the profile library to be pre-indexed with hmmpress for rapid memory-mapped retrieval of models.
How does HMMER differ from BLAST and PSI-BLAST?
BLAST uses position-independent substitution matrices (e.g. BLOSUM62) and uniform gap penalties for pairwise alignment. HMMER uses profile HMMs that capture position-specific amino acid emission and insertion/deletion probabilities across a family. Additionally, HMMER integrates over all alignment paths using the Forward algorithm, whereas BLAST scores only the optimal path. jackhmmer provides iterative profile searches with lower profile drift than PSI-BLAST.
Why does HMMER report both a full sequence E-value and a domain E-value?
The full sequence E-value measures overall significance across the entire protein, summing scores across all detected domain envelopes. The domain E-value measures each domain in isolation. In multidomain proteins, multiple individually weak domains can accumulate to demonstrate decisive homology. If the sequence score is significant but individual domains are not, inspect the sequence for low-complexity repeats.
What are Pfam gathering thresholds (–cut_ga) and why should they be used?
Pfam gathering thresholds are curated bit score cutoffs established by database biocurators for each family model. Supplying --cut_ga instructs HMMER to filter hits using calibrated family-specific bit scores (GA1 for sequences, GA2 for domains) rather than arbitrary global E-values, ensuring stable domain assignments that exclude false positives regardless of database size.
Can HMMER be used to search DNA and RNA sequences?
Yes. The suite includes nhmmer and nhmmscan for nucleotide analysis. nhmmer supports nucleotide queries searched against nucleotide databases, utilizing a Single-Segment Viterbi (SSV) filter and nucleotide-specific null models to handle long chromosomal targets without requiring artificial sequence fragmentation.
Why does HMMER require hmmpress before searching a profile database?
hmmpress compiles a flat profile HMM database into four binary files: .h3m (binary profiles and models), .h3i (SSI index for random access), .h3f (compact MSV filter data for fast SIMD screening), and .h3p (profile data optimized for parsers). These binary files allow hmmscan to memory-map database models directly without parsing text files sequentially.
Sources
- Eddy, S. R. and HMMER Development Team (2023). HMMER User Guide: Biological sequence analysis using profile hidden Markov models (Version 3.4). Howard Hughes Medical Institute and Harvard University. Available at: http://eddylab.org/software/hmmer/Userguide.pdf (Accessed: 2026-11-15).
- Eddy, S. R. (2011). Accelerated Profile HMM Searches. PLOS Computational Biology, 7(10), e1002195. Available at: https://doi.org/10.1371/journal.pcbi.1002195 (Accessed: 2026-11-15).
- Finn, R. D., Clements, J., Arndt, W., Miller, B. L., Wheeler, T. J., Schreiber, F., Bateman, A., and Eddy, S. R. (2015). HMMER web server: 2015 update. Nucleic Acids Research, 43(W1), W30–W38. Available at: https://doi.org/10.1093/nar/gkv397 (Accessed: 2026-11-15).
- Wheeler, T. J., and Eddy, S. R. (2013). nhmmer: DNA homology search with profile HMMs. Bioinformatics, 29(19), 2487–2489. Available at: https://doi.org/10.1093/bioinformatics/btt403 (Accessed: 2026-11-15).
- Mistry, J., Chuguransky, S., Williams, L., Qureshi, M., Salazar, G. A., Sonnhammer, E. L. L., Tosatto, S. C. E., Paladin, L., Raj, S., Richardson, L. J., Finn, R. D., and Bateman, A. (2021). Pfam: The protein families database in 2021. Nucleic Acids Research, 49(D1), D412–D419. Available at: https://doi.org/10.1093/nar/gkaa913 (Accessed: 2026-11-15).
- Eddy/Rivas Laboratory (2023). HMMER Source Code Repository (Version 3.4). Department of Molecular and Cellular Biology, Harvard University. Available at: https://github.com/EddyRivasLab/hmmer (Accessed: 2026-11-15).
Data: HMMER Suite Core Programs and Algorithmic Specifications
Comparative technical specifications for core command-line tools in the HMMER biosequence analysis suite (version 3.4), detailing query input types, target database formats, heuristic SIMD filter stages, default statistical thresholds, and indexing prerequisites compiled from the official HMMER User Guide.
Period covered: 2023/2026. Coverage: Global.
| Program | Query Input | Target Database | Acceleration Filter | Default Filter P-Value (p-value) | Required Preprocessing |
|---|---|---|---|---|---|
| hmmsearch | Profile HMM (.hmm) | FASTA sequence database | MSV filter (8-bit SIMD) | 0.02 | None (optional makehmmerdb) |
| hmmscan | FASTA sequence query | Profile HMM database | MSV filter (8-bit SIMD) | 0.02 | hmmpress (.h3m, .h3i, .h3f, .h3p) |
| phmmer | Single protein sequence (FASTA) | Protein sequence database (FASTA) | MSV filter (8-bit SIMD) | 0.02 | None |
| jackhmmer | Single protein sequence (FASTA) | Protein sequence database (FASTA) | Iterative MSV / Forward filter | 0.02 | None |
| nhmmer | DNA/RNA sequence, MSA, or HMM | Nucleotide sequence database (FASTA) | SSV filter (8-bit SIMD) | 0.02 | None |
| nhmmscan | DNA/RNA sequence query (FASTA) | Nucleotide profile HMM database | SSV filter (8-bit SIMD) | 0.02 | hmmpress (.h3m, .h3i, .h3f, .h3p) |
| hmmalign | FASTA sequence file | Profile HMM (.hmm) | Viterbi / Forward-Backward parser | 0.001 | None |
Sources
- HMMER User's Guide Version 3.4 (accessed 2026-11-15)
- Accelerated Profile HMM Searches (PLOS Computational Biology) (accessed 2026-11-15)
Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.







