MetabolicCartography

addColourNode(map, rxnList, colour)[source]

Add colour to all metabolites linked to a list of reaction names. If no colour is specified as input, ‘RED’ will be used by default. Complementary function of changeRxnColorAndWidth.m

Usage

[map] = addColourNode(map, rxnList, color)

Inputs

  • map – A parsed model structure generated by ‘transformXML2Map’ function
  • rxnlist – List of reactions which nodes have to be coloured

Optional input

  • color – Color string. Default color being ‘RED’

Output

  • map – New parsed file with the colored entities linked to reactions list given as input
addFluxFBA(map, model, fbaSolution, color)[source]

Change reactions type for a specific list of reactions Visualize the fluxes obtained in a cobra model (FBA) in a CellDesigner map

Usage

[map2, flux3, fluxMap] = addFluxFBA(map, model, fbaSolution, rxnsColour)

Inputs

  • map – A parsed model structure generated by ‘transformXML2Map’ function
  • model – A COBRA model
  • fbaSolution – Structure obtain from flux balance analysis

Optional input

  • color – Add colour to the reactions carrying fluxes

Outputs

  • map2 – New parsed file with the changes in the reactions
  • flux – Fluxes and normalized fluxes through all rxns
  • fluxMap – List of reactions carrying flux in the map + width value
addFluxFBAdirectionAndColor(map, model, fbaSolution)[source]

Change reactions type for a specific list of reactions

Usage

[map, flux2, fluxMap] = addFluxFBAdirectionAndColor(map, model, fbaSolution)

Inputs

  • map – A parsed model structure generated by ‘transformXML2Map’ function
  • model – A COBRA model
  • fbaSolution – structure obtain from flux balance analysis

Outputs

  • map – mew parsed file with the changes in the reactions
  • flux2 – fluxes and normalized fluxes through all rxns
  • fluxMap – list of reactions carrying flux in the map + width value
addNotes(model, map)[source]

Function to add notes from a model to a metabolic map

Usage

[newMap] = addNotes(model, map)

Inputs

  • model – COBRA model
  • map – A parsed model structure generated by ‘transformXML2Map’ function

Output

  • newMap – Modified map containing notes from the model
changeMetColor(map, metList, color)[source]

Change color of every metabolite from a list of Names

Usage

[newMap] = changeMetColor(map, metList, color);

Inputs

  • map – file from CellDesigner parsed to MATLAB format
  • metList – List of metabolites names

Optional input

  • color – New color of metabolites from list(default: RED)

Output

  • newMap – Matlab structure of map with reaction modifications
changeNodesArea(map, metList, areaHeight, areaWidth)[source]

Change the area size of a list of metabolites (standardize the map)

Usage

[map2] = changeNodesArea(map,metList,areaHeight,areaWidth)

Inputs

  • map – A parsed model structure generated by ‘transformXML2Map’ function
  • metList – list of metabolites which area wants to be changed

Optional inputs

  • areaHeight – change heigt
  • areaWidth – change areaWidth

Output

  • map2 – New parsed file with the changes in the reactions
changeRxnColorAndWidth(map, rxnList, color, areaWidth)[source]

Change color and areaWidth of reactions from a list of names

Usage

[newMap] = changeRxnColorAndareaWidth(map, rxnList, color, areaWidth);

Inputs

  • map – File from CellDesigner parsed to MATLAB format
  • rxnList – List of reactions

Optional inputs

  • color – New color of reactions from list (default: ‘RED’)
  • areaWidth – New areaWidth of reactions from list (default: 8)

Output

  • newMap – Matlab structure of map with reaction modifications
changeRxnType(map, rxnsList, rxnsType)[source]

Change reactions type for a specific list of reactions. For example, pass from ‘STATE_TRANSITION’ to ‘TRANSPORT’.

Usage

[map2] = changeRxnType(map,listRxns,typeRxns)

Inputs

  • map – A parsed model structure generated by ‘transformXML2Map’ function
  • rxnsList – List of reactions names want to be changed
  • rxnsType – string (new reaction type)

Output

  • map2 – New parsed file with the changes in the reactions
checkCDerrors(map, model)[source]

Check discrepancies between a CD map and a COBRA model.

Usage

[rxn, met, rev, form] = checkCDerros(map, model)

Inputs

  • map – A parsed model structure generated by ‘transformXML2Map’ function
  • model – A COBRA model

Outputs

  • rxn – structure with common reactions between map and model extra reactions in map not in the model. extra reactions in the model not in the map.
  • met – structure with common mets in map and model extra mets in map not in model. extra mets in model not in map.
  • rev – structure with reversible reaction in map, considered irreversible in model. irreversible reaction in map, considered reversible in model.
  • form – structure with formula errors etc
