singleGeneDeletion

PURPOSE ^

singleGeneDeletion Performs single gene deletion analysis using FBA, MOMA or

SYNOPSIS ^

function [grRatio,grRateKO,grRateWT,hasEffect,delRxns,fluxSolution] = singleGeneDeletion(model,method,geneList,verbFlag)

DESCRIPTION ^

singleGeneDeletion Performs single gene deletion analysis using FBA, MOMA or
linearMOMA

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

INPUT
 model         COBRA model structure including gene-reaction associations

OPTIONAL INPUT
 method        Either 'FBA', 'MOMA', or 'lMOMA' (Default = 'FBA')
 geneList      List of genes to be deleted (default = all genes)
 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 gene deletion affect anything (i.e. are any reactions
               removed from the model)
 delRxns       List of deleted reactions for each gene KO
 fluxSolution  FBA/MOMA/lMOMA fluxes for KO strains

 Markus Herrgard 8/7/06

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [grRatio,grRateKO,grRateWT,hasEffect,delRxns,fluxSolution] = singleGeneDeletion(model,method,geneList,verbFlag)
0002 %singleGeneDeletion Performs single gene deletion analysis using FBA, MOMA or
0003 %linearMOMA
0004 %
0005 % [grRatio,grRateKO,grRateWT,delRxns,hasEffect] = singleGeneDeletion(model,method,geneList,verbFlag)
0006 %
0007 %INPUT
0008 % model         COBRA model structure including gene-reaction associations
0009 %
0010 %OPTIONAL INPUT
0011 % method        Either 'FBA', 'MOMA', or 'lMOMA' (Default = 'FBA')
0012 % geneList      List of genes to be deleted (default = all genes)
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 gene deletion affect anything (i.e. are any reactions
0020 %               removed from the model)
0021 % delRxns       List of deleted reactions for each gene KO
0022 % fluxSolution  FBA/MOMA/lMOMA fluxes for KO strains
0023 %
0024 % Markus Herrgard 8/7/06
0025 
0026 if (nargin < 2)
0027     method = 'FBA';
0028 end
0029 if (nargin < 3)
0030     geneList = model.genes;
0031 else
0032     if (isempty(geneList))
0033         geneList = model.genes;
0034     end
0035 end
0036 if (nargin < 4)
0037     verbFlag = false;
0038 end
0039 
0040 nGenes = length(model.genes);
0041 nDelGenes = length(geneList);
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(nDelGenes,1)*grRateWT;
0047 grRatio = ones(nDelGenes,1);
0048 hasEffect = true(nDelGenes,1);
0049 fluxSolution = zeros(length(model.rxns),nDelGenes);
0050 delRxns = cell(nDelGenes,1);
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 gene deletion analysis in progress ...');
0055 for i = 1:nDelGenes
0056     if mod(i,10) == 0
0057         waitbar(i/nDelGenes,h);
0058     end
0059     [modelDel,hasEffect(i),constrRxnNames] = deleteModelGenes(model,geneList{i});
0060     delRxns{i} = constrRxnNames;
0061     if (hasEffect(i))
0062         switch method
0063             case 'lMOMA'
0064                 solKO = linearMOMA(model,modelDel,'max');
0065             case 'MOMA'
0066                 solKO = MOMA(model,modelDel,'max',false,true);
0067             otherwise
0068                 solKO = optimizeCbModel(modelDel,'max');
0069         end
0070         if (solKO.stat == 1)
0071             grRateKO(i) = solKO.f;
0072             fluxSolution(:,i) = solKO.x;
0073         else
0074             grRateKO(i) = NaN;
0075         end
0076     end
0077     if (verbFlag)
0078         fprintf('%4d\t%4.0f\t%10s\t%9.3f\t%9.3f\n',i,100*i/nDelGenes,geneList{i},grRateKO(i),grRateKO(i)/grRateWT*100);
0079     end
0080 end
0081 if ( regexp( version, 'R20') )
0082         close(h);
0083 end
0084 
0085 grRatio = grRateKO/grRateWT;

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