Skip to main content

orthosnap, identify orthologous subgroups of genes in large orthologous groups of genes.

Project description

Logo

Docs · Report Bug · Request Feature


OrthoSNAP is a tree splitting and pruning tool for retrieving single-copy orthologous subgroups (SNAP-OGs) from larger gene families.

If you found OrthoSNAP useful, please cite: OrthoSNAP: a tree splitting and pruning algorithm for retrieving single-copy orthologs from gene family trees. Steenwyk et al. 2022, PLOS Biology. DOI: 10.1371/journal.pbio.3001827.


Full usage documentation and tutorial: https://jlsteenwyk.com/orthosnap/

What's new in v1.6.0

Compared to v1.5.0 (plotting + performance improvements), v1.6.0 adds workflow-scale and reproducibility features:

  • --manifest: batch execution from TSV/CSV manifests.
  • --validate-only: preflight input concordance checks without extraction.
  • --structured-output: machine-readable run metadata (.run.json) and subgroup summaries (.subgroups.tsv).
  • --occupancy-count / --occupancy-fraction: explicit occupancy semantics.
  • --resume: skip rerunning completed analyses.
  • --bootstrap-trees + --consensus-min-frequency + --consensus-trees: consensus subgrouping across bootstrap tree uncertainty.

Compared to older releases:

  • v1.5.0 focused on plotting and runtime optimization.
  • v1.3.2 introduced configurable delimiters.
  • v1.2.0 added inparalog handling reports.
  • v1.0.0 and earlier focused on core pruning behavior.

Installation

Install with pip (recommended)

python -m venv .venv
source .venv/bin/activate
pip install orthosnap

Install from source

git clone https://github.com/JLSteenwyk/orthosnap.git
cd orthosnap
python -m venv .venv
source .venv/bin/activate
make install

Install with conda

conda install -c jlsteenwyk orthosnap

Conda package details: https://anaconda.org/jlsteenwyk/orthosnap

Quick start

orthosnap -f orthogroup_of_genes.faa -t phylogeny_of_orthogroup_of_genes.tre

Generate a color-coded SNAP-OG assignment plot for the full tree:

orthosnap -f orthogroup_of_genes.faa -t phylogeny_of_orthogroup_of_genes.tre -ps

Choose plot format (png default, pdf or svg):

orthosnap -f orthogroup_of_genes.faa -t phylogeny_of_orthogroup_of_genes.tre -ps -pf svg

Show all CLI options:

orthosnap -h

Performance development

The repository includes a deterministic benchmark for balanced and highly unbalanced multi-copy orthogroups, bootstrap processing, consensus-tree output, and CLI startup. See benchmarks/README.md for reproducible commands and current before/after runtime and memory results.

Run validation checks only (no subgroup extraction):

orthosnap -f orthogroup_of_genes.faa -t phylogeny_of_orthogroup_of_genes.tre --validate-only

Write structured provenance outputs (.run.json and .subgroups.tsv):

orthosnap -f orthogroup_of_genes.faa -t phylogeny_of_orthogroup_of_genes.tre --structured-output

Resume an interrupted or previously completed run:

orthosnap -f orthogroup_of_genes.faa -t phylogeny_of_orthogroup_of_genes.tre --resume

Use explicit occupancy semantics:

orthosnap -f orthogroup_of_genes.faa -t phylogeny_of_orthogroup_of_genes.tre --occupancy-count 5
orthosnap -f orthogroup_of_genes.faa -t phylogeny_of_orthogroup_of_genes.tre --occupancy-fraction 0.5

Run many orthogroups from a manifest (TSV/CSV with tree and fasta columns):

orthosnap --manifest runs.tsv --structured-output -op results/

Run bootstrap consensus mode using a file of tree paths (one per line):

orthosnap -f orthogroup_of_genes.faa -t reference.treefile --bootstrap-trees bootstrap_paths.txt --consensus-min-frequency 0.5

Also write consensus Newick trees:

orthosnap -f orthogroup_of_genes.faa -t reference.treefile --bootstrap-trees bootstrap_paths.txt --consensus-trees

Support

If installation fails in a clean virtual environment, contact Jacob L. Steenwyk via:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orthosnap-1.7.0.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orthosnap-1.7.0-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file orthosnap-1.7.0.tar.gz.

File metadata

  • Download URL: orthosnap-1.7.0.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for orthosnap-1.7.0.tar.gz
Algorithm Hash digest
SHA256 e4238a6df4882e50954c6f59dc6c2fae0ebe027144e8e68dd796431fde12d069
MD5 3da7995af86a9a0eb0f7fdfd209e455b
BLAKE2b-256 e16e26efd545d4553e19b465599bc21ee73e67d2a041a15804187bf91c5b5c01

See more details on using hashes here.

File details

Details for the file orthosnap-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: orthosnap-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for orthosnap-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2115ae619e103b2c7d5ec34f3e62c8e7d525705477bd0c096ab57dedcbf9974c
MD5 bf701a80f7da5789d727905ba3804170
BLAKE2b-256 09c661356a64dff987b3e30c237db9570463fc84d45bccf9e7d38b19d250e3cb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page