colorProtein(map, protList, color)[source]

Color protein nodes base on a list of protein Names

Usage

[newMap] = colorProtein(map, protList, color)

Inputs

  • map – xml file parsed to Matlab using the function ‘transformFullXML2Map’
  • protList – List of protein names

Optional input

  • color – Color for the proteins in CAPITALS

Output

  • newMap – Map with proteins nodes coloured (default: ‘RED’)
colorRxnType(map, type, color, width)[source]

colors reactions based on their type and modifies their width.

Usage

[newMap] = createColorsMap(map, type, color);

Inputs

  • map – Map from CellDesigner parsed to MATLAB format
  • type – Type of reactions to be colored (as String)
  • color – Color used to color reactions (see createColorsMap.m)
  • width – Width size for reactions (default: 8)

Output

  • newMap – MATLAB structure of new map with needed reactions type colored and width modified
colorRxnsFromGenes(map, model, entrezList, color, areaWidth)[source]

Color and change the areaWidth of reactions based on the implicated gene given from a list of entezIDs.

Usage

[newmap] = colorRxnsFromGenes(map, model, entrezList, color, areaWidth);

Inputs

  • map – map from CellDesigner parsed to MATLAB format
  • model – COBRA model
  • entrezList – List of genes, given as entrezIDs.

Optional inputs

  • color – Preferred color, as written in function ‘createColorsMap’. (default: ‘RED’)
  • areaWidth – Preferred areaWidth of lines. (default: 8)

Output

  • newmap MATLAB structure of new map with default look
colorSubsystemCD(map, model, subsystem, color, areaWidth)[source]

Color and increase areaWidth of every reaction in a specific subsystem

Usage

[newMap] = colorSubsystemCD(map, model, subsystem, color, areaWidth);

Inputs

  • map – File from CellDesigner parsed to MATLAB format
  • model – COBRA model structure
  • subsystem – Name of a subsystem as a String

Optional inputs

  • color – Color desired for reactions in CAPITALS
  • areaWidth – Width desired for reactions

Output

  • newMap MATLAB structure of map with reaction modifications
compareModelMapFormulas(model, map, excelName)[source]

Checks the errors in a given map using a given base model by comparing the reactions formulas. As different errors can exist, the output is separated in 4 different tables that can later be exported into Excel spreadsheets (see commented lines at the end).

Usage

[wrongTable, absentModelTable, absentMapTable, duplicateTable] = compareModelMapFormulas(model, map, excelName)

Inputs

  • model – COBRA structure of a model
  • map – MATLAB structure of the map obtained from the function transformXML2Map.

Optional input

  • excelName – Name of the excel file in which to export the info

Outputs

  • wrongTable – Table containing the information on wrong reactions. The fields are arranged as followed:

    • rxnName - Name of the reaction in the map
    • rxnID - ID of the reaction in the map
    • modelFormula - Formula of the reaction from the model
    • mapFormula - Formula of the reaction from the map
  • absentModelTable – Table containing the information on reactions present in the map but absent from the model. The fields are arranged as followed:

    • rxnName - Name of the reaction in the map
    • rxnID - ID of the reaction in the map
    • mapFormula - Formula of the reaction from the map
  • absentMapTable – Table containing the information on reactions present in the model but absent from the map. The fields are arranged as followed:

    • rxnName - Name of the reaction in the model
    • modelFormula - Formula of the reaction from the model
  • duplicateTable – Table containing the information on duplicated reactions in the map. The fields are arranged as followed:

    • rxnName - Name of the reaction in the model
    • rxnID - ID of the reaction in the map
    • modelFormula - Formula of the reaction from the model
    • mapFormula - Formula of the reaction from the map
correctMetNameCD(map, metStructure, metList)[source]

Correct the list of wrong metabolites names in the map obtained from checkCDerrors given a list of metabolites with the right names. Therefore, the wrong names in the map should become those of the model.

Usage

[map] = correctMetNameCD(map, metStructure, metList)

Inputs

  • map – A parsed model structure generated by ‘transformXML2Map’ function
  • metStructure – Second OUTPUT obtained when running checkCDerrors
  • metList – List of metabolites with right names

Output

  • map – Corrected map
correctRxnNameCD(map, rxnStucture, rxnList)[source]

Correct the list of wrong reaction names in the map obtained from checkCDerrors given a list of reaction with the right names. Therefore, the wrong names in the map should become those of the model.

Usage

[map] = correctRxnNameCD(map, rxnStucture, rxnList)

Inputs

  • map – A parsed model structure generated by ‘transformXML2Map’ function
  • rxnStucture – First OUTPUT obtained when running checkCDerrors
  • rxnList – list of reactions with right names

