Resource Balance Analysis
Main | What is RBA | Models | Software | Contact
Overview - RBAtools - RBApy - Downloads
Simulation tools and tutorials
Our Python code for RBA model building and simulation consists of the packages RBApy (for model building and basic simulations) and RBAtools (programming interface with convenience functions for advanced simulations). RBA models are stored in a special XML format called RBAml, consisting of several separate files for different types of information about a model. Models in the RBA XML format can be found on our models page. RBA simulations are numerically demanding and can be run with different (proprietary and free) numerical solvers; for installation and solvers, see Downloads. As described below, aside from RBApy or RBAtools, there are also other ways to run RBA.
RBAtools
The programming interface RBAtools provides easy access to high-level RBA simulation and analysis functions for existing RBA models (constructed with the help of RBApy). It supports the proprietary solver CPLEX and the free solver GLPK and generates output files for visualization. RBAtools comes with a number of instructional Jupyter Notebooks. Documentation can be found on GitHub.
RBApy
To build RBA models and run simple RBA simulations on your machine, use RBApy. RBApy is a Python package for creating and simulating RBA models of bacteria and eukaryotic cells, also in complex environments (e.g. varying temperature, light, or nutrient conditions), and generates output files for visualization. The input information for creating an RBA model are an annotated metabolic reconstruction in Systems Biology Markup Language (SBML) format and a UniProt organism ID, which is used for automatic download and integration of macromolecular composition data into the model. RBApy supports the proprietary solvers CPLEX and Gurobi as well as the free solvers GLPK and SciPy. Extensive documentation can be found on GitHub, with subpages on usage (including model construction, simulation, calibration, and requirements about SBML input models), installation, and documentation.
RBAml: the XML format for RBA models
RBA models are encoded in RBAml, an XML format in which a model is stored as a set of files for different types of information (for example metabolism.xml, enzymes.xml, proteins.xml, processes.xml, targets.xml, and parameters.xml). There are two versions of the format:
- RBAml 1.0 is the original format, used by RBApy versions below 3.0.
- RBAml 2.0 is the current format, used by RBApy 3.0 and later, and all models in our model repository on GitHub are available in this format. It adds macromolecules other than DNA, RNA, and proteins (
other_macromolecules.xml), macromolecule half lives, more function types (for example, Arrhenius functions for temperature dependence), custom constraints (custom_constraints.xml), and a configuration file listing the files of a model (model_file_index.in). Compartments are now defined in their own file (compartments.xml).
RBApy 3.0 and later cannot read RBAml 1.0 models directly, but such models can be converted with the command
update-rba-model path/to/model
The format is described in detail in the RBAml 2.0 documentation (PDF).
RBA simulations in BioSimulators
The runBioSimulators online portal for biomedical simulations provides simple access to RBApy. An example run (input data file and visualization of results) can be found here. The data file (COMBINE/OMEX file) includes a model and simulation scenario. runBioSimulators is 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.
Please note that BioSimulators currently provides an older version of RBApy (1.0.2), which uses the RBAml 1.0 format. Models in RBAml 2.0, such as those in our model repository, cannot be run there.
Tutorials: Jupyter Notebooks
The RBAtools package contains a number of tutorials in the form of Jupyter Notebooks.
Online tutorial (no installation needed). A slim Jupyter Notebook tutorial can be run on mybinder without installing any RBA code on your local machine. It demonstrates some functions and workflows with the B. subtilis model (Goelzer et al. (2015)) as an example, including
- Sensitivity analysis to model parameters
- Resource variability analysis
- Multi-objective (Pareto) optimization
Notebooks for your local machine. In addition, we provide four Jupyter Notebooks to be run on your local machine:
- Example_workflows_rba_tools.ipynb: An extended version of the Jupyter Notebook on mybinder, which has also been used to generate the graphics in our RBAtools article.
- Model_components_information_access.ipynb: Example applications showing how to access information on model components and their relationships in the B. subtilis model.
- Adding_custom_constraint_to_RBA_problem.ipynb: Shows how to use RBAtools to add user-defined constraints to an RBA problem. This functionality may help users develop more advanced methods with RBA.
- Linear_optimization_with_rbatools.ipynb: Shows how to use RBAtools to define and solve linear optimization problems. This example is not related to RBA, but uses RBAtools functionality to solve an example LP.
For details about the four notebooks (including installation instructions), see the RBAtools usage instructions.