findMetIDs Find metabolite numbers in a model metID = findMetIds(model,metList) INPUTS model COBRA model structure metList List of metabolites OUTPUT metID List of metabolite IDs corresponding to metList Jan Schellenberger 8/15/08
0001 function metID = findMetIDs(model,metList) 0002 %findMetIDs Find metabolite numbers in a model 0003 % 0004 % metID = findMetIds(model,metList) 0005 % 0006 %INPUTS 0007 % model COBRA model structure 0008 % metList List of metabolites 0009 % 0010 %OUTPUT 0011 % metID List of metabolite IDs corresponding to metList 0012 % 0013 % Jan Schellenberger 8/15/08 0014 0015 if (iscell(metList)) 0016 [tmp,metID] = ismember(metList,model.mets); 0017 else 0018 metID = find(strcmp(model.mets,metList)); 0019 if (isempty(metID)) 0020 metID = 0; 0021 end 0022 if (length(metID) > 1) 0023 metID = metID(1); 0024 end 0025 end