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
- 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.
- INPUTS
map – A parsed model structure generated by ‘transformXML2Map’ function.
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.
- INPUTS
map – A parsed model structure generated by ‘transformXML2Map’ function.
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
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
- 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] = 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, printLevel, excelName)[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
printLevel
- 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()
- 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
- 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
- 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.
- removeCDReactions(fileName, rxnRemoveList, printLevel)[source]¶
removes a list of reactions from a cell designer map, also removes correspinding species and species aliases if necessary
- INPUT
- 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.
rxnRemoveList: Cell array of reaction abbreviation to be removed
printLevel: {0,(1)}
- OUTPUT
- 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
Ronan Fleming 2020
- removeMapMol(xmlStruct, map, molRemoveList, printLevel)[source]¶
removes a list of molecules (species alias) from a cell designer map, also removes corresponding reaction if necessary
- INPUT
- 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.
molRemoveList: Cell array of molecule abbreviation to be removed
printLevel: {0,(1)}
- OUTPUT
- 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.
- specNotInMap: boolean vector the length of molRemoveList
indicating species that could not be found in the map
Ronan Fleming 2020
- removeMapReactions(xmlStruct, map, rxnRemoveList, printLevel)[source]¶
removes a list of reactions from a cell designer map, also removes correspinding species and species aliases if necessary
- INPUT
- 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.
rxnRemoveList: Cell array of reaction abbreviation to be removed
printLevel: {0,(1)}
- OUTPUT
- 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
Ronan Fleming 2020
- removeMapSpecies(xmlStruct, map, specRemoveList, specRemoveType, printLevel)[source]¶
removes a list of species from a cell designer map, also removes corresponding species aliases and reactions
- INPUT
- 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.
specRemoveList: Cell array of species abbreviation to be removed
printLevel: {0,(1)}
- OUTPUT
- 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.
- specNotInMap: boolean vector the length of specRemoveList
indicating species that could not be found in the map
Ronan Fleming 2020
- removeMapSpeciesOnly(xmlStruct, map, specRemoveList, specRemoveType, printLevel)[source]¶
removes a list of species from a cell designer map, also removes corresponding species aliases and but does not remove reactions
- INPUT
- 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.
specRemoveList: Cell array of species abbreviation to be removed
printLevel: {0,(1)}
- OUTPUT
- xmlStruct: 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 specRemoveList
indicating species that could not be found in the map
Ronan Fleming 2020
- 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://github.com/opencobra/cobratoolbox/blob/master/docs/source/notes/fullMATLABStructure.md)
- 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://github.com/opencobra/cobratoolbox/blob/master/docs/source/notes/simpleMATLABStructure.md)
- 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.
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.
- 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
- uniqueMetabolites(model)[source]¶
uniqueMetabolites - Identifies unique metabolites by ignoring compartment tags
- USAGE
uniqueMets = uniqueMetabolites (model)
- INPUT
model – COBRA model structure containing metabolites in model.mets
- OUTPUT
uniqueMets – Cell array of unique metabolite names, excluding compartment tags
- uniqueSpeciesInMap(mapMicroMap)[source]¶
uniqueSpeciesInMap - Identifies unique metabolites and other species in a CellDesigner map structure
- USAGE
uniqueSpecies = uniqueSpeciesInMap (mapMicroMap)
- INPUT
mapMicroMap – Structure containing species from a CellDesigner map mapMicroMap.specName contains species names
- OUTPUT
uniqueSpecies – Structure with fields: - mets: Unique metabolites (names without compartment tags) - nonMets: Unique non-metabolite species
- 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.
- INPUTS
mapXMLFile – The input CellDesigner .xml file for the map.
fluxCSVFile – The input file containing the flux vector, e.g., CSV
or XLSX.
outputXMLFile – (Optional) The output .xml file name for the updated map.
- OUTPUTS
The map with visualized flux saved as the specified CellDesigner XML file.
- 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.
- INPUTS
mapXMLFile – The input CellDesigner .xml file for the map.
fluxDataFile – The input .csv or .xlsx file containing the flux vectors.
outputFileNameBase – (Optional) The base name for the output files.
numCores – (Optional) Number of cores to use if parallel computing is available. If not provided, all available cores will be used.
- OUTPUTS
Saves a CellDesigner XML map with visualized fluxes for each time point.
- visualizeNormalizedRxnPresence(mapDir, setColours, numCores)[source]¶
Function that 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 = visualiseNormalisedRxnPresence (mapDir, setColours, numCores)
- Required inputs
mapDir – The directory with the XML files to be used.
- 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 – (Optional) 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.
Authors: .. Bram Nap. University of Galway, Ireland, 27/09/2024. .. modified by Cyrille C. Thinnes. University of Galway, Ireland, 27/09/2024. Reduced the color range and added taking account of rxn line width for improved readability of the heatmap. Implemented parallel computing capabilities.
- 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.
- INPUTS
mapFile – The input CellDesigner .xml file for the metabolic map.
folderPath – Path to the folder containing genome-scale reconstructions (.mat files).
numCores – (Optional) Number of cores to use if parallel computing is available. If unspecified, all available cores will be used.
- OUTPUTS
Saves a CellDesigner XML file for each reconstruction.