Logo PySylph Stars#

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

Actions Coverage PyPI Bioconda AUR Wheel Versions Implementations License Source Mirror Issues Docs Changelog Downloads

Overview#

sylph is a method developed by Jim Shaw and Yun William Yu for fast and robust ANI querying or metagenomic profiling for metagenomic shotgun samples. It uses a statistical model based on Poisson coverage to compute coverage-adjusted ANI instead of naive ANI.

pysylph is a Python module, implemented using the PyO3 framework, that provides bindings to sylph. It directly links to the sylph code, which has the following advantages over CLI wrappers:

Batteries-included

Just add pysylph as a pip or conda dependency, no need for the HMMER binaries or any external dependency.

Flexible

Create input GenomeSketch and SampleSketch objects with the API, or load them from a file.

Practical

Retrieve nested results as lists of AniResult objects, write them to a file, or use them for further Python analysis.

Setup#

Run pip install pysylph in a shell to download the latest release and all its dependencies from PyPi, or have a look at the Installation page to find other ways to install pysylph.

Citation#

Pysylph is scientific software, and builds on top of sylph. Please cite sylph if you are using it in an academic work, for instance as:

pysylph, a Python library binding to sylph (Shaw & Yu, 2024).

Library#

License#

This library is provided under the MIT License. It contains some code included verbatim from the the sylph source code, which was written by Jim Shaw and is distributed under the terms of the MIT License as well. Source distributions of pysylph vendors additional sources under their own terms using the cargo vendor command. See the Copyright Notice section for more information.

This project is in no way not affiliated, sponsored, or otherwise endorsed by the original sylph authors. It was developed by Martin Larralde during his PhD project at the Leiden University Medical Center in the Zeller team.