Cobrapy

test_writeModelinJSON[source]

Test writing out a model in SBML with COBRA Toolbox, then reading it in with COBRApy, then writing it out in JSON with COBRApy.

writeModelinJSON(model, COBRApyPath)[source]

Write out a model in JSON format using COBRApy

USAGE:

[success, pymodel] = writeModelinJSON (model, COBRApyPath)

INPUTS:

model – COBRA model structure, or a char path to an existing SBML file

OPTIONAL INPUTS:

COBRApyPath – Path to the folder containing a git clone of COBRApy (https://github.com/opencobra/cobrapy); must be the full absolute path without ~/

OUTPUTS:
  • success – 1 if the model was successfully read into COBRApy, 0 (or unset) otherwise

  • pymodel – COBRApy model object read from the SBML file

Note

External dependencies: