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, colour)

INPUTS:
  • map – A parsed model structure generated by the transformXML2Map function, with fields:

    • .rxnName - cell array of reaction names

    • .rxnBaseReactantAlias - cell array (per reaction) of base reactant alias IDs

    • .rxnBaseProductAlias - cell array (per reaction) of base product alias IDs

    • .rxnReactantAlias - cell array (per reaction) of secondary reactant alias IDs

    • .rxnProductAlias - cell array (per reaction) of secondary product alias IDs

    • .rxnModAlias - cell array (per reaction) of modificator alias IDs

    • .molAlias - cell array of molecule alias IDs

  • rxnList – List of reaction names whose linked metabolite nodes have to be coloured

OPTIONAL INPUT:

colour – Colour string, as defined in createColorsMap (default: ‘RED’)

OUTPUT:

map – Map structure with field updated:

  • .molColor - cell array of molecule colours, updated for the coloured metabolites

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, color)

INPUTS:
  • map – A parsed model structure generated by the transformXML2Map function, with fields:

    • .rxnName - cell array of reaction names

    • .rxnWidth - cell array of reaction line widths

  • model – A COBRA model structure, with field:

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

  • fbaSolution – Structure obtained from flux balance analysis, with field:

    • .v - n x 1 flux vector

OPTIONAL INPUT:

color – Colour to give to the reactions carrying fluxes (default: ‘RED’)

OUTPUTS:
  • map2 – New parsed map, with fields updated:

    • .rxnColor - reaction colour, set for reactions carrying flux

    • .rxnWidth - reaction line width, set from the normalized flux

  • flux3 – Fluxes and normalized fluxes through all rxns

  • fluxMap – List of reactions carrying flux in the map + width value

addFluxFBAdirectionAndColor(map, model, fbaSolution)[source]

Add the fluxes from an FBA solution to a CellDesigner map: colour and width reactions and metabolites according to whether they carry no flux, are consumed (uptake), or are produced (secretion)

USAGE:

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

INPUTS:
  • map – A parsed model structure generated by the transformXML2Map function, with fields:

    • .rxnName - cell array of reaction names

    • .rxnBaseReactantAlias - cell array (per reaction) of base reactant alias IDs

    • .rxnReactantAlias - cell array (per reaction) of secondary reactant alias IDs

    • .rxnBaseProductAlias - cell array (per reaction) of base product alias IDs

    • .rxnProductAlias - cell array (per reaction) of secondary product alias IDs

    • .rxnWidth - cell array of reaction line widths (updated on output)

    • .rxnColor - cell array of reaction colours (updated on output)

    • .molColor - cell array of molecule colours (updated on output)

    • .molAlias - cell array of molecule alias IDs

  • model – A COBRA model structure, with field:

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

  • fbaSolution – Structure obtained from flux balance analysis, with field:

    • .v - n x 1 flux vector

OUTPUTS:
  • map – Map with rxn width, rxn colour, and metabolite colour fields updated according to the FBA solution

  • flux2 – Fluxes and normalized fluxes through all rxns

  • fluxMap – List of reactions carrying flux in the map + width value

addFluxFromFileWidthAndColor(map, csvFilePath)[source]

Visualizes fluxes on a CellDesigner map. Rxn line width is proportional to flux magnitude. Positive fluxes are displayed in shades of red, and negative fluxes in shades of indigo. Higher flux magnitudes have higher hue saturation.

USAGE:

[map, flux2, fluxMap] = addFluxFromFileWidthAndColor (map, csvFilePath)

INPUTS:
  • map – A parsed model structure generated by the transformXML2Map function, with fields:

    • .rxnName - cell array of reaction names

    • .rxnWidth - cell array of reaction line widths (updated on output)

    • .rxnColor - cell array of reaction colours (updated on output)

    • .molColor - cell array of molecule colours (updated on output)

    • .molAlias - cell array of molecule alias IDs

    • .rxnBaseReactantAlias - cell array (per reaction) of base reactant alias IDs

    • .rxnReactantAlias - cell array (per reaction) of secondary reactant alias IDs

    • .rxnBaseProductAlias - cell array (per reaction) of base product alias IDs

    • .rxnProductAlias - cell array (per reaction) of secondary product alias IDs

  • csvFilePath – Path to the CSV file containing reaction IDs in the first column and fluxes in the second column. The first row contains the respective headers.

OUTPUTS:
  • map – Updated map with reaction fluxes and colors.

  • flux2 – Fluxes and line widths through all reactions.

  • fluxMap – List of reactions carrying flux in the map and their corresponding line widths.

addFluxWidthAndColor(map, reactionIDs, fluxValues)[source]

Function to add flux widths and corresponding color shades to a map based on flux values. Rxn line width is proportional to flux magnitude. Positive fluxes are displayed in shades of red, and negative fluxes in shades of indigo. Higher flux magnitudes have higher hue saturation.

USAGE:

[map, flux2, fluxMap] = addFluxWidthAndColor (map, reactionIDs, fluxValues)

INPUTS:
  • map – A parsed model structure generated by the transformXML2Map function, with fields:

    • .rxnName - cell array of reaction names

    • .rxnWidth - cell array of reaction line widths (updated on output)

    • .rxnColor - cell array of reaction colours (updated on output)

    • .molColor - cell array of molecule colours (updated on output)

    • .molAlias - cell array of molecule alias IDs

    • .rxnBaseReactantAlias - cell array (per reaction) of base reactant alias IDs

    • .rxnReactantAlias - cell array (per reaction) of secondary reactant alias IDs

    • .rxnBaseProductAlias - cell array (per reaction) of base product alias IDs

    • .rxnProductAlias - cell array (per reaction) of secondary product alias IDs

  • reactionIDs – Cell array of reaction IDs.

  • fluxValues – Array of flux values corresponding to the reaction IDs.

