Createmetintrcnetwork

createMetIntrcNetwork(model, metAbbr, varargin)[source]

Create directed metabolite-metabolite interaction network using given metabolites and the model. The produced network consists of given metabolites and its first neighbours. Colour and width of edges will be adjusted based on flux values If fluxes of the model are given. Another metabolite-metabolite interaction network will be generated if the node is clicked;

Left click :Generate sub-metabolite-metabolite interaction network from the created figure.

This functionality was added for better looking at the created network and showing flux values on edges lines.

Right click :Generate metabolite-metabolite interaction network from model. This

functionality was added for creating metabolite-metabolite network using clicked metabolite and model.

The produced figure by right and left click on the main figure also has same property with the main figure, and it is clickable too.

NoteIf the fluxes are not given, irreversible COBRA model structure should use for

representing reversible reactions. See convertToIrreversible function at github page of cobratoolbox https://opencobra.github.io/cobratoolbox/stable/modules/reconstruction/refinement/

USAGE:

[GraphObj] = createMetIntrcNetwork (model, metAbbr, varargin)

INPUTS:
  • model – COBRA model structure with fields:

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

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

    • .S - m x n stoichiometric matrix

  • metAbbr – List of metabolite abbreviation as a cell array

OPTIONAL INPUT:

varargin – Optional Inputs provided as ‘ParameterName’, Value pairs. the following parameternames are available:

  • fluxes: flux vector

  • Graphtitle: Title for a figure as a string

  • excludedMets: As a cell array, Metabolite abbreviations that desired for exclude

  • nodeColour: Colour for nodes (RGB Triplet) e.g. [0 1 0]

    see https://www.mathworks.com/help/matlab/ref/colorspec.html

  • Hnodecolour: Colour for nodes that will be highlighted e.g. [0 1 1]

  • scaleMin Minimum value for scaling colorbar

  • scaleMax Maximum value for scaling colorbar

  • nodeSize Size of Nodes

  • HnodeSize Highlighted node size

  • arrowSize Arrow Size

  • threshold Treshold for edges, the edges that has the flux value

    below the treshold will be deleted, and if the node don’t have any relationship with any other nodes will be deleted.

  • excNodesWithDeg It deletes nodes that has not degree in a given range.

    It should be given as [minimum degree maximum degree]. Example, [1 50]. it deletes nodes that has lower than 1 degree and higher than 50 degree.

OUTPUT:

GraphObj – Matlab digraph object

Examples

  1. create network with succ[c] and akg[c] [GraphObj]=createMetIntrcNetwork(model,{‘succ[c]’,’akg[c]’})

  2. create network with flux values [GraphObj]=createMetIntrcNetwork(model,{‘succ[c]’,’akg[c]’},’fluxes’,fluxvector)

  3. create network with flux values, and exculude exclude very employed metabolites [GraphObj]=createMetIntrcNetwork(model,{‘succ[c]’,’akg[c]’},’fluxes’,fluxvector,’excludedMets’,{‘atp[c]’,’adp[c]’})

  4. create network with scaling colorbar, [0 1] [GraphObj]=createMetIntrcNetwork(model,{‘succ[c]’,’akg[c]’},’fluxes’,fluxvector,’excludedMets’,{‘atp[c]’,’adp[c]’},’scaleMax’,1,’scaleMin’,0)

hit_node(varargin)[source]

Function for generating another metabolite-metabolite interaction network if the node is clicked in the figure that produced by createMetIntrcNetwork. Right click and left click has different properties. Left click :Generate sub-metabolite-metabolite network from the created figure,

this functionality was added for better looking at the created network and showing flux values on edges lines.

Right click :Generate metabolite metabolite network from model, this

functionality were added for creating metabolite-metabolite network using clicked metabolite and model.

The produced figure from main figure also has same property with main figure, and it is clickable too.

USAGE:

hit_node (varargin)

OPTIONAL INPUTS:

varargin – This function is installed as the ButtonDownFcn callback on the text objects created by createMetIntrcNetwork, so MATLAB invokes it with the standard (source, eventData) pair followed by the extra arguments bound at registration time:

  • varargin{1} - source object (text graphics handle); .Parent.Parent is the figure and .String is the clicked metabolite name

  • varargin{2} - event data (unused)

  • varargin{3} - adjacency matrix of the current network

  • varargin{4} - cell array of metabolite names for varargin{3}

  • varargin{5} - model: COBRA model structure with fields:

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

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

    • .S - m x n stoichiometric matrix

  • varargin{6} - fluxes vector

  • varargin{7} - excludedMets, cell array of metabolite abbreviations to exclude

  • varargin{8} - Graphtitle, char, base title for the figure

  • varargin{9} - nodecolour, colour for nodes (RGB triplet)

  • varargin{10} - Hnodecolour, colour for highlighted nodes

  • varargin{11} - fcont, logical/numeric flag: true if fluxes were supplied to createMetIntrcNetwork

  • varargin{12} - scaleMin, minimum value for colorbar scaling

  • varargin{13} - scaleMax, maximum value for colorbar scaling

  • varargin{14} - nodeSize, size of nodes

  • varargin{15} - HnodeSize, highlighted node size

  • varargin{16} - arrowSize, arrow size

  • varargin{17} - threshold, edge weight threshold below which edges are removed

  • varargin{18} - excNodesWithDeg, [minimum degree maximum degree] node-degree exclusion range