Skip to content
naulon

No retraction, correction or concern found when last checked on Oct 16, 2026.

nhmmer: DNA homology search with profile HMMs

Travis J. Wheeler, Sean R. Eddy

Bioinformatics · 2013 · CC BY

doi:10.1093/bioinformatics/btt403

Abstract

Summary: Sequence database searches are an essential part of molecular biology, providing information about the function and evolutionary history of proteins, RNA molecules and DNA sequence elements. We present a tool for DNA/DNA sequence comparison that is built on the HMMER framework, which applies probabilistic inference methods based on hidden Markov models to the problem of homology search. This tool, called nhmmer, enables improved detection of remote DNA homologs, and has been used in combination with Dfam and RepeatMasker to improve annotation of transposable elements in the human genome. Availability: nhmmer is a part of the new HMMER3.1 release. Source code and documentation can be downloaded from http://hmmer.org. HMMER3.1 is freely licensed under the GNU GPLv3 and should be portable to any POSIX-compliant operating system, including Linux and Mac OS/X. Contact: wheelert@janelia.hhmi.org

Full text

From PubMed Central, U.S. National Library of Medicine, as current on Oct 16, 2026. Paragraph numbers are ours, so an answer can point at one.

1 INTRODUCTION

A widely used general purpose tool for DNA/DNA sequence comparison is blastn, which heuristically approximates the Smith–Waterman algorithm for recognizing local regions of similarity between two sequences. In recent years, most advances in DNA/DNA comparison have related to accelerating search for near-exact matches, and to improving whole-genome alignment. Another area that deserves attention is the development of methods that maximize the power of computational sequence comparison tools to detect remote homologies.

Profile hidden Markov models (profile HMMs) represent an important advance in terms of sensitivity of sequence searches for remote homology. They provide a formal probabilistic framework for sequence comparison and improve detection of remote homologs by (i) enabling position-specific residue and gap scoring based on a query profile, and (ii) calculating the signal of homology based on the more powerful ‘Forward/Backward’ HMM algorithm that computes not just one best-scoring alignment, but a sum of support over all possible alignments. In the past, this improved sensitivity came at a significant computational cost, but recent advances in HMMER3 have increased speed for protein search by ∼100-fold, reaching blastp-like speed through a combination of filtering heuristics and computer engineering. Tools based on profile HMMs have historically focused on protein search, with little concentration on the challenges presented by (i) chromosome-length target sequences, and (ii) the extreme composition bias often seen in genomic DNA. With attention to the details of DNA search, nhmmer builds upon the speed advances of HMMER3, bringing the power of profile HMMs to DNA homology search, at speeds nearly as fast as blastn with sensitive settings.

An example of a biological problem requiring sensitive detection of remote DNA homologs is the annotation of genomic sequence derived from ancient transposable element (TE) expansions. A prerelease version of the nhmmer tools has recently been shown to provide increased sensitivity over blastn and other single-sequence search methods, with reduced false discovery rate and reasonable runtime, in searching for TEs. For example, when nhmmer was used within the recently released RepeatMasker 4.0, an additional 150 Mb (5%) of the human genome was reliably annotated as derived from TEs.

2 USAGE AND PERFORMANCE

Usage. The program nhmmer is used to search one or more nucleotide queries against a nucleotide sequence database. For each query, nhmmer searches the target database and outputs a ranked list of the hits with the most significant matches to the query. A query may consist of a single sequence, a multiple sequence alignment, or a profile HMM built using the HMMER program hmmbuild. Each hit represents a region of local similarity between a portion of the query and a subsequence of the full target database sequence, and is assigned a similarity score S in bits, along with an E-value indicating the expected number of false positives at a threshold of score S. Each hit is also accompanied by an alignment of the matched sequence to the model, with values indicating the confidence with which each position is aligned.

The final score, boundaries and alignment of a hit are computed based on filling in a Forward/Backward dynamic programming matrix, but the computational burden of doing this for the full target database is prohibitive. Therefore, nhmmer uses a series of acceleration filters that depend on simpler approximations of the final Forward score of a hit. These filters are based on those used in the HMMER3 protein search tools, but have been modified to work in the context of long (potentially chromosome length) target sequences. The initial filter, called ‘single segment ungapped Viterbi’, scans along the target sequence with a fast ungapped Viterbi alignment using a reduced-precision, 16-way vector-parallel approach. Windows around high-scoring ungapped alignments are subjected to a full-gapped Viterbi alignment to the model. Candidate alignments passing this filter then endure the full rigor of a Forward/Backward alignment to the query, including application of a context-dependent null model to account for composition bias shared by the query and target. For more details on the full acceleration pipeline, see.

Performance. In Figure 1 we consider the performance of nhmmer on a benchmark called Rmark3 that has been used previously to test the RNA homology search tool Infernal. The benchmark consists of 106 families from Rfam that could be divided into two groups such that no sequence in one group is >60% identical to any sequence in the other group [Rfam 10.0, ]. One group was used as the query alignment for the family, and sequences from the other group (780 sequences in total) were embedded in 10 Mb of sequence simulated using a 15-state HMM trained on genomic sequence from a variety of organisms. A positive was defined as an embedded sequence with >50% length covered by a query from the same family; a negative was defined as any hit that mostly covers simulated sequence. For more details on construction of the benchmark, see.