OUTPUTS:
  • map – Updated map with reaction fluxes and colors.

  • flux2 – Fluxes and line widths through all reactions.

  • fluxMap – List of reactions carrying flux in the map and their corresponding line widths.

addNotes(model, map)[source]

Function to add notes from a model to a metabolic map

USAGE:

[newMap] = addNotes (model, map)

INPUTS:
  • model – COBRA model structure, with fields:

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

    • .metNames - m x 1 cell array of metabolite names

    • .metFormulas - m x 1 cell array of metabolite chemical formulas

    • .metCharge - m x 1 metabolite charges

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

    • .rxnConfidenceScores - n x 1 reaction confidence scores

    • .lb - n x 1 reaction lower flux bounds

    • .ub - n x 1 reaction upper flux bounds

    • .subSystems - n x 1 cell array of reaction subsystem(s)

  • map – A parsed model structure generated by the transformXML2Map function, with fields:

    • .specName - cell array of species (metabolite) names

    • .rxnName - cell array of reaction names

    • .rxnType - cell array of reaction types

OUTPUT:

newMap – Map with notes on metabolites and reactions added, with fields updated:

  • .specNotes - cell array of metabolite notes

  • .rxnNotes - cell array of reaction notes

changeMapMetIDToName(mapPath, modelPath, outputXMLFile)[source]

Replaces VMH metabolite IDs in a CellDesigner map with full names from a COBRA model.

USAGE:

changeMapMetIDToName (mapPath, modelPath, outputXMLFile)

INPUTS:
  • mapPath – Path to CellDesigner XML map file

  • modelPath – Path to COBRA .mat model file

OPTIONAL INPUT:

outputXMLFile – Name for the output CellDesigner XML file (default: <mapPath base name>_MetNames.xml)

OUTPUTS:
  • A map with full metabolite names instead of VMH IDs

  • as the specified CellDesigner XML file.

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, with fields:

    • .specName - cell array of species (metabolite) names

    • .specID - cell array of species IDs (one per name)

    • .molID - cell array of molecule (node) IDs

  • metList – List of metabolites names

OPTIONAL INPUT:

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

OUTPUT:

newMap – MATLAB structure of map with field updated:

  • .molColor - cell array of molecule colours

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

OUTPUTS:

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] = changeRxnColorAndWidth (map, rxnList, color, areaWidth)

INPUTS:
  • map – File from CellDesigner parsed to MATLAB format, with fields:

    • .rxnName - cell array of reaction names

    • .rxnReactantLineColor - (optional field) cell array of per-reactant line colours

    • .rxnReactantLineWidth - (optional field) cell array of per-reactant line widths

    • .rxnProductLineColor - (optional field) cell array of per-product line colours

    • .rxnProductLineWidth - (optional field) cell array of per-product line widths

  • 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 fields updated:

  • .rxnColor - cell array of reaction colours

  • .rxnWidth - cell array of reaction line widths

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, printLevel, excelName)[source]

Check discrepancies between a CD map and a COBRA model.

USAGE:

[rxn, met, rev, form] = checkCDerrors (map, model, printLevel, excelName)

INPUTS:
  • map – A parsed model structure generated by the transformXML2Map function, with fields:

    • .rxnName - cell array of reaction names

    • .specName - cell array of species (metabolite) names

    • .rxnReversibility - cell array of reaction reversibility flags (‘true’/’false’)

  • model – A COBRA model, with fields:

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

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

OPTIONAL INPUTS:
  • printLevel – Verbose level, passed on to printRxnFormula (default: 1)

  • excelName – Name of the Excel file to export the error tables to. If provided, the wrong/absent/duplicated reaction tables are written to one sheet each.

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, with fields:

    • .specName - cell array of species (metabolite/protein) names

    • .specMetaID - cell array of species meta IDs

    • .specIncName - cell array of included-species (complex member) names

    • .specIncID - cell array of included-species IDs

    • .molID - cell array of molecule (node) IDs

  • protList – List of protein names

OPTIONAL INPUT:

color – Color for the proteins in CAPITALS (default: ‘RED’)

OUTPUT:

newMap – Map with protein nodes coloured, with field updated:

  • .molColor - cell array of molecule colours

colorRxnType(map, type, color, width)[source]

colors reactions based on their type and modifies their width.

USAGE:

[newMap] = colorRxnType (map, type, color, width)

INPUTS:
  • map – Map from CellDesigner parsed to MATLAB format, with fields:

    • .rxnType - cell array of reaction types

    • .rxnReactantID - cell array of reactant IDs per reaction

    • .rxnProductID - cell array of product IDs per reaction

  • type – Type of reactions to be colored (as String)

  • color – Color used to color reactions (see createColorsMap.m)

OPTIONAL INPUT:

width – Width size for reactions (default: 8)

OUTPUT:

