Reconmap

buildFluxDistLayout(minerva, model, solution, identifier, hexColour, maxThickness, content)[source]

Builds a layout for MINERVA from a flux distribution. If a dictionary of identifiers is not provided it is assumed that the map and the COBRA model’s nomenclature is coherent. Sends the layout to the remote MINERVA instance

USAGE

[serverResponse] = buildFluxDistLayout (minerva, model, solution, identifier, hexColour, thickness, content)

INPUTS
  • minerva – Struct with the information of minerva instance: address, login, password and model (map)

  • model – COBRA model structure

  • solution.v – optimizeCb solution structure with a flux vector

  • identifier – Name for the layout in MINERVA

OPTIONAL INPUT
  • hexColour colour of overlay (hex color format) – e.g. ‘#009933’ corresponds to http://www.color-hex.com/color/009933 If you want to make a color gradient, you can input an array of 2 or 3 colors like [“#ff0000”, “#6617B5”, “#0000ff”] note that they should be declared with (”) rather than with (‘)

  • maxThickness – maximum thickness

  • content – character array with the following format for each reaction to be displayed. Bypasses the use of solution.v to set the format. ‘name%09reactionIdentifier%09lineWidth%09color%0D’

OUTPUT

serverResponse – Response of the MINERVA

changeCbMapOutput(outputFormat)[source]

changeCbMapOutput sets the output format for drawCbMap. Displays outputFormat if no inputs provided.

outputFormatOK = changeCbMapOutput(outputFormat)

OPTIONAL INPUT
outputFormat drawCbMap render format

{‘svg’, ‘matlab’, ‘java’} (java not implemented)

OUTPUT

outputFormatOK True if output format set properly, else false.

generateSubsystemLayouts(minerva, cobra_model, color)[source]

Generates subsystem layouts

USAGE

generateSubsystemLayouts (minerva, cobra_model, color)

INPUTS
  • minerva – Struct with the information of minerva instance: address, login, password and model (map)

  • cobra_model – COBRA model structure

  • color – Color

generateSubsytemsLayout(minerva, cobra_model, subsystem, color)[source]

Generates subsystem layouts

USAGE

generateSubsytemsLayout (minerva, cobra_model, subsystem, color)

INPUTS
  • minerva – Struct with the information of minerva instance: address, login, password and model (map)

  • cobra_model – COBRA model structure

  • subsystem – Subsystem

  • color – Color

makeColorGradient(col1, col2, ncol)[source]

Generates a color gradient in hex format, based on color 1 and 2

USAGE

[cmap] = makeColorGradient (col1, col2, ncol)

INPUTS
  • col1 – First color

  • col2 – Last color

  • ncol – Number of colors in between

OUTPUT

cmap – Color gradient map with the corresponding colors in hex format

postMINERVArequest(login, password, map, googleLicenseContent, identifier, content)[source]

Sends a new layout to a MINERVA instance

USAGE

[response] = postMINERVArequest (minerva_servlet, login, password, map, identifier, content)

INPUTS
  • minerva_servlet – URL

  • login – MINERVA username

  • password – MINERVA password

  • map – MINERVA map

  • googleLicenseContent – True if user agreed to Google Maps terms of use: https://cloud.google.com/maps-platform/terms/

  • identifier – Layout name

  • content – Content of the layout

OUTPUT

response – MINERVA’s response - cell array index 1 - 0/1 whether the overlay was successfully uploaded. index 2 - success or error message

printInRecon3Dmap(rxnList, colorValues, outputDir, lineWidth, fileName)[source]

This function generates a TXT file that can be integrated in the VMH database (vmh.life) to overlay certain reactions

USAGE

printInRecon3Dmap (rxnList, output, values)

INPUTS
  • rxnList – List of rxn to be higligted

  • colorValues – Numerical value for each reaction (to assign different colors (default: 0

  • outputDir – Directory where the file will be created (default: current directory)

  • lineWidth – Numerical value of line width to set. default=8

  • fileName – File name prefix for the output file. Should be a char array. default is ‘C__fakepath_data4ReconMap3_’.

OUTPUTS

Text file used as an input for the VMH database