Skip to main content

Reconstruction, Analysis and Visualization of Metabolic Networks in Python, a port of the RAVEN Toolbox built on cobrapy

Project description

raven-toolbox

CI

Reconstruction, Analysis and Visualisation of Metabolic Networks — in Python.

raven-toolbox is the Python counterpart of the RAVEN Toolbox 2 (MATLAB). It builds on cobrapy for everything cobrapy already does well (simulation, standard analyses, SBML I/O, model manipulation) and adds the functionality that's unique to RAVEN:

  • De novo reconstruction from KEGG and protein homology (BLAST / DIAMOND).
  • Context-specific models from omics data via tINIT / ftINIT, with task-aware gap-filling and the linear-merge MILP reduction.
  • Metabolic-task validation (check_tasks, fitTasks).
  • Connectivity gap-filling against template models.
  • Omics integration — Human Protein Atlas (proteomics + RNA-seq) ingestion.
  • Sub-cellular localisation prediction by MILP, with partial-update mode and pluggable evidence sources (DeepLoc 2, MULocDeep, COMPARTMENTS, UniProt, …).
  • N-model comparison; reporter metabolites; FSEOF; flux sampling.
  • YAML I/O following the cobra standard, plus geckopy's ec-* enzyme-constrained fields. SIF export. RAVEN-style Excel export.

The status of every RAVEN function (ported, cheatsheet-mapped to cobra, or explicitly not ported) is documented function-by-function in docs/raven_migration.md.

Design principle

The canonical in-memory object is always a cobra.Model. There is no parallel RAVEN struct, no ravenCobraWrapper-style adapter. RAVEN-specific fields that cobra doesn't model natively (rxnMiriams, metDeltaG, rxnConfidenceScores, …) live in cobra's annotation / notes dictionaries. This avoids duplicating cobra's data model and keeps raven-toolbox interoperable with the wider COBRA ecosystem.

Status

raven-toolbox has been validated against MATLAB RAVEN on Human-GEM (5 Hart2015 cell-line models, Jaccard 0.975–0.980 — see docs/humangem_validation.md). The functional scope of the original RAVEN toolbox is covered with three principled omissions, all deliberately out of scope rather than pending work:

  • MetaCyc-based reconstruction is not implemented and is flagged for removal from MATLAB RAVEN as well — see IMPROVEMENTS.md under R-MetaCyc.
  • Dynamic FBA is not implemented — several maintained Python packages already cover it (dfba, reframed, mewpy).
  • Metabolomics-based scoring in tINIT / ftINIT is not implemented — passing a non-empty metabolomics argument raises NotImplementedError.

Installation (development)

git clone https://github.com/SysBioChalmers/raven-toolbox
cd raven-toolbox
pip install -e ".[dev]"

raven-toolbox requires Python ≥ 3.11. Genome-scale (f)tINIT MILPs currently require Gurobi (details on solver portability); toy and unit-test work runs on the open-source GLPK.

External command-line tools (BLAST, DIAMOND, HMMER, MAFFT, CD-HIT)

Some workflows call external tools. For most users there is nothing to do — raven-toolbox downloads each tool it needs automatically the first time it's used.

Which tools a workflow uses:

Workflow Tools
Homology-based reconstruction blastp + makeblastdb, or diamond
KEGG HMM query (getKEGGModelForOrganism) hmmsearch
Building the KEGG HMM libraries (maintainers) hmmbuild, mafft, cd-hit

Optional:

  • Fetch them up front instead of on first use:
    raven-toolbox-binaries --set runtime   # blastp, makeblastdb, diamond, hmmsearch
    raven-toolbox-binaries --set build     # hmmbuild, mafft, cd-hit
    
  • Use your own install — if a tool is on your PATH it's used instead of a download, e.g. conda install -c bioconda blast diamond hmmer mafft cd-hit.
  • Disable automatic downloads (air-gapped / conda-only setups): set RAVEN_PYTHON_AUTOFETCH=0.

Windows: homology reconstruction and the KEGG species model work as-is. To build the KEGG HMM libraries (needs MAFFT/CD-HIT), use WSL2.

Documentation

The documentation is built with Sphinx (MyST Markdown); the source lives in docs/ — see docs/README.md for the layout and local-build instructions. (A hosted ReadTheDocs site is not yet published.)

Relationship to MATLAB RAVEN

raven-toolbox is an independent Python reimplementation of the RAVEN Toolbox 2, released under the permissive MIT license. If you use it in scientific work, please cite the RAVEN 2 paper:

Wang H, Marcišauskas S, Sánchez BJ, Domenzain I, Hermansson D, Agren R, Nielsen J, Kerkhoven EJ. (2018) RAVEN 2.0: A versatile toolbox for metabolic network reconstruction and a case study on Streptomyces coelicolor. PLoS Comput Biol 14(10): e1006541.

License

MIT

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

raven_toolbox-0.3.0.tar.gz (3.1 MB view details)

Uploaded Source

Built Distribution

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

raven_toolbox-0.3.0-py3-none-any.whl (294.0 kB view details)

Uploaded Python 3

File details

Details for the file raven_toolbox-0.3.0.tar.gz.

File metadata

  • Download URL: raven_toolbox-0.3.0.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for raven_toolbox-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4af3aae0a6da21c0b9f1bfa72fcbdafd322ed0890f3974af585e47c2d9eb1fbf
MD5 23e873404385fac72b90fd5d4c0341ab
BLAKE2b-256 bc1ec66e38bab410427885800ec4dd80b346a71952cec1159cb421a4c3eb2231

See more details on using hashes here.

Provenance

The following attestation bundles were made for raven_toolbox-0.3.0.tar.gz:

Publisher: release.yml on SysBioChalmers/raven-toolbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raven_toolbox-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: raven_toolbox-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 294.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for raven_toolbox-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd04546fc636f8df1137ec24854aa7580a4103f3224d1bd3cccaee80b24364cb
MD5 3ab967a7e3226d62d88eb0c468e6182e
BLAKE2b-256 c360481e2ad22ac3fc0f9e8bf6290a0bd485287ba91a7baaab80d65b1f1d48e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for raven_toolbox-0.3.0-py3-none-any.whl:

Publisher: release.yml on SysBioChalmers/raven-toolbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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