newMap – MATLAB structure of new map with needed reactions type colored and width modified, with fields updated:

  • .rxnColor - cell array of reaction colours

  • .rxnWidth - cell array of reaction line widths

  • .rxnReactantLineColor - cell array of per-reactant line colours

  • .rxnReactantLineWidth - cell array of per-reactant line widths

  • .rxnProductLineColor - cell array of per-product line colours

  • .rxnProductLineWidth - cell array of per-product line widths

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, with fields:

    • .rxnName - cell array of reaction names

    • .rxnReactantLineColor - (optional field) cell array of per-reactant line colours

    • .rxnReactantLineWidth - (optional field) cell array of per-reactant line widths

    • .rxnProductLineColor - (optional field) cell array of per-product line colours

    • .rxnProductLineWidth - (optional field) cell array of per-product line widths

  • model – COBRA model, with fields:

    • .genes - g x 1 cell array of gene identifiers (Entrez IDs)

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

    • .rxnGeneMat - (built if absent via buildRxnGeneMat) n x g reaction-gene incidence matrix

  • 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 fields updated:

  • .rxnColor - cell array of reaction colours

  • .rxnWidth - cell array of reaction line widths

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, with fields:

    • .rxnName - cell array of reaction names

    • .rxnReactantLineColor - (optional field) cell array of per-reactant line colours

    • .rxnReactantLineWidth - (optional field) cell array of per-reactant line widths

    • .rxnProductLineColor - (optional field) cell array of per-product line colours

    • .rxnProductLineWidth - (optional field) cell array of per-product line widths

  • model – COBRA model structure, with fields:

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

    • .subSystems - n x 1 cell array of reaction subsystem(s)

  • 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 fields updated:

  • .rxnColor - cell array of reaction colours

  • .rxnWidth - cell array of reaction line widths

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, with field:

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

  • map – MATLAB structure of the map obtained from the function transformXML2Map, with fields:

    • .rxnName - cell array of reaction names

    • .rxnID - cell array of reaction IDs

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 the transformXML2Map function, with fields:

    • .specName - Cell array of metabolite (species) names

  • 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 the transformXML2Map function, with fields:

    • .rxnName - Cell array of reaction names

  • 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()

OUTPUTS:

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, with fields used here:

  • .rxnName - Cell array of reaction names

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, with fields used here:

  • .rxnReactantLineColor - (if present) cell array, per reaction, of secondary reactant line entries; used to detect the “complete” map structure

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] = findMetsFromCompartInMap (map, compartment)

INPUTS:
  • map – Map from CellDesigner parsed to matlab format, with fields:

    • .specName - Cell array of metabolite (species) names

  • 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] = findMetsInMap (map, metList)

INPUTS:
  • map – Map from CellDesigner parsed to MATLAB format, with fields:

    • .specName - Cell array of metabolite (species) names

  • 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] = findRxnsFromCompartInMap (map, compartment)

INPUTS:
  • map – Map from CellDesigner parsed to matlab format, with fields:

    • .rxnName - Cell array of reaction names

  • 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] = findRxnsInMap (map, rxnList)

INPUTS:
  • map – Map from CellDesigner parsed to MATLAB format, with fields:

    • .rxnName - Cell array of reaction names

  • 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] = findRxnsPerTypeInMap (map, rxnType)

INPUTS:
  • map – Map from CellDesigner parsed to MATLAB format, with fields:

    • .rxnType - Cell array of reaction type strings (e.g. TRANSPORT, STATE_TRANSITION)

    • .rxnName - Cell array of reaction names

  • 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, with fields:

  • .specID - Cell array of species (metabolite) IDs

  • .molID - Cell array of molecule (species alias) IDs

  • .molAlias - Cell array of molecule alias IDs

  • .rxnID - Cell array of reaction IDs

  • .rxnBaseReactantID - Cell array, per reaction, of base reactant species IDs

  • .rxnBaseReactantAlias - Cell array, per reaction, of base reactant molecule alias IDs

  • .rxnReactantID - Cell array, per reaction, of secondary reactant species IDs

  • .rxnReactantAlias - Cell array, per reaction, of secondary reactant molecule alias IDs

  • .rxnBaseProductID - Cell array, per reaction, of base product species IDs

  • .rxnBaseProductAlias - Cell array, per reaction, of base product molecule alias IDs

  • .rxnProductID - Cell array, per reaction, of secondary product species IDs

  • .rxnProductAlias - Cell array, per reaction, of secondary product molecule alias IDs

OUTPUT:

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

  • .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.

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 the transformXML2Map function, with fields:

    • .rxnName - Cell array of reaction names

    • .specID - Cell array of species (metabolite) IDs

    • .specName - Cell array of metabolite (species) names

    • .rxnBaseReactantID - Cell array, per reaction, of base reactant species IDs

    • .rxnReactantID - Cell array, per reaction, of secondary reactant species IDs

    • .rxnBaseProductID - Cell array, per reaction, of base product species IDs

    • .rxnProductID - Cell array, per reaction, of secondary product species IDs

    • .rxnReversibility - Cell array of ‘true’/’false’ reversibility strings, per reaction

  • 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.

removeCDReactions(fileName, rxnRemoveList, printLevel)[source]

Removes a list of reactions from a CellDesigner map, also removing corresponding species and species aliases if necessary. The reduced map is written out as a new CellDesigner XML file.

USAGE:

removeCDReactions (fileName, rxnRemoveList, printLevel)

INPUTS:
  • fileName – Path to the CellDesigner XML map file to read. The reduced map is written to a file with the same name suffixed _subset.xml

  • rxnRemoveList – Cell array of reaction abbreviation to be removed

OPTIONAL INPUTS:

printLevel – {0,(1)}, whether to print a message for each entry of rxnRemoveList not present in the map (default: 1)

removeMapMol(xmlStruct, map, molRemoveList, printLevel)[source]

