testOptKnockSol

PURPOSE ^

testOptKnockSol Test an OptKnock knockout strain

SYNOPSIS ^

function [growthRate,minProd,maxProd] = testOptKnockSol(model,targetRxn,deletions)

DESCRIPTION ^

testOptKnockSol Test an OptKnock knockout strain

 [growthRate,minProd,maxProd] = testOptKnockSol(model,targetRxn,deletions)

INPUTS
 model         COBRA model structure
 targetRxn     Target reaction (e.g. 'EX_etoh(e)')

OPTIONAL INPUT
 deletions     Set of reaction deletions (e.g. {'PGI','TPI'})
               (Default = [])

OUTPUTS
 growthRate    Maximim growth rate of the strain
 minProd       Minimum production rate at max growth rate
 maxProd       Maximum production rate at max growth rate

 Markus Herrgard 5/23/07

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [growthRate,minProd,maxProd] = testOptKnockSol(model,targetRxn,deletions)
0002 %testOptKnockSol Test an OptKnock knockout strain
0003 %
0004 % [growthRate,minProd,maxProd] = testOptKnockSol(model,targetRxn,deletions)
0005 %
0006 %INPUTS
0007 % model         COBRA model structure
0008 % targetRxn     Target reaction (e.g. 'EX_etoh(e)')
0009 %
0010 %OPTIONAL INPUT
0011 % deletions     Set of reaction deletions (e.g. {'PGI','TPI'})
0012 %               (Default = [])
0013 %
0014 %OUTPUTS
0015 % growthRate    Maximim growth rate of the strain
0016 % minProd       Minimum production rate at max growth rate
0017 % maxProd       Maximum production rate at max growth rate
0018 %
0019 % Markus Herrgard 5/23/07
0020  
0021 if (nargin < 3)
0022     deletions = [];
0023 end
0024 
0025 tol = 1e-7;
0026 
0027 % Number of deletions
0028 nDel = length(deletions);
0029 
0030 modelKO = model;
0031 for i = 1:nDel
0032     modelKO = changeRxnBounds(modelKO,deletions{i},0,'b');
0033 end
0034 % Calculate optimal growth rate
0035 solKO = optimizeCbModel(modelKO);
0036 growthRate = solKO.f;
0037 if (solKO.stat == 1)
0038     % Max & min production of the metabolite at the optimal growth rate
0039     grRounded = floor(solKO.f/tol)*tol;
0040     modelKO = changeRxnBounds(modelKO,modelKO.rxns(modelKO.c==1),grRounded,'l');
0041     modelKO = changeObjective(modelKO,targetRxn);
0042     solMax = optimizeCbModel(modelKO,'max');
0043     solMin = optimizeCbModel(modelKO,'min');
0044     maxProd = solMax.f;
0045     minProd = solMin.f;
0046 else
0047     maxProd = 0;
0048     minProd = 0;
0049 end

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