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; Gurobi is recommended for genome-scale work. See Choosing a solver.

Tip

Use a virtual environment

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

Note

Working offline 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.


Install#

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 .

Verify#

import raven_toolbox
print(raven_toolbox.__version__)

Note

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


Upgrade#

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

Remove#

pip uninstall raven-toolbox

Solver configuration#

raven-toolbox uses cobrapy's solver interface:

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