Removes a list of molecules (species alias) from a CellDesigner map, also removing the corresponding reaction if necessary.

USAGE:

[xmlStructOut, map, specNotInMap] = removeMapMol (xmlStruct, map, molRemoveList, printLevel)

INPUTS:
  • 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, with fields:

    • .molAlias - Cell array of molecule alias IDs

    • .rxnName - Cell array of reaction names

    • .specName - Cell array of metabolite (species) names

    • .sID - Stoichiometric matrix with rows = speciesID and columns = reactionsID

    • .sAlias - Stoichiometric matrix with rows = moleculeAlias and columns = reactionsID

    • .idAlias - Logical matrix with rows = speciesID and columns = speciesAlias

  • molRemoveList – Cell array of molecule abbreviation to be removed

OPTIONAL INPUTS:

printLevel – {0,(1)}

OUTPUTS:
  • xmlStructOut – Structure for the conversion back to an XML file of the structure.

  • map – Matlab structure of the smaller map containing all the relevant fields usable for checking and correction.

  • specNotInMap – Boolean vector the length of molRemoveList indicating species that could not be found in the map

removeMapReactions(xmlStruct, map, rxnRemoveList, printLevel)[source]

Removes a list of reactions from a CellDesigner map, also removing corresponding species and species aliases if necessary.

USAGE:

[xmlStructOut, mapOut, rxnNotInMap] = removeMapReactions (xmlStruct, map, rxnRemoveList, printLevel)

INPUTS:
  • 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, with fields:

    • .rxnName - Cell array of reaction names

    • .sID - Stoichiometric matrix with rows = speciesID and columns = reactionsID

    • .sAlias - Stoichiometric matrix with rows = speciesAlias and columns = reactionsID

    • .idAlias - Logical matrix with rows = speciesID and columns = speciesAlias

  • rxnRemoveList – Cell array of reaction abbreviation to be removed

OPTIONAL INPUTS:

printLevel – {0,(1)}

OUTPUTS:
  • xmlStructOut – Structure for the conversion back to an XML file of the structure.

  • mapOut – Matlab structure of the smaller map containing all the relevant fields usable for checking and correction.

  • rxnNotInMap – Boolean vector the length of rxnRemoveList indicating reactions that could not be found in the map

removeMapSpecies(xmlStruct, map, specRemoveList, specRemoveType, printLevel)[source]

Removes a list of species from a CellDesigner map, also removing the corresponding species aliases and reactions

USAGE:

[xmlStructOut, mapOut, specNotInMap] = removeMapSpecies (xmlStruct, map, specRemoveList, specRemoveType, printLevel)

INPUTS:
  • xmlStruct – Structure obtained from the xml2struct function (see transformXML2Map), kept for the conversion back to an XML file of the structure

  • map – MATLAB structure of the map (see transformXML2Map) containing all the relevant fields usable for checking and correction. Fields used:

    • .specName - species names, matched against specRemoveList

    • .specType - species types, matched against specRemoveType

    • .sID - stoichiometric matrix (specID x rxnID), used to find the reactions of the removed species

    • .sAlias - stoichiometric matrix (molAlias x rxnID), used to find the molecule aliases of the removed reactions

    • .idAlias - logical matrix (specID x molAlias), used to find the molecule aliases of the removed species

    • .rxnName - reaction names, used to size the reaction-removal pass

  • specRemoveList – Cell array of species abbreviations to be removed (a single char is wrapped into a 1x1 cell array)

OPTIONAL INPUTS:
  • specRemoveType – Species type; if provided, species of this map.specType are also marked for removal in addition to specRemoveList

  • printLevel – Verbosity level: 0 = silent, 1 (default) = print species from specRemoveList that could not be found in the map

OUTPUTS:
  • xmlStructOutxmlStruct with the removed reactions, species, and species aliases stripped from .sbml.model.listOfReactions.reaction, .sbml.model.listOfSpecies.species, and the CellDesigner species-alias list nested under .sbml.model.annotation…

  • mapOutmap with the entries of the removed reactions, species, and molecule aliases stripped from every associated field

  • specNotInMap – Boolean vector the length of specRemoveList indicating species that could not be found in the map

removeMapSpeciesOnly(xmlStruct, map, specRemoveList, specRemoveType, printLevel)[source]

Removes a list of species from a CellDesigner map, also removing the corresponding species aliases, but does not remove reactions

USAGE:

[xmlStruct, map, specNotInMap] = removeMapSpeciesOnly (xmlStruct, map, specRemoveList, specRemoveType, printLevel)

INPUTS:
  • xmlStruct – Structure obtained from the xml2struct function (see transformXML2Map), kept for the conversion back to an XML file of the structure. Fields used:

    • .sbml - top-level SBML tree; .sbml.model.listOfSpecies.species and the CellDesigner species-alias list nested under .sbml.model.annotation… are filtered in place

  • map – MATLAB structure of the map (see transformXML2Map) containing all the relevant fields usable for checking and correction. Fields used:

    • .specName - species names, matched against specRemoveList

    • .specType - species types, matched against specRemoveType

    • .sID - stoichiometric matrix (specID x rxnID), used to find reactants/products of the removed species

    • .sAlias - stoichiometric matrix (molAlias x rxnID), used to find reactants/products of the removed molecule aliases

    • .idAlias - logical matrix (specID x molAlias), used to find the molecule aliases of the removed species

    • .rxnID - reaction identifiers, used to loop over reactions

    • .specID - species identifiers, used to identify retained base reactants/products

    • .molAlias - molecule aliases, used to identify retained base reactant/product aliases

    • .rxnBaseReactantID - ID of the reaction’s base reactant(s)

    • .rxnReactantID - ID of the reaction’s (non-base) reactant(s)

    • .rxnBaseReactantAlias - alias of the reaction’s base reactant(s)

    • .rxnReactantAlias - alias of the reaction’s (non-base) reactant(s)

    • .rxnBaseProductID - ID of the reaction’s base product(s)

    • .rxnProductID - ID of the reaction’s (non-base) product(s)

    • .rxnBaseProductAlias - alias of the reaction’s base product(s)

    • .rxnProductAlias - alias of the reaction’s (non-base) product(s)

  • specRemoveList – Cell array of species abbreviations to be removed (a single char is wrapped into a 1x1 cell array)

