Home > core > canProduce.m

canProduce

PURPOSE ^

canProduce

SYNOPSIS ^

function produced=canProduce(model,mets)

DESCRIPTION ^

 canProduce
   Checks which metabolites that can be produced from a model using the
   specified constraints. This is a less advanced but faster version of
   checkProduction.

   model       a model structure
   mets        either a cell array of metabolite IDs, a logical vector 
               with the same number of elements as metabolites in the model,
               or a vector of indexes to check for (optional, default model.mets)

   produced    vector with true if the corresponding metabolite could be
               produced

 Usage: produced=canProduce(model,mets)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function produced=canProduce(model,mets)
0002 % canProduce
0003 %   Checks which metabolites that can be produced from a model using the
0004 %   specified constraints. This is a less advanced but faster version of
0005 %   checkProduction.
0006 %
0007 %   model       a model structure
0008 %   mets        either a cell array of metabolite IDs, a logical vector
0009 %               with the same number of elements as metabolites in the model,
0010 %               or a vector of indexes to check for (optional, default model.mets)
0011 %
0012 %   produced    vector with true if the corresponding metabolite could be
0013 %               produced
0014 %
0015 % Usage: produced=canProduce(model,mets)
0016 
0017 if nargin<2
0018     mets=model.mets;
0019 elseif ~islogical(mets) && ~isnumeric(mets)
0020     mets=convertCharArray(mets);
0021 end
0022 
0023 [model, rxns]=addExchangeRxns(model,'out',mets);
0024 produced=haveFlux(model,10^-5,rxns);
0025 end

Generated by m2html © 2005