pysylph
PyO3 bindings and Python interface to sylph, an ultrafast method for containment ANI querying and taxonomic profiling.
What it is and what it does
Pysylph is a PyO3-based Python wrapper around sylph, a specialized bioinformatics tool for rapid ANI containment queries and metagenomic taxonomic profiling. It lets you sketch genome collections into searchable databases and query metagenomic samples against them to estimate species composition and sequence similarity. All computation happens in memory using Python objects you control, eliminating the need for temporary files or external binaries.
The package targets bioinformaticians and researchers working with shotgun metagenomic data. It uses a statistical model based on Poisson coverage to compute coverage-adjusted ANI rather than naive ANI, making it suitable for real-world sequencing data with uneven coverage. Pre-built wheels for x86-64 and Arm64 platforms reduce installation friction, though the package remains in alpha and explicitly warns of API instability between minor versions.
Use it for:
- Build and query genome sketch databases for rapid species identification in metagenomic samples
- Perform taxonomic profiling of shotgun sequencing reads against reference genome collections
- Integrate ANI containment queries into Python-based bioinformatics pipelines without CLI wrappers
- Parallelize genome sketching or sample querying using ThreadPool for large-scale analyses
- Load and query databases created by the standalone sylph binary within Python workflows
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Pysylph provides Python bindings to sylph, enabling fast ANI (Average Nucleotide Identity) querying and taxonomic profiling of metagenomic samples against genome databases.
Yes, if you are doing metagenomic profiling or ANI queries in Python and accept the alpha-stage API instability. The permissive MIT license, zero runtime dependencies, and pre-built wheels make installation straightforward. However, the 647-day gap since last release and dormant maintenance status mean you should verify that the current API meets your needs and be prepared to pin the version or fork if breaking changes occur in future releases.
Install
pysylph on PyPI
pip
pip install pysylphuv
uv add pysylphpoetry
poetry add pysylphInstalling pysylph
Before you install
Medium install friction due to compiled Rust components, but pre-built wheels are available for common platforms (x86-64, Arm64) across Python 3.7–3.13. The package is dormant (last commit 2024-12-12, no releases in 647 days), which may affect responsiveness to issues.
License in practice
MIT license is permissive and poses no restrictions on use, modification, or distribution. The package vendors additional Rust dependencies under their own terms via cargo vendor.
Quickstart
pip install pysylph
import pysylph
sketcher = pysylph.Sketcher()
sketch = sketcher.sketch_genome(name="genome1", contigs=["ACGTACGT"])
database = pysylph.Database([sketch])
reads = ["ACGTACGT"]
sample = sketcher.sketch_single(name="sample1", reads=reads)
profiler = pysylph.Profiler()
results = profiler.query(sample, database)
Requires Python 3.7 or later and a platform with pre-built wheels (x86-64 or Arm64 Linux, macOS, or Windows) or a Rust toolchain to compile from source.
Verify before relying
- Whether the experimental API (noted as work-in-progress with likely breaks between minor versions) is stable enough for production use
- Performance characteristics and scalability limits for large genome databases or high-throughput sample querying
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 647 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 119,037/month — #12,092 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pysylph-0.1.2-cp310-cp310-macosx_10_12_x86_64.whl; pysylph-0.1.2-cp310-cp310-macosx_11_0_arm64.whl; pysylph-0.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pysylph-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pysylph-0.1.2-cp310-none-win_amd64.whl; pysylph-0.1.2-cp311-cp311-macosx_10_12_x86_64.whl; pysylph-0.1.2-cp311-cp311-macosx_11_0_arm64.whl; pysylph-0.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pysylph-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pysylph-0.1.2-cp311-none-win_amd64.whl; pysylph-0.1.2-cp312-cp312-macosx_10_12_x86_64.whl; pysylph-0.1.2-cp312-cp312-macosx_11_0_arm64.whl; pysylph-0.1.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pysylph-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pysylph-0.1.2-cp312-none-win_amd64.whl; pysylph-0.1.2-cp313-none-win_amd64.whl; pysylph-0.1.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pysylph-0.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pysylph-0.1.2-cp37-none-win_amd64.whl; pysylph-0.1.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Keywords: bioinformatics, genomics, ani, taxonomy, profiling
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pyhmmerPyHMMER provides Python bindings to HMMER3, a…
permissive · top 5,000 on PyPI
dnaiodnaio reads and writes FASTQ, FASTA, and uBAM…
permissive · top 15,000 on PyPI
biotiteBiotite provides a unified Python library for…
permissive · top 5,000 on PyPI
biopythonBiopython provides Python tools for…
unclear · top 5,000 on PyPI
pybigtoolspybigtools is a Python wrapper around a Rust…
permissive · top 15,000 on PyPI
pysampysam reads, manipulates, and writes genomic…
permissive · top 5,000 on PyPI
RUSTRUST normalizes ribosome profiling (Ribo-seq)…
permissive · top 15,000 on PyPI
pyensemblPyEnsembl provides a Python interface to query…
permissive · top 15,000 on PyPI
refgenconfManages standardized configuration for…
permissive · top 15,000 on PyPI
refgenieRefgenie manages standardized folder structures…
permissive · top 15,000 on PyPI