OPTIONAL INPUTS:
  • specRemoveType – Species type; if provided, species of this map.specType are also marked for removal in addition to specRemoveList

  • printLevel – Verbosity level: 0 = silent, 1 (default) = print species from specRemoveList that could not be found in the map

OUTPUTS:
  • xmlStructxmlStruct (INPUT) with the retained species and species aliases only; reactions are left untouched

  • mapmap (INPUT) with the entries of the removed species and molecule aliases stripped from every associated field, except species/aliases that had to be retained as a reaction’s base reactant or base product

  • specNotInMap – Boolean vector the length of specRemoveList indicating species that could not be found in the map

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 (see transformFullXML2Map). Used by the function struct2xml to obtain the XML file. Fields used:

    • .sbml - top-level SBML tree, updated in place with the information transferred from map before being written

  • map – MATLAB structure of the protein-protein-interaction (PPI) map (see transformFullXML2Map, documentation/source/notes/MapPPIStructure.md) with the relevant information; this information is then transferred to the xmlStruct for the conversion. Fields used:

    • .molAlias - alias of each molecule (no duplicates)

    • .molID - ID of each molecule (duplicates)

    • .molCompartAlias - compartment alias of each molecule (empty if no info)

    • .molXPos - X position of each molecule

    • .molYPos - Y position of each molecule

    • .molWidth - width of each molecule

    • .molHeight - height of each molecule

    • .molColor - colour of each molecule (HTML code)

    • .specID - ID of each species (no duplicates)

    • .specMetaID - metaID of each species

    • .specName - name of each species

    • .specType - type of each species (SIMPLE_MOLECULE/ION/PROTEIN…)

    • .specNotes - notes of each species (empty if no info)

    • .complexAlias - alias of each complex (no duplicates)

    • .complexID - ID of each complex (duplicates)

    • .complexCompartAlias - compartment alias of each complex (empty if no info)

    • .complexXPos - X position of each complex

    • .complexYPos - Y position of each complex

    • .complexWidth - width of each complex

    • .complexHeight - height of each complex

    • .complexColor - colour of each complex (HTML code)

    • .specIncID - ID of each included species (no duplicates)

    • .specIncName - name of each included species

    • .specIncCplxID - complex ID reference of each included species

    • .specIncType - type of each included species

    • .specIncNotes - notes of each included species (empty if no info)

    • .rxnID - ID of each reaction (no duplicates)

    • .rxnMetaID - metaID of each reaction

    • .rxnName - name of each reaction

    • .rxnType - type of each reaction

    • .rxnReversibility - reversibility of each reaction (‘false’/’true’)

    • .rxnBaseReactantAlias - alias of the base reactant(s)

    • .rxnBaseReactantID - ID of the base reactant(s)

    • .rxnBaseProductAlias - alias of the base product(s)

    • .rxnBaseProductID - ID of the base product(s)

    • .rxnReactantAlias - alias of reactant(s) (empty if not present)

    • .rxnReactantID - ID of reactant(s) (empty if not present)

    • .rxnReactantLineType - type of the reactant’s reaction line

    • .rxnReactantLineColor - colour of the reactant’s reaction line

    • .rxnReactantLineWidth - width of the reactant’s reaction line

    • .rxnProductAlias - alias of product(s) (empty if not present)

    • .rxnProductID - ID of product(s) (empty if not present)

    • .rxnProductLineType - type of the product’s reaction line

    • .rxnProductLineColor - colour of the product’s reaction line

    • .rxnProductLineWidth - width of the product’s reaction line

    • .rxnModAlias - alias of modifier metabolite(s) of each reaction

    • .rxnModID - ID of modifier metabolite(s) of each reaction

    • .rxnModType - type of the modification by the metabolite

    • .rxnModColor - colour of the modification line

    • .rxnModWidth - width of the modification line

    • .rxnColor - colour of the main reaction (HTML code)

    • .rxnWidth - width of the main reaction

    • .rxnNotes - notes of each reaction (empty if no info)

    • .compartAlias - alias of each compartment (empty if no info)

    • .compartName - name of each compartment (empty if no info)

  • 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 documentation/source/notes/MapPPIStructure.md

USAGE:

[xmlStruct, map] = transformFullXML2Map (fileName)

INPUT:

fileName – Path to the XML file

