canConsume Checks which metabolites that can be consumed by a model using the specified constraints. 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 (opt, default model.mets) consumed vector with true if the corresponding metabolite could be produced Usage: consumed=canConsume(model,mets) Rasmus Agren, 2012-11-14
0001 function consumed=canConsume(model,mets) 0002 % canConsume 0003 % Checks which metabolites that can be consumed by a model using the 0004 % specified constraints. 0005 % 0006 % model a model structure 0007 % mets either a cell array of metabolite IDs, a logical vector 0008 % with the same number of elements as metabolites in the model, 0009 % or a vector of indexes to check for (opt, default model.mets) 0010 % 0011 % consumed vector with true if the corresponding metabolite could be 0012 % produced 0013 % 0014 % Usage: consumed=canConsume(model,mets) 0015 % 0016 % Rasmus Agren, 2012-11-14 0017 % 0018 0019 if nargin<2 0020 mets=model.mets; 0021 end 0022 0023 [model rxns]=addExchangeRxns(model,'in',mets); 0024 consumed=haveFlux(model,10^-5,rxns); 0025 end