skillfed

pysylph

PyO3 bindings and Python interface to sylph, an ultrafast method for containment ANI querying and taxonomic profiling.

pysylph v0.1.2 119.0K downloads/30d#12,092 on PyPI20
Permissive license MIT DORMANT released

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 pysylph

uv

uv add pysylph

poetry

poetry add pysylph

Installing 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

Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: RustTopic :: Scientific/Engineering :: Bio-InformaticsTopic :: Scientific/Engineering :: Medical Science Apps.Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

ANI querying pythonmetagenomic profilingtaxonomic profiling genomicsgenome containment analysissylph python bindingsfast sequence comparisonmetagenome analysis
bioinformaticsgenomicsmetagenomics

More Python Modules packages