Flux Balance Analysis (FBA) Model

Upload FBA Model from a SBML formatted file

Flux Balance Analysis models can be uploaded into KBase as a Systems Biology Markup Language (SBML) file using the .sbml or .xml file extension. For this example, we will upload the file containing an FBA Model for Bacillus subtilis 168 that has been included in the supplementary materials for this publication:

Henry, C. S., Zinner, J. F., Cohoon, M. P., & Stevens, R. L. (2009). iBsu1103: a new genome-scale metabolic model of Bacillus subtilis based on SEED annotations. Genome Biology, 10(6), R69. doi:10.1186/gb-2009-10-6-r69

Right-click and select ‘Save Link As …’ to download and save FBA Model

Double check that the Bacillus subtilis 168 FBA Model completely downloaded by opening the file in a text or code editor and ensuring that the file is 47527 lines long and ends with “</sbml>.” Otherwise, the data could be corrupted and will not import properly into KBase.

In order to successfully upload an FBA Model into KBase, you first need to add the Genome that corresponds to referenced in the FBA Model you wish to upload. For this example, we’ll add the Bacillus_subtilis_subsp._subtilis_str._168 Genome to our Data Panel (from the Public tab of the Data Browser) before importing the FBA Model file.

Import FBA SBML

After you’ve added the Bacillus subtilis 168 genome to your Data Panel, follow these steps to upload an FBA model:

  • Click on the Import tab
  • Choose FBA Model from the data type dropdown menu
  • Click the Next button
  • Select the FBA MODEL FROM SBML FILE tab
  • Select the FBA Model XML or SBML file from a directory on your computer
  • Provide a name for the output FBA Model
  • Click “show advanced options” and select the Genome (in this example, the subtilis 168 genome) which contains features referenced to in the FBAModel. (Note that although specifying the Genome is optional in the app, adding a Genome with gene IDs that match genes IDs in the model is required to import gene-protein-reactions (GPRs). GPRs are necessary to perform gene KO in the Run Flux Balance Analysis App.
  • Provide the name of the biomass reaction in the SBML file, in this case “bio00006”. NOTE: if the biomass reaction starts with “R_”, do NOT include the “R_” when entering the name in this field.
  • Click the Import button
  • After the import process has completed, the new FBAModel data object will appear in your Data Panel

More Information

More SBML FBA Models for various organisms can be found here: http://systemsbiology.ucsd.edu/Downloads

For a descriptions of how to create a COBRA compliant SBML file for importing your FBA model into KBase, please visit the following links:

 

Upload a FBA Model in Excel or TSV format

Flux Balance Analysis models can be uploaded into KBase as either an Excel file (.xls) or via two Tab-separated Values (.tsv) files containing the chemical compounds and reactions present in the FBA Model. In the Excel format, the tables containing the information about the chemical compounds and reactions in an FBA Model are stored in two separate tabs respectively titled “FBAModelCompounds” and “FBAModelReactions.” For the Tab-separated Values file format, the chemical compounds and reactions tables are saved as two separate files named “FBAModelCompounds.tsv” and “FBAModelReactions.tsv” that will be transformed into the FBA Model data object within KBase.

FBAModelCompounds

 

id name formula charge aliases
 cpd00113  Isopentenyldiphosphate  C5H10O7P2  -2
 cpd02590  all-trans-Heptaprenyl diphosphate  C35H58O7P2  -2
  • id: Compound identifier; see the KBase Biochemistry reference for a list of compounds [link]
  • name: Name of chemical compound
  • formula: Chemical formula using the Hill system
  • charge: Formal charge of the molecule
  • aliases: Alternative names for chemical compound

 

FBAModelReactions

id direction compartment gpr name enzyme pathway reference equation
rxn00001_c0 -> c0 fig|211586.9.peg.3751 Pyrophosphate phosphohydrolase_c0 (1) cpd00001[c0] + (1) cpd00012[c0] -> (2) cpd00067[c0] + (2) cpd00009[c0]
rxn00056_c0 <-> c0 fig|211586.9.peg.1038 Fe(II):oxygen oxidoreductase_c0 (4) cpd00067[c0] + (4) cpd10515[c0] + (1) cpd00007[c0] <-> (4) cpd10516[c0] + (2) cpd00001[c0]

 

  • id: Reaction identifier; see the KBase Biochemistry reference for a list of reactions
  • direction: Directionality of chemical reaction specified as forward (->), reversed (<-), or equilibrium (<->)
  • compartment: Cellular compartment that the reaction takes place in; see the Metabolic Modeling FAQ for more information
  • gpr: Gene-Protein Reaction in PATRIC identifier format
  • name: Protein associated with the reaction
  • enzyme: Optional, can be left empty
  • pathway: Optional, can be left empty
  • reference: Optional, can be left empty
  • equation: Chemical reaction equation specified with compound coefficients in parentheses, compound identifiers, and directional arrows

Importing a FBA Model into KBase requires you to specify a reaction IDs for the biomass producing equations in the model. For a FBA Model of an individual organism, there will be a single biomass equation, while a community model may have multiple biomass producing equations. In the FBAModelReactions table, denote the biomass producing reaction of an individual organism, or the first in a community model, with an ID such as “bio1” so that this reaction is easily identifiable. For subsequent biomass producing reactions in a community model, it is recommended that you use “bio2” for the second biomass producing reaction, “bio3” for the third, and so on.

After you’ve formatted your TSV/XLS file, follow these steps to upload an FBA model:

  • Click on the Import tab
  • Choose FBA Model from the data type dropdown menu
  • Click the Next button
  • Select either the FBA MODEL FROM TSV FILE or FBA MODEL FROM TSV FILE  tab
  • Select the FBA Model TSV files or XLS file from a directory on your computer
  • Provide a name for the output FBA Model
  • Click “show advanced options” and select the Genome which contains features referenced to in the FBAModel
  • Provide the name of the biomass reaction in the FBAModelReactions TSV file or XLS file, in this case “bio1”
  • Click the Import button
  • After the import process has completed, the FBAModel data object will appear in your Data Panel

Import FBA Excel

Associating Model with Genome

For metabolic modeling apps, correctly associating a genome with the user uploaded models is necessary for ensuring fidelity between the genome annotations and gene-protein-reactions in the metabolic model. This means that the gene IDs between the model and genome need to match. Occasionally, researchers will use locus tags or gene IDs for constructing metabolic models that are different than those found commonly in reference genomes. If the gene IDs do not match, you will need to change either the model or the genome to ensure their gene IDs match. One way to accomplish this is to locate the genome used as the reference for building the model – based on shared gene IDs – and to upload this genome into KBase before uploading the model and associating it with the genome. If the user cannot locate the genome with the gene IDs used to build the model, the best option for reconciling the gene IDs is to edit the model file (as SBML or TSV) to change the gene IDs contained therein to match the gene IDs of the genome. See this Help Desk ticket for a detailed example of how to accomplish this.