Skip to main content

SAPPHYRE

Gene recovery from genome assemblies and unassembled reads, for phylogenomics and comparative genomics

PyPI Python 3.10 to 3.14 Linux x86-64 or WSL2 GPL-3.0-or-later

Installation  ·  User Guide  ·  Quick start  ·  Issues


SAPPHYRE pipeline: prepare, diamond, hmmsearch, reporter, align, flexcull, outlier and merge run per taxon; reconcile and finalize combine all taxa into per-gene alignments

SAPPHYRE finds every gene of a reference set (an orthoset) in each of your genomes or read libraries, builds a gene model or contig for it, and aligns all samples gene by gene into matrices ready for tree building.

  • Genome assemblies. Single-copy orthologs by default, or every copy of a multi-copy gene family with -gfm multi. Gene models carry their exon structure, alternative coding paths and pseudogene tags, with a cluster table and GFF.
  • Unassembled reads. Short-read libraries are trimmed, searched and assembled gene by gene, with no genome assembly.
  • Sensitive searches. Translated DIAMOND searches find candidate regions; frameshift-aware BATH profile searches confirm them and recover exons DIAMOND missed.

Install

pip install sapphyre

Linux x86-64 (glibc 2.28 or newer) or WSL2, with CPython 3.10 to 3.14. Install these programs as well and put them on your PATH:

Program Get it
Required DIAMOND 2.1.6+ mamba install -c bioconda diamond
BATH 2.0 release binary or source build
HMMER 3.4 mamba install -c bioconda hmmer
Optional MAFFT, Clustal Omega, BLAST+, SRA Toolkit, Kraken2 only for the options that use them

Then check with sapphyre --version. The Installation Guide walks through every step.

Quick start

From a folder that holds input/MyGenomes/ (one FASTA file per genome) and orthosets/MySet/ (a reference set built with sapphyre makeref):

# 1. Find and model every gene in every genome
sapphyre -p 32 -v -os MySet auto input/MyGenomes

# 2. Combine the genomes gene by gene and align them
sapphyre -p 32 -v -os MySet reconcile datasets/MyGenomes -out MyGenomes_MySet

# 3. Filter, rename and package the alignments
sapphyre -p 8 -v finalize MyGenomes_MySet -ct -r

The finished alignments are in MyGenomes_MySet/Processed/Target/. Global options (-p, -v, -os, -gfm) go before the command name; add -gfm multi to all three commands for multi-copy gene families. The User Guide covers reads, multi-copy families, iteration, building orthosets, output layout and troubleshooting.

Commands

Command What it does
auto Run the per-taxon pipeline, from any stage (-s) and with optional per-stage settings (-cfg)
prepare · diamond · hmmsearch · reporter · align · flexcull · outlier · merge The per-taxon stages, also runnable one at a time
reconcile · finalize Combine all taxa per gene, align, and package the final matrices
iterate Turn recovered copies into extra references for another round (-gfm multi)
makeref Build an orthoset from per-gene FASTA, OrthoDB downloads or an Orthograph database
toolset download · taxonomy · repack · archive · kraken-screen · crosscontam · decontam · refine · flanks · isoform

Every command documents itself: sapphyre -h, sapphyre <command> -h, sapphyre toolset <tool> -h. Exit status is 0 on success, 1 on failure, 2 for invalid arguments and 3 when some inputs failed while others completed.

Development

git clone https://github.com/kevinmoran1988/SAPPHYRE && cd SAPPHYRE
pip install -e . pytest && pytest -q tests   # unit tests need no external tools

Bug reports and questions: https://github.com/kevinmoran1988/SAPPHYRE/issues.

Credits and licence

Sapphyre is licensed under GPL-3.0-or-later (LICENSE).

Third-party programs, ported code, data and methods

It uses these programs:

  • DIAMOND: Buchfink, Reuter & Drost (2021), Nature Methods 18:366-368
  • BATH: Krause, Shands & Wheeler (2024), Bioinformatics Advances 4:vbae088
  • HMMER 3: Eddy (2011), PLoS Computational Biology 7:e1002195
  • FAMSA: Deorowicz, Debudaj-Grabysz & Gudyś (2016), Scientific Reports 6:33964
  • MAFFT (optional): Katoh & Standley (2013), Molecular Biology and Evolution 30:772-780
  • Clustal Omega (optional): Sievers et al. (2011), Molecular Systems Biology 7:539
  • BLAST+ (toolset crosscontam): Camacho et al. (2009), BMC Bioinformatics 10:421
  • SRA Toolkit (toolset download): NCBI

It contains code ported from:

  • NCBI SEG as in BLAST+ (public domain): low-complexity masking; Wootton & Federhen (1993), Computers & Chemistry 17:149-163

Its compiled engine, sapphyre_tools, contains code ported from:

  • BATH, HMMER and Easel (BSD 3-clause): profile HMM alignment and its SIMD
  • fastp (MIT): read trimming, adapter detection and overlap correction; Chen, Zhou, Chen & Gu (2018), Bioinformatics 34:i884-i890

Its codon alignment (pn2codon) began as a port of PAL2NAL and has since been rewritten: Suyama, Torrents & Bork (2006), Nucleic Acids Research 34:W609-W612.

The notices of all of these are in LICENSE-THIRD-PARTY.

Data, formats and methods:

  • makeref reads OrthoDB gene sets: Tegenfeldt et al. (2025), Nucleic Acids Research 53:D516-D522
  • makeref also reads Orthograph's SQLite ortholog sets: Petersen et al. (2017), BMC Bioinformatics 18:111
  • toolset download fetches from NCBI Datasets (O'Leary et al. 2024, Scientific Data 11:732) and the Sequence Read Archive (Leinonen, Sugawara & Shumway 2011, Nucleic Acids Research 39:D19-D21)
  • finalize counts missing data as Dietz et al. (2023), Methods in Ecology and Evolution 14:543-555
  • Donor splice site frequencies are from Senapathy, Shapiro & Harris (1990), Methods in Enzymology 183:252-278

Metadata

Release files for sapphyre 0.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sapphyre 0.12.0
File Size Uploaded Provenance Actions
sapphyre-0.12.0.tar.gz 631.0 kB Without provenance Details for sapphyre-0.12.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sapphyre 0.12.0
File Interpreter ABI Platform Actions
sapphyre-0.12.0-py3-none-any.whl Python 3 none any Details for sapphyre-0.12.0-py3-none-any.whl

Total release size: 1.2 MB

Release files / sapphyre-0.12.0.tar.gz

Download URL sapphyre-0.12.0.tar.gz
Size 631.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f48ee4903edf6f7e5e2b2887dba822ea82a3b10164dc46eea94f3b43ad48008b
BLAKE2b-256 checksum
How to use checksums
b04d34019044ce1fae16dfa7c7ffeedb7b149c9fde5515e71e3012cb1012d54e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / sapphyre-0.12.0-py3-none-any.whl

Download URL sapphyre-0.12.0-py3-none-any.whl
Size 591.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7195ba020e79078b6ea39b720399a2678eac1016287afdb5061b768e19bb8b89
BLAKE2b-256 checksum
How to use checksums
e0881e264ce1a53859f186c1e2a0af0f038c59f901194c5f2327a0bb866776d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for sapphyre 0.12.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.12.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page