Resource Balance Analysis
Main | What is RBA | Models | Software | Contact
Overview - RBAtools - RBApy - Downloads
Downloads
Requirements: RBApy and RBAtools require Python 3 (RBApy: Python 3.6 or later). The current versions are listed on PyPI (rbapy, rbatools).
RBApy
The Python package RBApy for model construction and basic simulation can be installed via pip. RBApy source code and documentation are also available on GitHub. Detailed documentation, installation instructions, and usage examples can be found at the RBApy homepage on GitHub. For further details, see our articles Bulović A. et al. (2019), Metabolic Engineering, 55, 12-22 [pdf] and Bodeit O. et al. (2026), Bioinformatics Advances, 6(1): vbag276. To install RBApy via pip, run
pip install rbapy
To run simulations with RBApy, numerical solvers must be installed on your system. RBApy supports the proprietary solvers CPLEX and Gurobi and the free solver GLPK. You can install RBApy together with your preferred solver via one of the following:
pip install rbapy[cplex] pip install rbapy[swiglpk] pip install rbapy[gurobi]
In addition, RBApy can use the free LP solver included in SciPy, via the optlang package (pip install optlang). This solver is used automatically if none of the other solvers is installed.
swiglpk is the Python interface to GLPK. The proprietary solvers CPLEX and Gurobi require a valid license; both companies provide free licenses for academic research. Please note that RBA simulations are numerically demanding. In our experience, GLPK is not fully reliable for large models like our E. coli model (where GLPK sometimes stalls).
Command-line interface and docker image for RBApy
BioSimulators is a registry of biosimulation tools, developed by the Center for Reproducible Biomedical Modeling, the Karr Lab at the Icahn School of Medicine at Mount Sinai, and the Center for Cell Analysis & Modeling at the University of Connecticut Health Center. A docker image and a standardized command-line interface for RBApy, following the BioSimulators framework, are available as a Python package on PyPI. Please note that you need a valid CPLEX license, and that this package is based on an older version of RBApy, which uses the RBAml 1.0 format.
RBAtools
RBAtools can be installed via pip. The Python programming interface RBAtools includes high-level methods to solve, manipulate and analyze RBA models and to export model and simulation results into different file formats. A detailed description and code documentation can be found on GitHub. To install RBAtools via pip, run
pip install rbatools
RBAtools source code can also be obtained from GitHub. The repository contains further installation instructions and documentation, including a number of Jupyter Notebooks.
Jupyter Notebooks
RBAtools comes with some instructional Jupyter Notebooks. A slim Jupyter Notebook tutorial can be run directly on mybinder without installing any RBA code on your machine. This notebook demonstrates the main high-level simulation methods. In addition, four Jupyter Notebooks are available in the RBAtools git repository (see Software for a description). To run these notebooks, the following Python packages must be installed:
pip install notebook pip install ipywidgets pip install seaborn
For running the notebooks, the Bacillus subtilis RBA model must be available on your machine. Before running the notebooks, download the RBA models git repository and place it next to the RBAtools repository (i.e. both folders in the same parent directory).
RBA model download
For downloading RBA models, please see our models page.