gMCS¶
-
GPR2models
(metabolic_model, selected_rxns, separate_transcript, numWorkers, printLevel)[source]¶ 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)
Outputs
- 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)[source]¶ 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, options)[source]¶ 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, options)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 input
options – Structure with fields:
.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 are included).
.timelimit - Time limit for the calculation of gMCSs each time the solver is called. Default: 1e75.
.target_b - Desired activity level of the metabolic task to be disrupted. Default: 1e-3;
.separate_transcript - Character used to discriminate different transcripts of a gene. Default: ‘’. Example: 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.
.numWorkers - is the maximun number of workers
used by Cplex and GPR2models. 0 = automatic, 1 = sequential, >1 = parallel. Default = 0; * .printLevel - 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, options) %Being: %options.KO = '6240' %options.gene_set = {'2987'; '6241'} %options.timelimit = 300 %options.target_b = 1e-4 %options.separate_transcript = '.'; %options.forceLength = 0 %options.printLevel = 0 %Without optional values [gmcs, gmcs_time] = calculateGeneMCS('ecoli_core_model', model, 100, 10)
Check the installation of cplex
-
calculateMCS
(model_struct, n_mcs, max_len_mcs, options)[source]¶ 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
options – Structure with fields:
- .KO - Selected reaction knockout. Default: [].
- .rxn_set - Cell array containing the set of reactions (‘rxns’) among which the MCSs are wanted to be calculated. Default: [] (all reactions are included).
- .timelimit - Time limit for the calculation of MCSs each time the solver is called. Default: 1e75.
- .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.
- .numWorkers - is the maximun number of workers
used by Cplex and GPR2models. 0 = automatic, 1 = sequential, >1 = parallel. Default = 0; * .printLevel - 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, options) %Being: %options.KO = 'r1651' %options.rxn_set = {'r1652'; 'r1653'; 'r1654'} %options.timelimit = 300 %options.target_b = 1e-4 %options.forceLength = 0 %options.printLevel = 0 %Without optional values [mcs, mcs_time] = calculateMCS(model, 100, 10)
Check the installation of cplex