OUTPUTS:
  • xmlStruct – Structure obtained from the xml2struct function, kept for the conversion back to an XML file of the structure. Fields used:

    • .sbml - top-level SBML tree parsed from fileName; the molecule, complex, included-species, species, reaction, and compartment fields of map below are all extracted from this tree

  • map – MATLAB structure of the protein-protein-interaction (PPI) map (see documentation/source/notes/MapPPIStructure.md) containing all the relevant fields usable for checking and correction. Note: the stoichiometric/alias matrices (.sID, .sAlias, .idAlias) are not built by this function for PPI maps:

    • .molAlias - alias of each molecule (no duplicates)

    • .molID - ID of each molecule (duplicates)

    • .molCompartAlias - compartment alias of each molecule (empty if no info)

    • .molXPos - X position of each molecule

    • .molYPos - Y position of each molecule

    • .molWidth - width of each molecule

    • .molHeight - height of each molecule

    • .molColor - colour of each molecule (HTML code)

    • .complexAlias - alias of each complex (no duplicates)

    • .complexID - ID of each complex (duplicates)

    • .complexCompartAlias - compartment alias of each complex (empty if no info)

    • .complexXPos - X position of each complex

    • .complexYPos - Y position of each complex

    • .complexWidth - width of each complex

    • .complexHeight - height of each complex

    • .complexColor - colour of each complex (HTML code)

    • .specIncID - ID of each included species (no duplicates)

    • .specIncName - name of each included species

    • .specIncCplxID - complex ID reference of each included species

    • .specIncType - type of each included species

    • .specIncNotes - notes of each included species (empty if no info)

    • .specID - ID of each species (no duplicates)

    • .specMetaID - metaID of each species

    • .specName - name of each species

    • .specType - type of each species (SIMPLE_MOLECULE/ION/PROTEIN…)

    • .specNotes - notes of each species (empty if no info)

    • .rxnID - ID of each reaction (no duplicates)

    • .rxnMetaID - metaID of each reaction

    • .rxnName - name of each reaction

    • .rxnType - type of each reaction

    • .rxnReversibility - reversibility of each reaction (‘false’/’true’)

    • .rxnBaseReactantAlias - alias of the base reactant(s)

    • .rxnBaseReactantID - ID of the base reactant(s)

    • .rxnBaseProductAlias - alias of the base product(s)

    • .rxnBaseProductID - ID of the base product(s)

    • .rxnReactantAlias - alias of reactant(s) (empty if not present)

    • .rxnReactantID - ID of reactant(s) (empty if not present)

    • .rxnReactantLineType - type of the reactant’s reaction line

    • .rxnReactantLineColor - colour of the reactant’s reaction line

    • .rxnReactantLineWidth - width of the reactant’s reaction line

    • .rxnProductAlias - alias of product(s) (empty if not present)

    • .rxnProductID - ID of product(s) (empty if not present)

    • .rxnProductLineType - type of the product’s reaction line

    • .rxnProductLineColor - colour of the product’s reaction line

    • .rxnProductLineWidth - width of the product’s reaction line

    • .rxnModAlias - alias of modifier metabolite(s) of each reaction

    • .rxnModID - ID of modifier metabolite(s) of each reaction

    • .rxnModType - type of the modification by the metabolite

    • .rxnModColor - colour of the modification line

    • .rxnModWidth - width of the modification line

    • .rxnColor - colour of the main reaction (HTML code)

    • .rxnWidth - width of the main reaction

    • .rxnNotes - notes of each reaction (empty if no info)

    • .compartAlias - alias of each compartment (empty if no info)

    • .compartName - name of each compartment (empty if no info)

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 (see transformXML2Map). Used by the function struct2xml to obtain the XML file. Fields used:

    • .sbml - top-level SBML tree, updated in place with the information transferred from map before being written

  • map – MATLAB structure of the map (see transformXML2Map, documentation/source/notes/MapStructure.md) with the relevant information; this information is then transferred to the xmlStruct for the conversion. Fields used:

    • .molAlias - alias of each molecule (no duplicates)

    • .molID - ID of each molecule (duplicates)

    • .molCompartAlias - compartment alias of each molecule (empty if no info)

    • .molXPos - X position of each molecule

    • .molYPos - Y position of each molecule

    • .molWidth - width of each molecule

    • .molHeight - height of each molecule

    • .molColor - colour of each molecule (HTML code)

    • .specID - ID of each species (no duplicates)

    • .specMetaID - metaID of each species

    • .specName - name of each species

    • .specType - type of each species (SIMPLE_MOLECULE/ION/PROTEIN…)

    • .specNotes - notes of each species (empty if no info)

    • .rxnID - ID of each reaction (no duplicates)

    • .rxnMetaID - metaID of each reaction

    • .rxnName - name of each reaction

    • .rxnType - type of each reaction

    • .rxnReversibility - reversibility of each reaction (‘false’/’true’)

    • .rxnBaseReactantAlias - alias of the base reactant(s)

    • .rxnBaseReactantID - ID of the base reactant(s)

    • .rxnBaseProductAlias - alias of the base product(s)

    • .rxnBaseProductID - ID of the base product(s)

    • .rxnReactantAlias - alias of reactant(s) (empty if not present)

    • .rxnReactantID - ID of reactant(s) (empty if not present)

    • .rxnColor - colour of the main reaction (HTML code)

    • .rxnWidth - width of the main reaction

    • .rxnProductAlias - alias of product(s) (empty if not present)

    • .rxnProductID - ID of product(s) (empty if not present)

    • .rxnModAlias - alias of modifier metabolite(s) of each reaction

    • .rxnModID - ID of modifier metabolite(s) of each reaction

    • .rxnModType - type of the modification by the metabolite

    • .rxnModColor - colour of the modification line

    • .rxnModWidth - width of the modification line

    • .rxnNotes - notes of each reaction (empty if no info)

    • .compartAlias - alias of each compartment (empty if no info)

    • .compartName - name of each compartment (empty if no info)

  • fileName – Path and name of the new XML file

