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 (optional, default model.mets) consumed vector with true if the corresponding metabolite could be produced Usage: consumed=canConsume(model,mets)
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 (optional, 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 if nargin<2 0017 mets=model.mets; 0018 elseif ~islogical(mets) && ~isnumeric(mets) 0019 mets=convertCharArray(mets); 0020 end 0021 0022 [model, rxns]=addExchangeRxns(model,'in',mets); 0023 consumed=haveFlux(model,10^-5,rxns); 0024 end