In this benchmark, we begin with an alignment of multiple members of a DNA sequence family and aim to find more instances of the family in the target sequence database. The standard methods for this homology search problem (e.g. using blastn) involve searching the target database with a single query sequence, either (i) producing a consensus sequence to represent the sequence family, then using the consensus as query to search the database, or (ii) using the family pairwise (fpw) search method, in which each individual sequence from the family alignment is used as a query, the hit lists are merged, and overlapping hits are adjudicated by recording the hit with the best E-value. Using both of these single-sequence query approaches on Rmark3, nhmmer achieves better sensitivity than blastn.

These single-sequence query methods do not, however, take full advantage of the information contained within the query alignment. In nhmmer, a profile HMM is built from the alignment, and represents the residue and indel distributions for each position, modeling the conservation patterns of the family in a way that is not possible with single-sequence queries. The benefits of profile search are two-fold: (i) search power is much greater than even with fpw, and (ii) search speed is roughly equivalent to that of searching with a single consensus sequence, as only one search is performed for the entire family, rather than one for each sequence in the query alignment as in fpw.

In addition to being more sensitive than blastn, nhmmer represents a nearly 100-fold increase in speed over previous implementations of DNA homology search with profile HMMs. For example, using the seed alignment for Dfam entry DF0000789 (a 338 position-long DNA transposon) to search against the human genome with a single thread took nhmmer 12 min to complete, whereas HMMER 1.8.5 completed in 782 min and SAM 3.5 required 844 min.

Other applications. HMMER3.1’s nhmmer has recently been adopted as a search engine within the TE annotation tool, RepeatMasker 4.0, where in conjunction with Dfam, it supports a substantial boost in sensitivity in human DNA repeat annotation with better speed than the previous most sensitive method. The core pipeline of nhmmer has also been incorporated as an acceleration filter for the RNA homology search tool Infernal, where it supports fast filtering with negligible loss in Infernal sensitivity (E.Nawrocki and S.R.Eddy, unpublished data). We anticipate that nhmmer will similarly benefit other domains of DNA sequence comparison that depend on discriminative detection of remote homologs.

References 23

  1. 1.

    Altschul SF, et al. Basic local alignment search tool. J. Mol. Biol. 1990;215:403-410.

    Not in our library10.1016/s0022-2836(05)80360-2

  2. 2.
  3. 3.

    Durbin R, et al. Biological Sequence Analysis: Probabilistic Models of Proteins and Nucleic Acids. 1998.

    Not in our library

  4. 4.
  5. 5.

    Eddy SR. A new generation of homology search tools based on probabilistic inference. Genome Inform. 2009;23:205-211.

    Not in our library

  6. 6.
  7. 7.

    Eddy SR, Wheeler TJ. The HMMER3.1 user’s guide. 2013.

    Not in our library

  8. 8.

    Farrar M. Striped Smith-Waterman speeds database searches six times over other SIMD implementations. Bioinformatics. 2007;23:156-161.

    Not in our library10.1093/bioinformatics/btl582

  9. 9.

    Gardner PP, et al. Rfam: Wikipedia, clans and the “decimal” release. Nucleic Acids Res. 2011;39:D141-D145.

    Not in our library10.1093/nar/gkq1129

  10. 10.

    Grundy WN. 1998.

    Not in our library

  11. 11.

    Hughey R, Krogh A. SAM: sequence alignment and modeling software system. Technical report UCSC-CRL-95-07. 1995.

    Not in our library

  12. 12.

    Karplus K, et al. Hidden Markov models for detecting remote protein homologies. Bioinformatics. 1998;14:846-856.

    Not in our library10.1093/bioinformatics/14.10.846

  13. 13.

    Kent WJ. BLAT–the BLAST-like alignment tool. Genome Res. 2002;12:656-664.

    Not in our library10.1101/gr.229202

  14. 14.

    Krogh A, et al. Hidden Markov models in computational biology: applications to protein modeling. J. Mol. Biol. 1994;235:1501-1531.

    Not in our library10.1006/jmbi.1994.1104

  15. 15.
  16. 16.
  17. 17.

    Li H, Durbin R. Fast and accurate short read alignment with Burrows–Wheeler transform. Bioinformatics. 2009;25:1754-1760.

    Not in our library10.1093/bioinformatics/btp324

  18. 18.
  19. 19.

    Nawrocki EP, et al. Infernal 1.0: Inference of RNA alignments. Bioinformatics. 2009;25:1335-1337.

    Not in our library10.1093/bioinformatics/btp157

  20. 20.

    Schwartz S, et al. Human–mouse alignments with BLASTZ. Genome Res. 2003;13:103-107.

    Not in our library10.1101/gr.809403

  21. 21.

    Smit AFA, Hubley R. RepeatMasker. 2013.

    Not in our library

  22. 22.

    Smith TF, Waterman MS. Identification of common molecular subsequences. J. Mol. Biol. 1981;147:195-197.

    Not in our library10.1016/0022-2836(81)90087-5

  23. 23.

    Wheeler TJ, et al. Dfam: a database of repetitive DNA based on profile hidden Markov models. Nucleic Acids Res. 2013;41:D70-D82.

    Not in our library10.1093/nar/gks1265

Cited by papers we hold 25

and 5 more

Reads

Read by people on this page

None yet.

Checked or read by AI through naulon

None yet.

A person counts once a day per paper. We keep no cookie and no address: a reader is a hash that changes every day. Any month under five reads shows no number.

Are you an author?

Is this your paper?

Claim it to add your note and be paid when agents cite it. Free.