gMCS

GPR2models(metabolic_model, selected_rxns, separate_transcript, numWorkers, printLevel)

Each GPR rule is converted into a network where the reaction and genes involved are interconnected.

USAGE:

[networks, rxnNumGenes] = GPR2models(metabolic_model, selected_rxns, separate_transcript, numWorkers, printLevel)

INPUTS:

metabolic_model: Metabolic model structure (COBRA Toolbox format) selected_rxns: Index array which indicates selected reactions to

calculate the network.

separate_transcript: Character used to discriminate

different isoforms of a gene. Default ‘’.

OPTIONAL INPUTS:
numWorkers: Maximum number of workers
  • 0 - maximum provided by the system (automatic)

(default). If parallel pool is active, numWorkers is defined by the system, otherwise is 1. * 1 - sequential * 2+ - parallel

printLevel: show the reactions created in models.
  • 0 - shows nothing

  • 1 - shows progress by reactions (default)

  • 2+ - shows everything (reaction and network generation)

OUTPUT:

networks: Cell array which contains all the networks. rxnNumGenes: Array with the number of genes present in each GPR

rule for each reaction.

buildGmatrix(model_name, model, separate_isoform, numWorkers, printLevel)

Build the G matrix required for the calculation of genetic Minimal Cut Sets (gMCSs).

USAGE:

[G, G_ind, related, n_genes_KO, G_time] = buildGmatrix(model_name, model_struct, separate_isoform, numWorkers, printLevel)

INPUTS:

model_name: Name of the metabolic model under study. model_struct: Metabolic model structure (COBRA Toolbox format). separate_isoform: Character used to discriminate different isoforms of a gene.

OPTIONAL INPUTS:
numWorkers: Maximum number of workers
  • 0 - maximum provided by the system (automatic)

  • 1 - sequential

  • 2+ - parallel

printLevel: show the reactions created in models.
  • 0 - shows nothing

  • 1 - shows progress by reactions (default)

  • 2+ - shows everything (reaction and network generation)

OUTPUTS:

G: G matrix. G_ind: Gene knockouts associated with each row in the G matrix. related: Relationships among rows of the G matrix. n_genes_KO: Number of genes whose knockout is added by each row of the G matrix. G_time: Calculation times for each of the steps.

Example

[G, G_ind, related, n_genes_KO, G_time] = buildGmatrix(‘Recon2.v04’, modelR204, ‘.’)

calculateGeneMCS(model_name, model_struct, n_gmcs, max_len_gmcs, varargin)

Calculate genetic Minimal Cut Sets (gMCSs) using the warm-start strategy available in CPLEX, namely cplex.populate(), with or without selecting a given knockout, among all the genes included in the model or a given subset of them. Apaolaza et al., 2017 (Nature Communications).

USAGE:

[gmcs, gmcs_time] = calculateGeneMCS(model_name, model_struct, n_gmcs, max_len_gmcs, varargin)

INPUTS:
model_name: Name of the metabolic model under study (in order to

identify the G matrix).

model_struct: Metabolic model structure (COBRA Toolbox format). n_gmcs: Number of gMCSs to calculate. max_len_gmcs: Number of genes in the largest gMCS to be calculated.

OPTIONAL INPUTS:

KO: Selected gene knockout. (default = []) gene_set: Cell array containing the set of genes among which

the gMCSs are wanted to be calculated. (default = [], all genes)

target_b: Desired activity level of the metabolic task to be

disrupted. (default = 1e-3)

nutrientGMCS: Boolean variable. 0 to calculate GeneMCS, 1 to

calculate MCS containing genes and nutrients, known as ngMCS. (default = false)

exchangeRxns: Cell array containing the set of reactions to be

included as inputs of nutrients from the cell environment / culture medium. (default = [], which are all reactions with only one 1 metabolite consiedered as input for the model)

onlyNutrients: Boolean variable. 1 to calculate MCS only using

selected KO and nutrients, 0 to use everything. If there is no KO selected, it is set to false. (default = false)

separate_transcript:Character used to separate

different transcripts of a gene. (default = ‘’) Examples:

  • separate_transcript = ‘’
    • gene 10005.1 ==> gene 10005.1

    • gene 10005.2 ==> gene 10005.2

    • gene 10005.3 ==> gene 10005.3

  • separate_transcript = ‘.’
    • gene 10005.1

    • gene 10005.2 ==> gene 10005

    • gene 10005.3

forceLength: 1 if the constraint limiting the length of the

gMCSs is to be active (recommended for enumerating low order gMCSs), 0 otherwise (default = 1)

timelimit: Time limit for the calculation of gMCSs each time

the solver is called. (default = 1e75)

numWorkers: Integer: is the maximun number of workers used

by Cplex and GPR2models. 0 = automatic, 1 = sequential, > 1 = parallel. (default = 0)