Output

  • map – corrected map
createColorsMap()[source]

Creates a Map type of structure storing colors by their name in capitals and giving their corresponding HTML color code.

Usage

[colors] = createColorsMap()

Output

  • colors – Map structure (similar to a dictionary) containing a list of colors in the string format and giving the corresponding colors when called in the Map.
defaultColorCD(map)[source]

Change all reaction lines to black and default areaWidth

Usage

[newmap] = defaultColorCD(map);

Input

  • map – file from CellDesigner parsed to matlab format

Output

  • newmap – MATLAB structure of map with all rxn lines as default color and areaWidth
defaultLookMap(map)[source]

Give default look to structures on map in terms of color, size and areaWidth.

Usage

[newmap] = defaultLookMap(map)

INPUT: map: Map from CellDesigner parsed to matlab format

Output

  • newmap – MATLAB structure of new map with default look

Note

Note that this is specific to MitoMap and Recon3Map, as it uses Recon3 and PDmap nomenclature for metabolites

findMetsFromCompartInMap(map, compartment)[source]

Finds all the metabolites and their names in the map structure for a compartment of interest.

Usage

[mets, id] = findMetFromCompartMap(map, Compartment)

Inputs

  • map – Map from CellDesigner parsed to matlab format
  • compartment – Compartment of interest (e.g.: ‘[m]’,’[n]’,’[e]’,etc.)

Outputs

  • mets – List of metabolites names
  • id – Metabolites indexes
findMetsInMap(map, metList)[source]

Finds metabolites indices in a CellDesigner map for a given list of names

Usage

[metID] = findMetIdsMap(map, metList)

Inputs

  • map – Map from CellDesigner parsed to MATLAB format
  • metList – List of metabolites names

Output

  • metID – List of metabolite indices corresponding to metList
findRxnsFromCompartInMap(map, compartment)[source]

Finds all the reactions and their names in the map structure for a compartment of interest.

Usage

[rxns, id] = findRxnFromCompartMap(map, Compartment)

Inputs

  • map – Map from CellDesigner parsed to matlab format
  • compartment – Compartment of interest (e.g.: ‘[m]’,’[n]’,’[e]’,etc.)

Outputs

  • rxns – List of reaction names
  • id – Reactions indexes
findRxnsInMap(map, rxnList)[source]

Finds reaction indices in a CellDesigner map from a list of names

Usage

[rxnID, rxnIDref] = findRxnIDs(map, rxnList)

Inputs

  • map – Map from CellDesigner parsed to MATLAB format
  • rxnList – List of reaction names

Outputs

  • rxnIDref – ID reference for reactions
  • rxnID – List of reactions indices
findRxnsPerTypeInMap(map, rxnType)[source]

Finds reaction names based on the type of reactions in the map. Useful to look for transport, catalysis or simple state_transition.

Usage

[listRxns] = findTransRxns(map, rxnType)

Inputs

  • map – Map from CellDesigner parsed to MATLAB format
  • rxnType – Reaction type as a String

Output

  • listRxns – List of reactions indexes (1st column) and reaction names (2nd column)
getMapMatrices(map)[source]

Adds 3 matrices to the map structure given as input.

Usage

[map] = getMapMatrices(map)

Input

  • map – MATLAB structure of the map
    • sID - Stoichiometric matrix with rows = MetabolitesID and columns = ReactionsID in the same order as in the map structure. Contains -1 if the metabolite is a reactant/substract, +1 if the metabolite is a product and 0 if it does not participate in the reaction.
    • sAlias - Stoichiometric matrix with rows = MetabolitesAlias and columns = ReactionsID in the same order as in the map structure. Contains -1 if the metabolite is a reactant/substract, +1 if the metabolite is a product and 0 if it does not participate in the reaction.
    • idAlias - Logical matrix with rows = MetabolitesID and columns = MetabolitesAlias. Contains +1 if the MetaboliteID match with the MetaboliteAlias and 0 if it doesn’t.

Output

  • map – Updated map structure from the input containing the 3 matrices

Create a correspondence of species ID and their index for easier access during the matrix filling

mapFormula(map, rxnList)[source]

Prints reactions formulas from a CellDesigner XML map file

Usage

[formulaList, rxnsList, absentRxns, duplicatedRxns] = mapFormula(map, rxnList)

Inputs

  • map – A parsed model structure generated by “transformXML2Map” function
  • rxnList – List of reactions which formulas will to be printed

Outputs

  • formulaList – List of formulas
  • rxnsList – Present reactions from the list (rxnList) in the map
  • absentRxns – Reactions in the map not in the model
  • duplicatedRxns – Duplicated reactions in the map
