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 = ‘’). Example

    - 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)

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

Inputs

  • OptimizationModel – Cplex Model struct
  • KOrxn – perturbation in the model (reactions)
  • numWorkers – number of threads used by Cplex.
  • 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)

Inputs

  • 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).

Output

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

Inputs

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

Output

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

Inputs

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

  • vararginParameterName 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 = ‘’) Example

    - 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)

Inputs

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

  • vararginParameterName 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 = ‘’) Example

    - 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)

  • 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