printLevel: Integer. 1 if the process is wanted to be shown

on the screen, 0 otherwise. (default = 1)

OUTPUTS:

gmcs: Cell array containing the calculated gMCSs. gmcs_time: Calculation times of the different processes in

the algorithm.

Example

%With optional values [gmcs, gmcs_time] = calculateGeneMCS(‘Recon2.v04’, modelR204, 100, 10, …

‘KO’ = ‘6240’, … ‘gene_set’ = {‘2987’; ‘6241’}, … ‘timelimit’ = 300, … ‘target_b’ = 1e-4, ‘separate_transcript’ = ‘.’, … ‘forceLength’ = 0, … ‘printLevel’ = 0)

%Without optional values [gmcs, gmcs_time] = calculateGeneMCS(‘ecoli_core_model’, model, 100, 10)

calculateMCS(model_struct, n_mcs, max_len_mcs, varargin)

Calculate Minimal Cut Sets (MCSs) using the warm-start strategy available in CPLEX, namely cplex.populate(), with or without selecting a given knockout, among all the reactions included in the model or a given subset of them. Tobalina et al., 2016 (Bioinformatics); von Kamp and Klamt, 2014 (PLoS Computational Biology).

USAGE:

[mcs, mcs_time] = populateMCS(model_struct, n_mcs, max_len_mcs, options)

INPUTS:

model_struct: Metabolic model structure (COBRA Toolbox format). n_mcs: Number of MCSs to calculate. max_len_mcs: Number of reactions in the largest MCS to be calculated.

OPTIONAL INPUT: OPTIONAL INPUTS:

KO: Selected reaction knockout. (default = []) rxn_set: Cell array containing the set of reactions among which

the MCSs are wanted to be calculated. taken from model.rxns (default = [], all reactions)

target_b: Desired activity level of the metabolic task to be

disrupted. (default = 1e-3)

forceLength: 1 if the constraint limiting the length of the

MCSs is to be active (recommended for enumerating low order MCSs), 0 otherwise (default = 1)

timelimit: Time limit for the calculation of MCSs each time

the solver is called. (default = 1e75)

numWorkers: Integer: is the maximun number of workers used

by Cplex and GPR2models. 0 = automatic, 1 = sequential, > 1 = parallel. (default = 0)

printLevel: Integer. 1 if the process is wanted to be shown

on the screen, 0 otherwise. (default = 1)

OUTPUTS:

mcs: Cell array containing the calculated MCSs. mcs_time: Calculation times of the different processes in

the algorithm.

Example

%With optional values [mcs, mcs_time] = calculateMCS(modelR204, 100, 10, …

‘KO’, ‘r1651’, … ‘rxn_set’, {‘r1652’; ‘r1653’; ‘r1654’}, … ‘timelimit’, 300, … ‘target_b’, 1e-4, … ‘forceLength’, 0, … ‘printLevel’, 0, …

%Without optional values [mcs, mcs_time] = calculateMCS(model, 100, 10)

checkGeneMCS(model, gMCSs, isoform_separator)

Check if the gMCS is Minimal and Cut Set gMCS = gene Minimal Cut Set Minimal = the knock-off of all the genes of the gMCS is neccesary to eliminate the objective function Cut Set = The elimination of all the genes ensures the elimination of the objective reaction

USAGE:

[IsCutSet, IsMinimal, geneNotMinimal] = checkGeneMCS(model, gMCSs, isoform_separator)

INPUTS:

model: Metabolic model in COBRA format. gMCSs: cell array which stores all the gMCSs previously

calculated. Each position contains a gMCS.

isoform_separator: genes in the model have different isoformes,

which are identificated by a separator from the gene name. (Default = ‘’).

OUTPUT:
IsCutSet: array which indicates the biomass producion if

all genes of the gMCSs are deleted

IsMinimal: array which indicates the maximum of biomass if

any gene is deleted

geneNotMinimal: cell array which stores all the genes which

make the gMCS not minimal (this errors are produced by the restriction of coputation time).

Note

The isoform separator is neccesary to consider some genes as the same gene. Example: genes 555.1, 555.2 and 555.3 are considered as gene 555

prepareModelNutrientGeneMCS(model, exchangeRxns)

Add artificial genes for the exchange reactions and prepare model for the gMCS implementation which includes nutrients from the culture medium.

USAGE:

model = prepareModelNutrientGeneMCS(model, exchangeRxns)

INPUTS:

model: Metabolic model structure (COBRA Toolbox format).

OPTIONAL INPUTS:
exchangeRxns: Exchange reactions to be included (default = all

reactions which start by ‘EX_’, ‘DM_’ or ‘sink_’ and only have one metabolite involved.

OUTPUTS:
model: Metabolic model structure with genes for selected

exchanges (COBRA Toolbox format).

Example

model = prepareModelNutrientGeneMCS(model, exchangeRxns);