Resource Balance Analysis (RBA) is a computational method based on resource allocation, which performs accurate quantitative predictions of whole-cell states (i.e. growth rate, metabolic fluxes, abundances of molecular machines including enzymes) across growth conditions. We present an integrated workflow of RBA together with the Python package RBApy. RBApy builds bacterial RBA models from annotated genome-scale metabolic models by adding descriptions of cellular processes relevant for growth and maintenance. The package includes functions for model simulation and calibration and for interfacing to Escher maps and Proteomaps for visualization. We demonstrate that RBApy faithfully reproduces results obtained by a hand-curated and experimentally validated RBA model for Bacillus subtilis. We also present a calibrated RBA model of Escherichia coli generated from scratch, which obtained excellent fits to measured flux values and enzyme abundances. RBApy makes whole-cell modeling accessible for a wide range of bacterial wild-type and engineered strains, as illustrated with a CO2-fixing Escherichia coli strain.Availability: RBApy is available at /https://github.com/SysBioInra/RBApy, under the licence GNU GPL version 3, and runs on Linux, Mac and Windows distributions.On a standard laptop, the initial creation (including Uniprot querying) of the E. coli model took less than 30 seconds, and model updating through helper files took approximately 5 seconds ( Supplementary Table S3).This subpackage uses the libsbml, biopython and pandas libraries.
RBApy.xml: maintaining models in XML formatRBApy.prerba is primarily designed to generate a minimal working RBA model, containing default processes such as translation and chaperoning. RBApy.xml stores these models in an XML-rba format that was designed to facilitate model extension, in particular by adding new macromolecular processes. The user may do this by changing the XML-rba files directly. Alternatively, RBApy.xml provides an Application Programming Interface (API) in which every XML-rba entity can be accessed through a Python class with identical name.This subpackage uses the lxml library.
RBApy.core: running simulationsRBApy.core imports an XML-rba model and converts it into the final LP optimization problem, specified by sparse matrices as described in [11,12]. For a given medium composition, the solver solves a series of LP feasibility problem for different growth rates, and computes in fine the maximal possible growth rate, reaction fluxes and abundances of molecular machines at maximal growth rate. The optimization problem is solved by using the CPLEX Linear Programming solver (https://www.ibm.com/analytics/cplex-optimizer). The procedure has been optimized to return results in less than one minute on a standard laptop, even for large systems such as the RBA model of E. coli that contains 1807 metabolites, 2583 metabolic reactions and 3906 enzyme complexes ( Supplementary Table S3).This subpackage uses the scipy and cplex libraries.
RBApy.estim: estimating parametersRB...