Skip to content

MATLAB & Python

Reconstruction, Analysis and Visualization
of Metabolic Networks

A toolkit for building, curating, and simulating genome-scale metabolic models — available as a MATLAB toolbox and a Python package built on cobrapy.

MIT license Python ≥ 3.11 MATLAB R2016b+ cobrapy SBML Gurobi · GLPK Windows · macOS · Linux DOI 10.1371/journal.pcbi.1006541
pip install raven-toolbox
  • Homology reconstruction

    Build draft models by transferring reactions from template models using BLAST+, DIAMOND, or HMMER.

  • KEGG-based reconstruction

    Reconstruct metabolic networks directly from KEGG organism annotations and pathway databases.

  • Flux analysis

    FBA, FVA, gene knockouts, MOMA, and sampling with Gurobi or GLPK solvers.

  • ftINIT

    Fast task-and-data-driven INIT for extracting context-specific models from transcriptomics data.

  • Gap-filling

    Identify and fill stoichiometric gaps by LP to restore connectivity or enable predicted growth.

  • Model curation

    Check mass and charge balance, dead-end metabolites, and metabolic task fulfilment.


import raven_toolbox as rv

# load yeast-GEM
model = rv.io.import_model("yeast-GEM.xml")

# set growth as the objective
rv.manipulation.set_objective(model, "r_2111")

# constrain glucose uptake to 1 mmol/gDW/h
model.reactions.get_by_id("r_1714").lower_bound = -1.0

# run FBA
sol = rv.analysis.run_fba(model)
print(f"Growth rate: {sol.objective_value:.4f} h⁻¹")
% load yeast-GEM
model = importModel('yeast-GEM.xml');

% set growth as the objective
model = setParam(model, 'obj', 'r_2111', 1);

% constrain glucose uptake to 1 mmol/gDW/h
model = setParam(model, 'ub', 'r_1714', 1);

% run FBA
sol = solveLP(model);
fprintf('Growth rate: %.4f h-1\n', -sol.f);

  • Installation

    Set up RAVEN in MATLAB or raven-toolbox in Python with a solver.

  • Guides

    End-to-end GEM reconstruction protocol and legacy tutorials.

  • API reference

    Complete function reference for both MATLAB and Python.


Citing RAVEN

If you use RAVEN in your research, please cite:

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 Computational Biology 14(10): e1006541. https://doi.org/10.1371/journal.pcbi.1006541

Agren R, Liu L, Shoaie S, Vongsangnak W, Nookaew I, Nielsen J (2013). The RAVEN toolbox and its use for generating a genome-scale metabolic model for Penicillium chrysogenum. PLoS Computational Biology 9(3): e1002980. https://doi.org/10.1371/journal.pcbi.1002980

If you use the GEM reconstruction protocol, also cite:

Zorrilla F, Kerkhoven EJ (2022). Reconstruction of Genome-Scale Metabolic Model for Hansenula polymorpha Using RAVEN. In: Mapelli V, Bettiga M (eds), Yeast Metabolic Engineering: Methods and Protocols, Methods in Molecular Biology, vol. 2513. Humana, New York, NY, pp. 271–290. https://doi.org/10.1007/978-1-0716-2399-2_16

See References for the full list including methods cited in the protocol.