Draw_by_met¶
- draw_by_met(model, metAbbr, drawMap, radius, direction, excludeMets, flux, save, closev)[source]¶
Defines the visualisation scope from a starting metabolite.
- USAGE:
[involvedRxns, involvedMets, deadEnds, deadRxns] = draw_by_met (model, metAbbr, drawMap, radius, direction, excludeMets, flux, save, closev)
- INPUTS:
model – COBRA model structure.
metAbbr – Cell array containing the abbreviation of a metabolite in the COBRA model. This metabolite is used as the starting point for visualisation.
- OPTIONAL INPUTS:
drawMap – Logical indicating whether to visualise the COBRA model. Set this to false to avoid rendering large maps and return results faster.
Default: false
radius – Positive integer defining the search depth from metAbbr. This option is used with direction to expand the analysis step by step from the starting metabolite.
For example, to inspect substrates of ethanol, start with radius = 1, then increase the radius to include the next reaction layers.
direction – Direction used by the algorithm. Allowed values are:
‘struc’ - Visualise all metabolites connected to the specified reactions, without considering steady-state fluxes. This represents the structure of the COBRA model.
‘sub’ - Visualise only metabolites acting as substrates for the specified reactions. Reaction direction is inferred from the stoichiometric matrix and steady-state fluxes.
‘prod’ - Visualise only metabolites acting as products for the specified reactions. Reaction direction is inferred from the stoichiometric matrix and steady-state fluxes.
‘both’ - Visualise both substrates and products for the specified reactions. Reaction direction is inferred from the stoichiometric matrix and steady-state fluxes.
Default: ‘struc’
excludeMets – Cell array of metabolite abbreviations to exclude from the visualisation map, for example:
{‘Met_Abbr_1’, ‘Met_Abbr_2’, …, ‘Met_Abbr_n’}
This option is useful for excluding highly connected metabolites such as h, h2o, atp, adp, and nad, to reduce visual clutter.
Default: empty
flux – nRxns x 1 vector of reaction fluxes, where nRxns is the number of reactions in the model. Fluxes are usually obtained with optimizeCbModel. Flux values smaller than -1e-9 mmol gDW^-1 h^-1 or greater than 1e-9 mmol gDW^-1 h^-1 are treated as non-zero.
Default: vector of zeros.
save – Boolean indicating whether to save the visualisation automatically as a JPEG file. This is useful for iterative calls with different visualisation scopes.
Default: false
closev – Boolean indicating whether to close the biograph viewer window after visualisation. This is useful for iterative calls with different visualisation scopes.
Default: false
- OUTPUTS:
involvedRxns – Cell array containing the reactions involved according to the input arguments.
involvedMets – Cell array containing the metabolites involved in the specified reactions.
deadEnds – Cell array containing the dead-end metabolites in the specified reactions.
deadRxns – Cell array containing the dead reactions in the specified visualisation scope.
Note
This function is part of Paint4Net. It defines a reaction and metabolite visualisation scope around a starting metabolite.
- findNearRxns(model, Rxns, direction, flux)[source]¶
Finds neighbouring reactions for Paint4Net visualisation.
- USAGE:
Rxns = findNearRxns (model, Rxns, direction, flux)
- INPUTS:
model – COBRA model structure.
Rxns – Cell array of reaction abbreviations in the COBRA model, or a cell vector from the MATLAB workspace.
- OPTIONAL INPUTS:
direction – Direction used by the algorithm. Allowed values are:
‘struc’ - Find all metabolites connected to the specified reactions, without considering steady-state fluxes. This represents the structure of the COBRA model.
‘sub’ - Find metabolites acting as substrates for the specified reactions. Reaction direction is inferred from the stoichiometric matrix and steady-state fluxes.
‘prod’ - Find metabolites acting as products for the specified reactions. Reaction direction is inferred from the stoichiometric matrix and steady-state fluxes.
‘both’ - Find both substrates and products for the specified reactions. Reaction direction is inferred from the stoichiometric matrix and steady-state fluxes.
Default: ‘struc’
flux – nRxns x 1 vector of reaction fluxes, where nRxns is the number of reactions in the model. Fluxes are usually obtained with optimizeCbModel. Flux values smaller than -1e-9 mmol gDW^-1 h^-1 or greater than 1e-9 mmol gDW^-1 h^-1 are treated as non-zero.
Default: vector of zeros.
- OUTPUT:
Rxns – Cell array of neighbouring reaction abbreviations from the COBRA model.
Note
This function is an additional Paint4Net routine. It supports draw_by_met, which calls draw_by_rxn and passes the direction argument.