transformToIrreversibleMap(map, rxnlist)[source]

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

USAGE:

[mapIrrev] = transformToIrreversibleMap (map, rxnlist)

INPUTS:
  • map – MATLAB structure of a CellDesigner map (see transformXML2Map). Fields used:

    • .rxnName - reaction names, matched against rxnlist

  • rxnlist – Cell array of reaction names to transform to irreversible format

OUTPUT:

mapIrrevmap with .rxnReversibility set to ‘false’ for the reactions listed in rxnlist

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 – MATLAB structure of a CellDesigner map (see transformXML2Map). Fields used:

    • .rxnName - reaction names, matched against rxnlist

  • rxnlist – Cell array of reaction names to transform to reversible format

OUTPUT:

mapRevmap with .rxnReversibility set to ‘true’ for the reactions listed in rxnlist

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 documentation/source/notes/MapStructure.md

USAGE:

[xmlStruct, map] = transformXML2Map (fileName)

INPUT:

fileName – Path to the XML file

OUTPUTS:
  • xmlStruct – Structure obtained from the xml2struct function, kept for the conversion back to an XML file of the structure. Fields used:

    • .sbml - top-level SBML tree parsed from fileName; the molecule, species, reaction, and compartment fields of map below are all extracted from this tree

  • map – MATLAB structure of the map (see documentation/source/notes/MapStructure.md) containing all the relevant fields usable for checking and correction:

    • .molAlias - alias of each molecule (no duplicates)

    • .molID - ID of each molecule (duplicates)

    • .molCompartAlias - compartment alias of each molecule (empty if no info)

    • .molXPos - X position of each molecule

    • .molYPos - Y position of each molecule

    • .molWidth - width of each molecule

    • .molHeight - height of each molecule

    • .molColor - colour of each molecule (HTML code)

    • .specID - ID of each species (no duplicates)

    • .specMetaID - metaID of each species

    • .specName - name of each species

    • .specType - type of each species (SIMPLE_MOLECULE/ION/PROTEIN…)

    • .specNotes - notes of each species (empty if no info)

    • .rxnID - ID of each reaction (no duplicates)

    • .rxnMetaID - metaID of each reaction

    • .rxnName - name of each reaction

    • .rxnType - type of each reaction

    • .rxnReversibility - reversibility of each reaction (‘false’/’true’)

    • .rxnBaseReactantAlias - alias of the base reactant(s)

    • .rxnBaseReactantID - ID of the base reactant(s)

    • .rxnBaseProductAlias - alias of the base product(s)

    • .rxnBaseProductID - ID of the base product(s)

    • .rxnReactantAlias - alias of reactant(s) (empty if not present)

    • .rxnReactantID - ID of reactant(s) (empty if not present)

    • .rxnProductAlias - alias of product(s) (empty if not present)

    • .rxnProductID - ID of product(s) (empty if not present)

    • .rxnModAlias - alias of modifier metabolite(s) of each reaction

    • .rxnModID - ID of modifier metabolite(s) of each reaction

    • .rxnModType - type of the modification by the metabolite

    • .rxnModColor - colour of the modification line

    • .rxnModWidth - width of the modification line

    • .rxnColor - colour of the main reaction (HTML code)

    • .rxnWidth - width of the main reaction

    • .rxnNotes - notes of each reaction (empty if no info)

    • .compartAlias - alias of each compartment (empty if no info)

    • .compartName - name of each compartment (empty if no info)

    • .sID - stoichiometric matrix with rows = specID and columns = rxnID, in the same order as in the map structure. Contains -1 if the species is a substrate, +1 if the species is a product, and 0 if it does not participate in the reaction. Added by getMapMatrices.

    • .sAlias - stoichiometric matrix with rows = molAlias and columns = rxnID, in the same order as in the map structure. Contains -1 if the molecule is a substrate, +1 if the molecule is a product, and 0 if it does not participate in the reaction. Added by getMapMatrices.

    • .idAlias - logical matrix with rows = specID and columns = molAlias. Contains 1 if the specID matches the molID of that molAlias, and 0 otherwise. Added by getMapMatrices.

unifyMetabolicMapCD(map)[source]

Unify colours in a metabolic map as a standard. Reactions will be grey and metabolites will be white.

USAGE:

[map2] = unifyMetabolicMapCD (map)

INPUT:

map – MATLAB structure of a CellDesigner map (see transformXML2Map). Fields used:

  • .rxnName - reaction names; length sets the reaction loop bound

  • .molColor - molecule colours; length sets the molecule loop bound

OUTPUT:

map2map with every .rxnColor set to ‘FFDCDCDC’ (grey), every .rxnWidth set to 1, and every .molColor set to ‘FFFFFFFF’ (white)

unifyMetabolicPPImapCD(map)[source]

Unify a metabolic and protein-protein interaction map as a standard. Reactions will be grey and metabolites/complexes will be white.

USAGE:

[map2] = unifyMetabolicPPImapCD (map)

INPUT:

map – MATLAB structure of a CellDesigner PPI map (see transformFullXML2Map). Fields used:

  • .rxnName - reaction names; length sets the reaction loop bound

  • .molColor - molecule colours; length sets the molecule loop bound

  • .complexColor - complex colours; length sets the complex loop bound

  • .rxnProductLineColor - product-side secondary-link colours

  • .rxnProductLineWidth - product-side secondary-link widths

  • .rxnReactantLineColor - reactant-side secondary-link colours

  • .rxnReactantLineWidth - reactant-side secondary-link widths

