Rmta¶
- MTA(model, rxnFBS, Vref, varargin)[source]¶
Calculate Metabolic Transformation Analysis (MTA) using the the solver CPLEX. Code was prepared to be able to be stopped and be launched again by using a temporary file called ‘temp_MTA.mat’. Outputs are cell array for each alpha (one simulation by alpha). It there is only one alpha, content of cell will be returned The code here has been based on:
Yizhak, K., Gabay, O., Cohen, H., & Ruppin, E. (2013). ‘Model-based identification of drug targets that revert disrupted metabolism and its application to ageing’. Nature communications, 4. http://www.nature.com/ncomms/2013/131024/ncomms3632/full/ncomms3632.html
- USAGE
[TSscore,deletedGenes,Vout] = MTA (model, rxnFBS, Vref, alpha, epsilon, varargin)
- INPUTS
model – Metabolic model structure (COBRA Toolbox format).
rxnFBS – Array that contains the desired change: Forward, Backward and Unchanged (+1;0;-1). This is calculated from the rules and differential expression analysis.
Vref – Reference flux of the source state.
- OPTIONAL INPUTS
alpha – Numeric value or array. Parameter of the quadratic problem (default = 0.66)
epsilon – Numeric value or array. Minimun perturbation for each reaction (default = 0)
rxnKO – Binary value. Calculate knock outs at reaction level instead of gene level. (default = false)
listKO – Cell array containing the name of genes or reactions to knockout. (default = all)
timelimit – Time limit for the calculation of each knockout. (default = inf)
SeparateTranscript – Character used to separate different transcripts of a gene. (default = ‘’). .. rubric:: Examples
- SeparateTranscript = ‘’
gene 10005.1 ==> gene 10005.1
gene 10005.2 ==> gene 10005.2
gene 10005.3 ==> gene 10005.3
- SeparateTranscript = ‘.’
gene 10005.1
gene 10005.2 ==> gene 10005
gene 10005.3
numWorkers – Integer: is the maximun number of workers used by the solver. 0 = automatic, 1 = sequential, > 1 = parallel. (default = 0)
FORCE_CPLEX – 1 to force CPLEX solver, 0 (default) for COBRA solver.
printLevel – Integer. 1 if the process is wanted to be shown on the screen, 0 otherwise. (default = 1)
- OUTPUTS
TSscore – Transformation score by each transformation
deletedGenes – The list of genes/reactions removed in each knock-out
Vres – Matrix of resulting fluxes
- MTA_MIQP(OptimizationModel, KOrxn, varargin)[source]¶
Returns the OptimizationModel solution of a particular MTA problem and an specific model
- USAGE
[v_res, success, unsuccess] = MTA_MIQP (OptimizationModel, KOrxn, numWorkers, timeLimit, printLevel)
- INPUT
OptimizationModel – Cplex Model struct
KOrxn – perturbation in the model (reactions)
numWorkers – number of threads used by Cplex.
FORCE_CPLEX – 1 to force CPLEX solver, 0 (default) for COBRA solver.
printLevel – 1 if the process is wanted to be shown on the screen, 0 otherwise. Default: 1.
- OUTPUTS
Vout – Solution flux of MIQP formulation for each case
solution – Cplex solution struct
- MTA_TS(Vout, Vref, rxnFBS)[source]¶
Returns the TS score of a particular solution of the MTA perturbation algorithm.
- USAGE
score = MTA_TS (v_res,vref,Model,success,unsuccess)
- INPUT
Vout – Solution flux of MIQP formulation for each case
Vref – Reference flux of source state
rxnFBS – Array that contains the desired change: Forward, Backward and Unchanged (+1;0;-1).
- OUTPUTS
score – TS score for each case
- buildMTAproblemFromModel(model, rxnFBS, Vref, varargin)[source]¶
Returns the COBRA Optimization model needed to perform the MTA
- USAGE
OptimizationModel = buildMTAproblemFromModel (model,rxnFBS,Vref,alpha,epsilon)
- INPUT
model – Metabolic model (COBRA format)
rxnFBS – Forward, Backward and Unchanged (+1;0;-1) values corresponding to each reaction.
Vref – Reference flux of the source state.
alpha – parameter of the quadratic problem (default = 0.66)
epsilon minimun disturbance for each reaction, (default = 0)
- OUTPUTS
OptimizationModel – COBRA model struct that includes the stoichiometric contrains, the thermodinamic constrains and the binary variables.
- calculateEPSILON(samples, rxnFBS, varargin)[source]¶
Calculate the minimum required flux change (epsilon) for reactions to be considered as significantly changed with p-value of 0.05 The code below is based on the method presented in:
Yizhak, K., Gabay, O., Cohen, H., & Ruppin, E. (2013). Model-based identification of drug targets that revert disrupted metabolism and its application to ageing. Nature communications, 4, 2632.
- USAGE
epsilon = calculateEPSILON (samples, rxnFBS, ‘unique_epsilon’, false, ‘minimum’, 1e-3)
- INPUT
samples – Matrix of sampled fluxes.
rxnFBS – Array that contains the desired change: Forward, Backward and Unchanged (+1;0;-1). This is calculated from the rules and differential expression analysis.
- OPTIONAL INPUTS
varargin – ParameterName value pairs with the following options:
unique_epsilon: True = unique epsilon, False = each reaction has different epsilon (default=false)
minimum: Minimun value for epsilon requiered (default=1e-3)
- OUTPUT
epsilon – Numeric value or array with the epsilon for the different reactions
- calculateGeneKOMatrix(model, varargin)[source]¶
Build a rxn-gene matrix such that the i-th column indicates what reactions become inactive because of the i-th gene’s knock-out.
- USAGE
geneKO = calculateGeneKOMatrix (model, SeparateTranscript, printLevel)
- INPUT
model – The COBRA Model structure
- OPTIONAL INPUTS
SeparateTranscript Character used to separate – different transcripts of a gene. (default = ‘’) .. rubric:: Examples
- SeparateTranscript = ‘’
gene 10005.1 ==> gene 10005.1
gene 10005.2 ==> gene 10005.2
gene 10005.3 ==> gene 10005.3
- SeparateTranscript = ‘.’
gene 10005.1
gene 10005.2 ==> gene 10005
gene 10005.3
printLevel – Integer. 1 if the process is wanted to be shown on the screen, 0 otherwise. (default = 1)
- OUTPUT
geneKO – Struct which contains matrix with blocked reactions for each gene in the metabolic model, name of reactions and name of genes.
- diffexprs2rxnFBS(model, diff_exprs, Vref, varargin)[source]¶
Returns Forward - Backward - Unchanged (+1;0;-1) for each reaction. (+1)R_f (-1)R_b (0)unchanged
- USAGE
rxnFBS = diffexprs2rxnFBS (model, diff_exprs, Vref, ‘SeparateTranscript’, ‘’, ‘logFC’, 0, ‘pval’,0.05)
- INPUT
model – The COBRA Model structure
diff_exprs – MATLAB Table including the information of the differentially expressed genes. Required columns (with theses names):
gene ( ID of gene, same as in the meabolic model)
logFC (SOURCE VS TARGET)
pval (p-value or adjusted-p-value)
Vref – Reference flux of the model
- OPTIONAL INPUTS
varargin – ParameterName value pairs with the following options:
SeparateTranscript: Character used to separate different transcripts of a gene. (default: ‘’)
logFC: minimum log2 (fold change) requiered (default = 0)
pval: maximum p-value admited (default = 0.05)
- OUTPUT
rxnFBS – array containting the information of altered reactions: Forward - Backward - Unchanged (+1;0;-1);
- rMTA(model, rxnFBS, Vref, varargin)[source]¶
Calculate robust Metabolic Transformation Analysis (rMTA) using the solver CPLEX. Code was prepared to be able to be stopped and be launched again by using a temporally file called ‘temp_rMTA.mat’. Outputs are cell array for each alpha (one simulation by alpha). It there is only one alpha, content of cell will be returned
- USAGE
[TSscore,deletedGenes,Vout] = rMTA (model, rxnFBS, Vref, alpha, epsilon, varargin)
- INPUTS
model – Metabolic model structure (COBRA Toolbox format).
rxnFBS – Array that contains the desired change: Forward, Backward and Unchanged (+1;0;-1). This is calculated from the rules and differential expression analysis.
Vref – Reference flux of the source state.
- OPTIONAL INPUTS
alpha – Numeric value or array. Parameter of the quadratic problem (default = 0.66)
epsilon – Numeric value or array. Minimun perturbation for each reaction (default = 0)
parameterK – Numeric value value. Parameter to calculate rTS score. (default = 100)
rxnKO – Binary value. Calculate knock outs at reaction level instead of gene level. (default = false)
listKO – Cell array containing the name of genes or reactions to knockout. (default = all)
timelimit – Time limit for the calculation of each knockout. (default = inf)
SeparateTranscript – Character used to separate different transcripts of a gene. (default = ‘’) .. rubric:: Examples
- SeparateTranscript = ‘’
gene 10005.1 ==> gene 10005.1
gene 10005.2 ==> gene 10005.2
gene 10005.3 ==> gene 10005.3
- SeparateTranscript = ‘.’
gene 10005.1
gene 10005.2 ==> gene 10005
gene 10005.3
numWorkers – Integer: is the maximun number of workers used by the solver. 0 = automatic, 1 = sequential, > 1 = parallel. (default = 0)
FORCE_CPLEX – 1 to force CPLEX solver, 0 (default) for COBRA solver.
printLevel – Integer. 1 if the process is wanted to be shown on the screen, 0 otherwise. (default = 1)
- OUTPUTS
TSscore – Transformation score by each transformation
deletedGenes – The list of genes/reactions removed in each knock-out
Vref – Matrix of resulting fluxes
- rMTAsaveInExcel(xls_filename, TSscore, deletedGenes, alpha_values, varargin)[source]¶
Save in Excel all the results calculated using rMTA.
- USAGE
rMTAsaveInExcel (output_file, TSscore, deletedGenes, alpha_values, varargin)
- INPUTS
xls_filename – name of the resulting excel file
TSscore – Transformation score by each transformation
deletedGenes – The list of genes/reactions removed in each knock-out
alpha_values – Numeric value or array. Parameter of the quadratic problem (default = alpha_1, alpha_2,…)
- OPTIONAL INPUTS
gene_info – Table with the gene names and additional information. It needs a column called ‘gene’, which contains the same information as the deletedGenes variable.
differ_genes – Table with the gene differential expression information. It needs a column called ‘gene’, which contains the same information as the deletedGenes variable.
RankingGeneID – Caracter array with the ID of the gene which score is desired to know.