modifyReactionsMetabolites(map, rxnList, metList, newColor, newAreaWidth)[source]

Modifies the color and areaWidth of reactions from a given list as input and the color of the corresponding metabolites from a given list as input. The colors and areaWidth are given as inputs and only metabolites present in the given reactions list will be colored.

Usage

[mapStruct] = modifyReactionsMetabolites(map, rxnList, metList, newColor, newAreaWidth)

Inputs

  • map – Matlab structure of the map obtained from the function “transformXML2Map”.
  • rxnList – List of reaction names as a string array
  • metList – List of metabolite names as a string array
  • newColor – Color chosen for reaction lines and metabolites given as a string with the corresponding real name. Possible names can be found in the function “createColorsMap.m”.
  • newAreaWidth – Width size for the reaction lines. Can be given as a string or a double.

Output

  • mapStruct – Updated map structure with the changed areaWidth and color of the reactions and their corresponding metabolites.
transformFullMap2XML(xmlStruct, map, fileName)[source]

Creates a new XML file from the information contained in the map structure. Uses the function “struct2xml” to transform a matlab structure into an XML text format.

Usage

transformFullMap2XML(xmlStruct, map, fileName)

Inputs

  • xmlStruct – XML structure obtained from the function “xml2struct”. Used by the function “struct2xml” to obtain the XML file.
  • map – Matlab structure of the map with the relevant information. This information is then transfered to the xmlStruct for the conversion.
  • fileName – Path and name of the new XML file.
transformFullXML2Map(fileName)[source]

Create a MATLAB structure from a given XML file. The XML file is first parsed through the “xml2struct” function and then transformed into a structure. The content of this structure can be found in the [description document](https://opencobra.github.io/cobratoolbox/docs/fullMATLABStructure.html)

Usage

[xmlStruct, map] = transformFullXML2Map(fileName)

Input

  • fileName – Path to the XML file.

Outputs

  • xmlStruct – Structure obtained from the “xml2struct” function. To be kept for the conversion back to an XML file of the structure.
  • map – Matlab structure of the map containing all the relevant fields usable for checking and correction.
transformMap2XML(xmlStruct, map, fileName)[source]

Creates a new XML file from the information contained in the map structure. Uses the function “struct2xml” to transform a matlab structure into an XML text format.

Usage

transformMap2XML(xmlStruct, map, fileName)

Inputs

  • xmlStruct – XML structure obtained from the function “xml2struct”. Used by the function “struct2xml” to obtain the XML file.
  • map – Matlab structure of the map with the relevant information. This information is then transfered to the xmlStruct for the conversion.
  • fileName – Path and name of the new XML file.
transformToIrreversibleMap(map, rxnlist)[source]

Converts a map structure from irreversible format to reversible format for a list of reaction names

Usage

[mapIrrev] = transformToIrreversibleMap(map, rxnlist)

Inputs

  • map – Map from CellDesigner parsed to MATLAB format
  • rxnlist – List of reaction names to transform

Output

  • mapIrrev – Map with reactions in irreversible format
transformToReversibleMap(map, rxnlist)[source]

Converts a map structure from irreversible format to reversible format for a list of reaction names

Usage

[mapRev] = transformToReversibleMap(map, rxnlist)

Inputs

  • map – Map from CellDesigner parsed to MATLAB format
  • rxnlist – List of reaction names to transform

Output

  • mapRev – Map in reversible format
transformXML2Map(fileName)[source]

Create a MATLAB structure from a given XML file. The XML file is first parsed through the “xml2struct” function and then transformed into a structure. The content of this structure can be found in the [description document](https://opencobra.github.io/cobratoolbox/docs/simpleMATLABStructure.html)

Usage

[xmlStruct, map] = transformXML2Map(fileName)

Input

  • fileName – Path to the XML file.

Outputs

  • xmlStruct – Structure obtained from the “xml2struct” function. To be kept for the conversion back to an XML file of the structure.
  • map – Matlab structure of the map containing all the relevant fields usable for checking and correction.
unifyMetabolicMapCD(map)[source]

Unify colours in a metabolic map as a standard. Reaction will be grey and Metabolites will be White.

Usage

[map2] = unifyMetabolicMapCD(map)

Input

  • map – MATLAB structure of CellDesigner map

Output

  • map2 – Map with grey reactions colour, width 1 and white nodes colour.
unifyMetabolicPPImapCD(map)[source]

Unify a metabolic and protein-protein interaction map as a standard. Reaction will be grey and Metabolites/Complexes will be White.

Usage

[map2] = unifyMetabolicPPImapCD(map)

Input

  • map – MATLAB structure of CellDesigner map

Output

  • map2 – Map with grey reactions colour, width 1 and white nodes colour. Change colour complex to white