Eschermap

flux2json(model, FBAtype, outputFolder)[source]

Writes a model’s predicted flux distribution to a json file for use with EscherMap (https://escher.github.io/#/) to visualise the flux distribution

USAGE:

flux2json (model, FBAtype, outputFolder)

INPUTS:

model – COBRA model structure with fields:

  • .rxns - n x 1 cell array of reaction identifiers

  • .rxnNames - n x 1 cell array of reaction names

OPTIONAL INPUTS:
  • FBAtype – ‘FBA’ to solve with optimizeCbModel, or ‘EFBA’ to solve with entropicFluxBalanceAnalysis

  • outputFolder – Folder in which the data.json output file is written

OUTPUT:
  • A `data.json` file with the reaction fluxes is written to

  • `outputFolder`

model2escher(model)[source]

Prepares a model to draw an EscherMap

EscherMap only accepts a model in json format. Some reaction IDs in Recon3D start with a number, which causes an issue when converted into json. This function adds ‘A_’ to reaction IDs starting with a number, and replaces the compartment brackets in metabolite IDs with an underscore (e.g. atp[c] becomes atp_c)

USAGE:

model = model2escher (model)

INPUT:

model – COBRA model structure with fields:

  • .rxns - n x 1 cell array of reaction identifiers

  • .mets - m x 1 cell array of metabolite identifiers

OUTPUT:

model – COBRA model structure with fields:

  • .rxns - reaction identifiers, prefixed with A_ where the original identifier started with a digit

  • .mets - metabolite identifiers with compartment brackets replaced by an underscore