Resource Balance Analysis
Main | What is RBA | Models | Software | Contact
Overview - RBAtools - RBApy - Downloads
RBAtools – a programming interface for RBA
What is RBAtools?
Building upon RBApy, the RBAtools software package provides an accessible and user-friendly Python programming interface to RBA models. It allows users to modify models, contains various high-level simulation and analysis functions, and can export simulation results to different output and visualization formats. RBAtools supports two solvers, the proprietary solver CPLEX and the free solver GLPK. A typical modeling workflow and a general overview of RBAtools are shown below. For a detailed documentation of RBAtools, see the RBAtools user guide and the RBAtools API reference on GitHub.
RBAtools functionality
- Easy model manipulation: setting parameters; setting gene knockouts; log, undo, and replay functions
- Data output: output of model and simulation results in a well-structured table format; automatic conversion to HTML
- Data output for visualization tools: metabolic fluxes (Escher maps) and protein amounts (Proteomaps)
- RBAtools can be used directly as a programming interface or through Jupyter Notebooks
Typical modeling workflow![]() |
Information flow in RBAtools![]() |
Click on the figures to enlarge.
A first example
The following Python code loads an RBA model, computes the maximal growth rate, and exports the simulation results as an SBtab file:
from rbatools.rba_session import SessionRBA
session = SessionRBA(xml_dir="path/to/rba/model", lp_solver="swiglpk")
mu_max = session.find_max_growth_rate()
print("Maximal growth rate:", mu_max)
session.record_results(run_name="run")
session.SimulationData.export_sbtab(filename="SimulationResults_SBtab")
Model and output formats
Models are imported in the RBA XML format RBAml. Models and simulation results can be exported in SBtab format. RBAtools supports the same output formats for visualization as RBApy: Escher maps (fluxes) and Proteomaps (proteome). In addition, RBA-derived biomass functions for FBA can be exported (see the Jupyter Notebooks for details).
RBA simulation in the command line
RBAtools comes with two commands for the command line. To run an RBA simulation, use
run-growth-rate-optimization path/to/rba/model --lp-solver {cplex|swiglpk} --output-dir path/to/results
To export an RBA model to SBtab format, use
generate-sbtab-of-model-for-html path/to/rba/model --output-dir path/to/results
Tutorials
The main functionalities of RBAtools are demonstrated in Jupyter Notebooks (details are described here). The RBAtools package on GitHub comes with an example model for B. subtilis bacteria (Goelzer et al. (2015)).
Citing RBAtools
If you use RBAtools for your research, please cite our article Bodeit O. et al. (2023), Bioinformatics Advances, 3(1): vbad056.
Further information
- Detailed instructions for RBAtools can be found in the RBAtools user guide on GitHub.
- For a detailed description of the RBAtools code, see the API reference on GitHub.
- For installation, see Downloads.
- An overview of RBAtools is given in this poster (Metabolic Pathway Analysis 2021).
- The extension of RBAtools to eukaryotic cells and complex environments is described in Bodeit et al. (2026).
- Bugs and feature requests can be reported as GitHub issues.

