--- id: pyhmmer version: "0.12.2" license: MIT AND BSD-3-Clause AND BSD-2-Clause license_treatment: permissive maintenance: active --- # pyhmmer — Cython bindings and Python interface to HMMER3. License: permissive · Maintenance: active · Downloads: 1.6M/mo ## What it is and what it does PyHMMER wraps HMMER3, a mature bioinformatics tool for finding sequence homologs using profile hidden Markov models. Instead of spawning external binaries and parsing fixed-width text output, it exposes HMMER's C internals directly through Cython, letting you work entirely in memory with Python objects. You load sequences and HMM profiles, run searches like hmmsearch or hmmscan, and get back structured hit objects you can query and filter in Python—no temporary files, no output parsing, no intermediate format conversions. The package is designed for researchers and pipeline developers who want to embed HMMER searches into Python workflows without managing separate HMMER installations. It supports building HMMs from alignments, scanning sequences against profile databases, and aligning sequences to profiles. Parallelization uses Python threads and can adapt to multi-CPU systems. The single runtime dependency is psutil, and pre-built wheels cover most common platforms, though Unix-only HMMER internals mean Windows is not supported. Use it for: - Annotate protein domains in genomic data by searching sequences against Pfam or custom HMM libraries within a Python pipeline. - Build HMMs from multiple sequence alignments and immediately search them against a sequence database without leaving Python. - Integrate sequence homology detection into automated genome analysis or metagenomics workflows that already use Biopython or similar libraries. - Retrieve and filter high-scoring hits from HMMER searches programmatically, sorting or post-processing results in memory. - Parallelize hmmsearch or hmmscan across multiple CPUs for faster annotation of large sequence sets. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PyHMMER provides Python bindings to HMMER3, a biological sequence analysis tool that uses profile hidden Markov models to search for sequence homologs in protein or DNA databases. Yes. PyHMMER is actively maintained, has no known vulnerabilities, carries permissive licenses, and solves a real problem for bioinformatics workflows—embedding HMMER searches in Python without subprocess overhead or output parsing. Medium install friction is acceptable given the availability of pre-built wheels and the value of in-memory, structured access to HMMER results. Suitable for research and production use. ## Install pip install pyhmmer uv add pyhmmer poetry add pyhmmer ## Installing pyhmmer Before you install: Medium install friction due to compiled C/Cython components, but pre-built wheels are available for Linux and macOS on x86-64 and Arm64. Actively maintained with a release just 1 day old and ongoing repository activity. License in practice: Licensed under MIT, BSD-3-Clause, and BSD-2-Clause—all permissive licenses. No restrictions on commercial or private use. Quickstart: pip install pyhmmer import pyhmmer with pyhmmer.easel.SequenceFile("sequences.faa", digital=True) as seq_file: sequences = seq_file.read_block() with pyhmmer.plan7.HMMFile("model.hmm") as hmm_file: for hits in pyhmmer.hmmsearch(hmm_file, sequences, cpus=4): print(f"Found {len(hits)} hits for {hits.query.name}") HMMER3 internals are Unix-only; Windows is not supported. Requires a C compiler and Cython for source builds on platforms without pre-built wheels. Verify before relying: - Whether PyPy support (listed in classifiers) is actively tested and maintained alongside CPython. - Performance characteristics on very large sequence databases or HMM libraries beyond the Pfam benchmark mentioned. ## Package facts - License: MIT AND BSD-3-Clause AND BSD-2-Clause (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 1.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags hmmer python bindings, sequence homology search, profile hidden markov models, biological sequence analysis, hmmsearch hmmscan python, protein domain annotation, pfam hmm search, bioinformatics, sequence-analysis, cython-bindings [View on SkillFed](https://skillfed.io/packages/pyhmmer) · [View on PyPI](https://pypi.org/project/pyhmmer/)