This section of the documentation shows several examples adapted from real examples, and running with the latest version of the PyHMMER interface.

Code & Data

This section shows more practical tutorials about how you can use the PyHMMER API in combination with Python and other Python libraries:

Dependent projects

PyHMMER is being used in several projects, including:

  • GECCO, a tool for detecting Biosynthetic Gene Clusters in genomic data, uses PyHMMER to annotate proteins with Pfam domains to use as sequence features for a machine learning model.

  • BiG-SLICE, an interactive tool for the large scale analysis of Biosynthetic Gene Clusters data, uses PyHMMER for the Pfam domain annotation step.

  • duomolog, a method to identify the best set of homologous sequences from two homology searching approaches, uses PyHMMER to search for homologous sequences before comparing the results to BLAST hits.

  • cinful, a pipeline to identify microcins along with their associated immunity proteins and export machinery, uses PyHMMER to build HMMs from MAFFT-derived alignments, and to run hmmsearch.

  • BUSCOlite, a package for running simplified BUSCO analysis for gene prediction, uses PyHMMER to discover Conserved Orthologous Genes.

  • FastAAI, a package providing fast estimation of Average Amino Acid Identities (AAI) for bacterial and viral genomes, uses PyHMMER to detect bacterial and archaeal domains.

  • SADIE, the Sequencing Analysis and Data library for Immunoinformatics Exploration, uses PyHMMER as an aligner backend to re-number sequence alignment columns.

  • GSub, a GUI for submitting viral sequences to GenBank, uses PyHMMER to detect potential polymerase-encoding ORFs.

  • Bakta, a standardised annotation tool for bacterial genomes and plasmids, uses PyHMMER to annotate genes with different HMM libraries such as AntiFam or Pfam.

  • Pharokka, a rapid standardised annotation tool for bacteriophage genomes and metagenomes, uses PyHMMER to annotate genes with the PHROGS HMMs.


If you use PyHMMER in a scientific context, feel free to open a pull request to add yourself to the list!

External resources

The pytrimal documentation contains an example for building an HMM with PyHMMER from a trimmed alignment, check it here.

For a more detailed explanation of HMMER features, you should also check the HMMER User’s Guide.