RBA logo   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

Typical modeling workflow
Typical modeling workflow
Information flow in RBAtools
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