Get an introduction to MORFlux in our video introduction below:
Flux Balance Analysis (FBA) is a mathematical modelling technique for simulating metabolism.
Reactions are assigned in the model using gene-protein-reaction relationships, linear algebra is used to solve the set of balanced equations and estimate the flux through each reaction. An objective flux, usually maximal biomass production, is set, and upper and lower bounds for each reaction constrain the model. Exchange reactions allow metabolites to flow into, and out of, compartments in the model, such as the extracellular space, periplasm, and cytoplasm.
MORFlux FBA uses the COBRA Toolbox and a custom framework to load, edit, solve, and export models, all in your web browser.
Common model formats like SBML and JSON are supported, as well as more friendly Excel workbooks.
In MORFlux, models can be imported and exported from the File menu.
A number of predefined models can be loaded and explored, using the Load Predefined Model option in the File menu.
Importing models as Excel workbooks
Excel workbook models must follow a standard format, as follows:
- The workbook must be in .xlsx format
- There must be worksheets named: reactions, genes, compartments, and metabolites
- The reactions worksheet should have columns named: subsystem, id, name, lower_bound, upper_bound, metabolites, gene_reaction_rule, and objective_coefficient
- The metabolites column in the reactions worksheet defines the metabolites in each reaction, e.g. 1x a_c + 2x b_c => 2x c_c + 1x d_c. The stoichiometries for each metabolite must always be defined, even if they are 1, as 1x, 2x, 0.5x, and so on. Forwards reactions should have a => symbol between the left and right sides of the reaction, reverse reactions should have a <= symbol, and reversible reactions should have a <=> symbol.
- The gene_reaction_rule column in the reactions worksheet contains the genes associated with reaction. These should match the gene's id from the id column in the genes worksheet. Genes are specified with Boolean notation, e.g. a001 or a002 or a003 for three alternate genes, or a004 and a005 and a006 for three genes encoding a multi-subunit enzyme.
- The objective_coefficient column should have a 1 in the row corresponding to the reaction that should be optimised when solving
- The metabolites worksheet should have columns named: id, name, and compartment. The metabolite ids should match those in the metabolite column in the reactions worksheet. The compartment column should have compartment ids that match those in the compartments worksheet.
- The compartments worksheet should have one column for each compartment, with the column header being the column id, and the row beneath being the compartment name, e.g. c and cytoplasm
An example model in .xlsx format can be downloaded by clicking here.
Editing bounds and reactions
Once loaded, a model can be explored by clicking on the separate tabs for Reactions, Genes, Metabolites, and so on.
Parameters of the model can be edited iteratively in the MORFlux interface.
Lower and upper bounds can be changed directly in Reactions tab, by clicking in the boxes and entering new numbers. These changes are applied as soon as you click outside the box.
More extensive editing can be done through the Edit menu, where reactions, metabolites, and genes can be added, edited, or deleted.
It should be noted that any changes made to the model in the browser will be applied when you export the model through the File menu.
Solving the model
To simulate the model, you must click the Solve button. Once solved, you'll be taken to the Objective tab which shows the flux through the reaction that is the objective coefficient of the model.
Fluxes from the solved model can be found under the Fluxes tab, and can be reordered by ascending or descending amount of flux by clicking on the Flux column header.
Fluxes can be downloaded in JSON or CSV format through the File menu, under Export Fluxes.
Models can be exported through the File menu, and the Export Model option, as an SBML file, a JSON file, or an Excel .xlsx workbook.
As mentioned above, any changes made to the currently loaded model in the browser will be reflected in the exported model.
The various import and export formats can be taken advantage of, to interconvert FBA models between different formats. For example, a model in SBML format could be imported to MORFlux, exported as an Excel workbook for simpler editing offline, and then re-imported to MORFlux at a later date.