raven-toolbox (Python)#

raven-toolbox is the Python implementation of RAVEN, built on cobrapy. It is distributed on PyPI.

Requirements#

  • Python ≥ 3.11

  • cobrapy, installed automatically as a dependency

  • A solver: GLPK (bundled with cobrapy) works for small and medium models, and Gurobi is recommended for genome-scale work. See Choosing a solver.

A virtual environment is recommended. Creation and activation:

python -m venv .venv
source .venv/bin/activate      # Windows: .venv\Scripts\activate

raven-toolbox fetches KEGG data and reconstruction binaries (BLAST+, DIAMOND, HMMER) on first use. Download data and binaries covers preparing a machine with no network access ahead of time.


Installation#

pip install raven-toolbox

For the latest unreleased code or to contribute:

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

Verification#

import raven_toolbox
print(raven_toolbox.__version__)

The import package is raven_toolbox (underscore) and the PyPI distribution name is raven-toolbox (hyphen).


Upgrading#

pip install --upgrade raven-toolbox
git pull origin develop

Removal#

pip uninstall raven-toolbox

Solver configuration#

raven-toolbox uses cobrapy's solver interface:

import cobra
cobra.Configuration().solver = "gurobi"   # or "glpk"