Sammim

expa(model, varargin)[source]

function [model fullmodel] = expaths(model,print)

This function finds the extreme pathways of a stoichiometric model according to the algorithm by Schilling, Letscher and Palsson:

Schilling, C. H., Letscher, D. & Palsson, B. O. Theory for the systemic definition of metabolic pathways and their use in interpreting metabolic function from a pathway-oriented perspective. Journal of theoretical biology 203, 229–48 (2000).

This algorithm is defined in appendix B of the citation above. Steps of the algorithm and relevant excerpts from the paper are quoted as comments throuhghout the code

INPUT: model - model is inputed in the format used with the COBRA toolbox. Minimum required fields are

S - stoichiometric coefficient matrix lb - lower bound for reactions ub - upper bound for reactions rev - reversibility flag for each reaction in the model. Freely

exchanged metabolites (From exchange reactions) are not determined to be so through their reversibility flag, but through non-zero upper and lower bounds. Inputs have a zero upper bound and outputs have a zero lower bound

c - objective function rxns - reaction names

OPTIONAL INPUT Print - If this input is given and is 1, ‘y’ or ‘Y’ the function prints the progress of the algorithm.

OUTPUTS fullmodel - decomposed model of original model inputed. Reversible

reactions get decomposed into two forward reactions. All fields mentioned above get adjusted, as well as rules,rxnGeneMat,grRules,subSystems, confidenceScores,rxnReferences,rxnECNumbers,rxnNotes,rxnNames. These are commonly used COBRA fields. most importantly, a matrix P is added as a field and corresponds to the extreme pathways.

model - the model outputted matches the original model inputed. This is a

collapsed version of the ‘fullmodel’ output, where the reversible reactions that had been decomposed are combined again. The extreme pathways are combined as absolute value.

openSammi(htmlName)[source]

Visualize the given model, set of reactions, and/or data using SAMMI. Documentation at: https://sammim.readthedocs.io/en/latest/index.html

Citation: Schultz, A., & Akbani, R. (2019). SAMMI: A Semi-Automated

Tool for the Visualization of Metabolic Networks. Bioinformatics.

USAGE: openSAMMI(htmlName)

OPTIONAL INPUT
  • htmlName – Name of the html file previously written using the sammi

  • function. If left blank will print all available models.

OUTPUT

No MATLAB output, opens the visualization in a new browser tab.

sammi(model, parser, data, secondaries, options)[source]

Visualize the given model, set of reactions, and/or data using SAMMI. Documentation at: https://sammim.readthedocs.io/en/latest/index.html

Citation: Schultz, A., & Akbani, R. (2019). SAMMI: A Semi-Automated

Tool for the Visualization of Metabolic Networks. Bioinformatics.

USAGE: sammi(model,parser,data,secondaries,options)

INPUT

model – COBRA model to be visualized

OPTIONAL INPUTS
  • parser – How the model is to be parsed. There are four possible

  • options for this parameter. Default empty array.*empty array: If this parameter is an empty arrray, all reaction in the model will be loaded in a single map. Not advisable for large maps. *string: If this parameter is a characters array there are two options. Either the parameter defines the path to a SAMMI map (JSON file downloaded from a previous instance of SAMMI), in which case the given map will be used, or the parameter defines a field in the model struct, in which case this field will be used to parse the model into subgraphs. *cell array: If this parameter is a cell array, it should be a cell array of strings containing reaction IDs. Only these reactions will be included in a single SAMMI map. *struct: If this model is a struct of length n, the model will be parsed into n subgraphs. Each element of the struct should contain two fields plus an additional optional one:

    name: Name of the subgraph. rxns: Reactions to be included in the subgraph. flux: Optional field. Data to be mapped as reaction color.

  • data – Data to be mapped onto the model. Struct of length n. Defaults

  • to an empty array where no data is mapped. Element of the struct should

  • contain two fields – type: A cell array of two strings. The firt string should be either ‘rxns’, ‘mets’, or ‘links’ indicating which type of data is to be mapped. The second string should be either ‘color’ or ‘size’, indicating how the data is to be mapped. ‘links’ only work with ‘size’, since link color is the same as the one of the reaction it is assciated with. data: a table object. VariableNames will be translated into condition names, and RowNames should be reaction IDs for ‘rxns’ and ‘links’ data, and metabolite IDs for ‘mets’ data. NaN values will not be mapped.

  • secondaries – Cell array of strings of regular expressions. All

  • metabolites, in all subgraphs, matching any of the regular expressions

  • will be shelved. Default to empty array where no metabolites are

  • shelved.

  • options – Struct with the following fields: htmlName: Name of the html file to be written and opened for the visualization. Defaults to ‘index_load’. Change this options to write to a different html file that will not be overwritten by the default option. load: Load the html file in a new tab upon writing the file. Default to true. If you would not like a new tab to open, set this parameter to false and refresh a previously opened window. To open a new window without re-running SAMMI use the openSammi function. jscode: String. Defaults to empty string. Additional JavaScript code to run after loading the map. Can be any code to modify the loaded map.

OUTPUT

No MATLAB output. Opens a browser window with the SAMMI visualization.

Examples

%1 Open model in single map sammi(model)

%2 Open model as multiple subgraphs divided by subSystems sammi(model,’subSystems’)

%3 Open model as multiple subgraphs divided by subSystems, load two %conditions with randomly generated data, and shelve hydrogen, water, %and O2 upon loading. rxntbl = array2table(randn(length(model.rxns),2),…

‘VariableNames’, {‘condition1’,’condition2’},… ‘RowNames’, model.rxns);

data(1).type = {‘rxns’ ‘color’}; data(1).data = rxntbl; data(2).type = {‘rxns’ ‘size’}; data(2).data = rxntbl; secondaries = {‘^h[.]$’,’^h20[.]$’,’^o2[.]$’}; sammi(model,’subSystems’,data,secondaries)