singleRxnDeletion

PURPOSE ^

singleRxnDeletion Performs single reaction deletion analysis using FBA,

SYNOPSIS ^

function [grRatio,grRateKO,grRateWT,hasEffect,delRxn,fluxSolution] = singleRxnDeletion(model,method,rxnList,verbFlag)

DESCRIPTION ^

singleRxnDeletion Performs single reaction deletion analysis using FBA, 
MOMA or linearMOMA

 [grRatio,grRateKO,grRateWT,hasEffect,delRxns,hasEffect] = singleGeneDeletion(model,method,rxnList,verbFlag)

INPUT
 model         COBRA model structure including reaction names

OPTIONAL INPUTS
 method        Either 'FBA', 'MOMA', or 'lMOMA' (Default = 'FBA')
 rxnList       List of reactions to be deleted (Default = all reactions)
 verbFlag      Verbose output (Default = false)

OUTPUTS
 grRatio       Computed growth rate ratio between deletion strain and wild type
 grRateKO      Deletion strain growth rates (1/h)
 grRateWT      Wild type growth rate (1/h)
 hasEffect     Does a reaction deletion affect anything
 delRxn        Deleted reacction
 fluxSolution  FBA/MOMA/lMOMA fluxes for KO strains

 Richard Que 12/04/2009
 Based on singleGeneDeletion.m written by Markus Herrgard

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [grRatio,grRateKO,grRateWT,hasEffect,delRxn,fluxSolution] = singleRxnDeletion(model,method,rxnList,verbFlag)
0002 %singleRxnDeletion Performs single reaction deletion analysis using FBA,
0003 %MOMA or linearMOMA
0004 %
0005 % [grRatio,grRateKO,grRateWT,hasEffect,delRxns,hasEffect] = singleGeneDeletion(model,method,rxnList,verbFlag)
0006 %
0007 %INPUT
0008 % model         COBRA model structure including reaction names
0009 %
0010 %OPTIONAL INPUTS
0011 % method        Either 'FBA', 'MOMA', or 'lMOMA' (Default = 'FBA')
0012 % rxnList       List of reactions to be deleted (Default = all reactions)
0013 % verbFlag      Verbose output (Default = false)
0014 %
0015 %OUTPUTS
0016 % grRatio       Computed growth rate ratio between deletion strain and wild type
0017 % grRateKO      Deletion strain growth rates (1/h)
0018 % grRateWT      Wild type growth rate (1/h)
0019 % hasEffect     Does a reaction deletion affect anything
0020 % delRxn        Deleted reacction
0021 % fluxSolution  FBA/MOMA/lMOMA fluxes for KO strains
0022 %
0023 % Richard Que 12/04/2009
0024 % Based on singleGeneDeletion.m written by Markus Herrgard
0025 
0026 if (nargin < 2)
0027     method = 'FBA';
0028 end
0029 if (nargin < 3)
0030     rxnList = model.rxns;
0031 else
0032     if (isempty(rxnList))
0033         rxnList = model.rxns;
0034     end
0035 end
0036 if (nargin < 4)
0037     verbFlag = false;
0038 end
0039 
0040 nRxns = length(model.rxns);
0041 nDelRxns = length(rxnList);
0042 
0043 solWT = optimizeCbModel(model,'max', 'one'); % by default uses the min manhattan distance norm FBA solution.
0044 grRateWT = solWT.f;
0045 
0046 grRateKO = ones(nDelRxns,1)*grRateWT;
0047 grRatio = ones(nDelRxns,1);
0048 hasEffect = true(nDelRxns,1);
0049 fluxSolution = zeros(length(model.rxns),nDelRxns);
0050 delRxn = columnVector(rxnList);
0051 if (verbFlag)  
0052     fprintf('%4s\t%4s\t%10s\t%9s\t%9s\n','No','Perc','Name','Growth rate','Rel. GR');
0053 end
0054 h = waitbar(0,'Single reaction deletion analysis in progress ...');
0055 for i = 1:nDelRxns
0056     if mod(i,10) == 0
0057         waitbar(i/nDelRxns,h);
0058     end
0059     modelDel = changeRxnBounds(model,rxnList{i},0,'b');
0060     switch method
0061         case 'lMOMA'
0062             solKO = linearMOMA(model,modelDel,'max');
0063         case 'MOMA'
0064             solKO = MOMA(model,modelDel,'max',false,true);
0065         otherwise
0066             solKO = optimizeCbModel(modelDel,'max');
0067     end
0068     if (solKO.stat == 1)
0069         grRateKO(i) = solKO.f;
0070         fluxSolution(:,i) = solKO.x;
0071     else
0072         grRateKO(i) = NaN;
0073     end
0074     if (verbFlag)
0075         fprintf('%4d\t%4.0f\t%10s\t%9.3f\t%9.3f\n',i,100*i/nDelRxns,rnxList{i},grRateKO(i),grRateKO(i)/grRateWT*100);
0076     end
0077 end
0078 if ( regexp( version, 'R20') )
0079         close(h);
0080 end
0081 
0082 grRatio = grRateKO/grRateWT;

Generated on Thu 21-Jun-2012 15:39:23 by m2html © 2003