Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

RAVEN

CI PyPI Documentation GitHub Discussions

Documentation · Installation · Guide · API reference · Compare with RAVEN · Citations

raven-toolbox

Reconstruction, Analysis and Visualisation of Metabolic Networks in Python: the Python counterpart of the RAVEN Toolbox (MATLAB). raven-toolbox builds on cobrapy for simulation, standard analyses, SBML input and output, and model manipulation, and it adds the functionality that is specific to RAVEN:

  • Reconstruction from KEGG and from protein homology (BLAST or DIAMOND).
  • Context-specific models from omics data with ftINIT, with task-aware gap-filling, the linear-merge MILP reduction and scoring with metabolomics.
  • Validation with metabolic tasks (check_tasks, find_task_essential_reactions).
  • Gap-filling: connectivity gap-filling against template models, and LP, SWIFTCORE, MILP and topological strategies.
  • Omics integration with Human Protein Atlas data (proteomics and RNA-seq).
  • Prediction of sub-cellular localisation by MILP, with a partial-update mode and exchangeable evidence sources (DeepLoc 2, MULocDeep, COMPARTMENTS, UniProt).
  • Comparison of several models, reporter metabolites, FSEOF, and flux sampling (ACHR, CHRR and the random-objective vertex method).
  • YAML input and output that follows the cobra standard and adds the ec-* fields for enzyme-constrained models of geckopy, and export to the RAVEN Excel format.

RAVEN 3 and raven-toolbox gives the status of every RAVEN function: ported, mapped to a cobra equivalent, or not ported.

Design

The in-memory model is a cobra.Model. raven-toolbox has no RAVEN struct and no adapter for one. Fields that cobra does not model, such as rxnMiriams, metDeltaG and rxnConfidenceScores, are kept in the annotation and notes dictionaries of cobra. This keeps raven-toolbox interoperable with the COBRA ecosystem.

Status

raven-toolbox 3.x tracks the RAVEN 3 pre-releases and is a pre-release itself (releases, changelog). On Human-GEM, the five cell-line models of Hart2015 extracted with ftINIT have a Jaccard index against MATLAB RAVEN of 0.964 to 0.982 without tasks and 0.981 to 0.988 with tasks (Human-GEM validation).

Three functions of RAVEN are not implemented:

  • Classic tINIT. raven-toolbox has no installed base of tINIT models, and ftINIT supersedes tINIT. MATLAB RAVEN keeps both for backward compatibility.
  • MetaCyc-based reconstruction, which is flagged for removal from MATLAB RAVEN as well (IMPROVEMENTS.md, R-MetaCyc).
  • Dynamic FBA, which maintained Python packages cover (dfba, reframed and mewpy).

Install

The 3.x releases are pre-releases, so pip needs --pre. Without it, pip installs the older stable release 0.4.0.

pip install --pre raven-toolbox

Python 3.11 or newer is required. The unreleased code on develop installs from git:

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

Genome-scale ftINIT problems need Gurobi (ftINIT on different solvers), and small models and the unit tests run on the open-source GLPK. Installation describes the solver configuration.

External command-line tools

BLAST, DIAMOND and HMMER (and MAFFT and CD-HIT for building HMM libraries) are downloaded the first time a workflow needs them. A tool on the PATH takes precedence over a download, raven-toolbox-binaries --set runtime fetches the tools in advance, and RAVEN_PYTHON_AUTOFETCH=0 disables downloads for air-gapped systems. Download data and binaries lists the tools per workflow, the cache locations and the platforms. On Windows, homology reconstruction and the KEGG species model run natively, and building the KEGG HMM libraries needs WSL2.

SuppOrth orthologs can start a homology reconstruction. hits_from_supporth reads an existing suppOrth.tsv and needs nothing else. run_supporth needs the suppOrth command, which is not downloaded automatically and runs on Linux and macOS: pip install 'git+https://github.com/fma91/SuppOrth.git@stand_alone', then suppOrth install.

Quick start

from raven_toolbox.io import read_yaml_model

model = read_yaml_model("yeast-GEM.yml")      # a cobra.Model
model.objective = "r_2111"                    # growth
model.reactions.get_by_id("r_1714").lower_bound = -1.0   # glucose uptake
print(model.optimize().objective_value)       # cobrapy

Getting started continues from here.

Documentation and support

raven-docs documents MATLAB RAVEN and raven-toolbox side by side: each task is shown in both languages, and the CI of the documentation runs the examples in both. This repository has no prose documentation of its own. The API reference on the site is generated from the docstrings here when the site is built. CONTRIBUTING.md has the notes for contributors and maintainers, and raven-gecko-parity holds the roadmap, the backlog and the MATLAB parity record. Use GitHub Discussions for questions.

Cite us

raven-toolbox is an independent Python reimplementation of RAVEN. 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. doi:10.1371/journal.pcbi.1006541.

License

GPL-3.0

Metadata

Release files for raven-toolbox 3.0.0b2

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

Source distribution (sdist)

Source distribution for raven-toolbox 3.0.0b2
File Size Uploaded Provenance Actions
raven_toolbox-3.0.0b2.tar.gz 752.7 kB With provenance Details for raven_toolbox-3.0.0b2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for raven-toolbox 3.0.0b2
File Interpreter ABI Platform Actions
raven_toolbox-3.0.0b2-py3-none-any.whl Python 3 none any Details for raven_toolbox-3.0.0b2-py3-none-any.whl

Total release size: 1.2 MB

Release files / raven_toolbox-3.0.0b2.tar.gz

Download URL raven_toolbox-3.0.0b2.tar.gz
Size 752.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dd27631ea69c2cd70f00f7a7fe9a77486d4ef1ada9ec46e19abe366f4edd749a
BLAKE2b-256 checksum
How to use checksums
f7db4511eeb8fdb65110c49feee2e655245c8ccaa6a9e3a4faa146a3a27f7d87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / raven_toolbox-3.0.0b2-py3-none-any.whl

Download URL raven_toolbox-3.0.0b2-py3-none-any.whl
Size 458.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e150f90975249c37cbda4c4614a4447e7edfe3a8d3fa7c84a7ddc0986f7be1ea
BLAKE2b-256 checksum
How to use checksums
b466bac48c53abc297cfcd1f91d206b757ed834f4c310f480cf9073fe598773f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Security for raven-toolbox 3.0.0b2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for raven_toolbox-3.0.0b2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

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.

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