OUTPUT:

map2map with every .rxnColor set to ‘FFDCDCDC’ (grey), every .rxnWidth set to 1, every .molColor and .complexColor set to ‘FFFFFFFF’ (white), and every non-empty .rxnProductLineColor / .rxnReactantLineColor entry set to ‘FFDCDCDC’ with the corresponding .rxnProductLineWidth / .rxnReactantLineWidth set to 1

uniqueMetabolites(model)[source]

Identifies unique metabolites by ignoring compartment tags

USAGE:

uniqueMets = uniqueMetabolites (model)

INPUT:

model – COBRA model structure with fields:

  • .mets - m x 1 cell array of metabolite identifiers (e.g. metabolite[c])

OUTPUT:

uniqueMets – Cell array of unique metabolite names, excluding compartment tags

uniqueSpeciesInMap(mapMicroMap)[source]

Identifies unique metabolites and other species in a CellDesigner map structure

USAGE:

uniqueSpecies = uniqueSpeciesInMap (mapMicroMap)

INPUT:

mapMicroMap – MATLAB structure of a CellDesigner map (see transformXML2Map). Fields used:

  • .specName - species names, split into metabolites (names containing a […] compartment tag) and non-metabolites

OUTPUT:

uniqueSpecies – Structure with fields:

  • .mets - unique metabolite names, with compartment tags removed

  • .nonMets - unique non-metabolite species names

visualizeFluxFromFile(mapXMLFile, fluxCSVFile, outputXMLFile)[source]

This function takes a CellDesigner map XML file and a flux vector table file (e.g., CSV or XLSX), visualizes the flux on the map, and saves the output map as a CellDesigner XML file

USAGE:

visualizeFluxFromFile (mapXMLFile, fluxCSVFile, outputXMLFile)

INPUTS:
  • mapXMLFile – The input CellDesigner .xml file for the map

  • fluxCSVFile – The input file containing the flux vector, e.g. CSV or XLSX

OPTIONAL INPUTS:

outputXMLFile – The output .xml file name for the updated map (default ‘VisualizedFluxOnMap.xml’)

Note

The map with visualized flux is saved as the specified CellDesigner XML file; this function has no return value.

visualizeFluxTimeseriesFromFile(mapXMLFile, fluxDataFile, outputFileNameBase, numCores)[source]

Visualize fluxes for multiple time points from a data table file (CSV or XLSX). Supports both sequential and parallel processing based on the availability of the Parallel Computing Toolbox.

USAGE:

visualizeFluxTimeseriesFromFile (mapXMLFile, fluxDataFile, outputFileNameBase, numCores)

INPUTS:
  • mapXMLFile – The input CellDesigner .xml file for the map

  • fluxDataFile – The input .csv or .xlsx file containing the flux vectors, one column per time point

OPTIONAL INPUTS:
  • outputFileNameBase – The base name for the output files (default ‘VisualizedFluxOnMap’)

  • numCores – Number of cores to use if the Parallel Computing Toolbox is available (default: all available cores)

Note

Saves a CellDesigner XML map with visualized fluxes for each time point; this function has no return value.

visualizeNormalizedRxnPresence(mapDir, setColours, numCores)[source]

Takes reconstruction visualizations in CellDesigner XML format and extracts reactions with a specific colour that indicates the reaction presence. Reaction presence is then stored in a table as 0 or 1 (absent or present). Each column represents an individual map. The reaction presence of all maps are then summed to obtain a total count of reaction presence over all the maps. The reaction presence is then normalized over the total amount of maps used, colors and line widths are assigned based on the fraction value, and the newly coloured map is saved in the directory with the XML files used to create it. Parallelization is used if the Parallel Computing Toolbox is available.

USAGE:

rxnPrsTable = visualizeNormalizedRxnPresence (mapDir, setColours, numCores)

INPUTS:

mapDir – The directory (char, path) with the XML files to be used. Internally reassigned to the dir listing of that path, so the fields below refer to that listing:

  • .name - file name of each directory entry, filtered to the .xml files

  • .folder - folder of the directory entries, used to build the full path to each map file

OPTIONAL INPUTS:
  • setColours – Cell array that defines the colour and line width scheme based on normalised reaction presence. Each row of setColours should contain {fraction, colour, line width}. For example: {1, ‘c92a2a’, 10; 0.9, ‘ff6b6b’, 8; …}. If not provided, a default set of colours and widths will be used.

  • numCores – If the Parallel Computing Toolbox is available, this specifies the number of cores to use for parallel processing. If not provided, all available cores will be used.

OUTPUT:

rxnPrsTable – Table with, for each map, the reaction presence

visualizeReconstructionsOnMap(mapFile, folderPath, numCores)[source]

Visualizes genome-scale metabolic reconstructions on a metabolic map. This function processes multiple metabolic reconstructions either sequentially or in parallel, depending on the availability of the Parallel Computing Toolbox.

USAGE:

visualizeReconstructionsOnMap (mapFile, folderPath, numCores)

INPUTS:
  • mapFile – The input CellDesigner .xml file for the metabolic map

  • folderPath – Path to the folder containing genome-scale reconstructions (.mat files); each must contain a variable model with field .rxns (reaction identifiers used to colour the map)

OPTIONAL INPUTS:

numCores – Number of cores to use if parallel computing is available (default: all available cores)

Note

Saves a CellDesigner XML file for each reconstruction; this function has no return value.