raven-toolbox (Python)#

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

Requirements#

  • Python 3.11 or later.

  • cobrapy, which is installed as a dependency.

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

A virtual environment is recommended. It is created and activated with:

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

raven-toolbox fetches KEGG data and the reconstruction binaries (BLAST+, DIAMOND and HMMER) on first use. Download data and binaries describes how to prepare a machine without network access in advance.


Installation#

The release documented on this site, 3.0.0b1, is a pre-release. PyPI also holds the stable release 0.4.0, and pip selects that release unless --pre is given.

pip install --pre raven-toolbox

The source installation provides the latest unreleased code and is the route for contributors:

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 with an underscore, and the PyPI distribution is raven-toolbox with a hyphen.


Upgrading#

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

Removal#

pip uninstall raven-toolbox

Solver configuration#

raven-toolbox uses the solver interface of cobrapy:

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