Draw_by_rxn

draw_by_rxn(model, rxns, drawMap, direction, initialMet, excludeMets, flux, save, closev, reportDeadEnds)[source]

Defines the visualisation scope from a list of reactions.

USAGE:

[involvedMets, deadEnds, deadRxns] = draw_by_rxn (model, rxns, drawMap, direction, initialMet, excludeMets, flux, save, closev, reportDeadEnds)

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:
  • drawMap – Boolean indicating whether to visualise the COBRA model. Set this to false to avoid rendering large maps and return results faster.

    Default: false

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

  • initialMet – Cell array containing the abbreviation of the initial metabolite in the COBRA model. This metabolite is shown as a green circle on the map. This option supports draw_by_met, which calls draw_by_rxn and passes initialMet.

    Default: empty

  • 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

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

  • reportDeadEnds – Boolean indicating whether to report dead-end metabolites and dead reactions in the specified visualisation scope.

OUTPUTS:
  • 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 metabolite visualisation scope from a reaction list and supports draw_by_met.