transformModel2KEGG replaces model.mets with model.KEGGID; if no KEGGID defined, the empty cell will be replaced with metabolite abreviation modelKEGG = transformModel2KEGG(model,CompAbr, KEGGID) model model structure CompAbr List of compounds abreviation (non-compartelized) KEGGID List of KEGGIDs for compounds in CompAbr 11-09-07 IT
0001 function modelKEGG = transformModel2KEGG(model,Dictionary) 0002 %transformModel2KEGG replaces model.mets with model.KEGGID; if no KEGGID 0003 % defined, the empty cell will be replaced with metabolite abreviation 0004 % 0005 % modelKEGG = transformModel2KEGG(model,CompAbr, KEGGID) 0006 % 0007 % model model structure 0008 % CompAbr List of compounds abreviation (non-compartelized) 0009 % KEGGID List of KEGGIDs for compounds in CompAbr 0010 % 0011 % 11-09-07 IT 0012 0013 if (nargin == 3) 0014 modelKEGG = mapKEGGID2Model(model, Dictionary); 0015 elseif(nargin == 2) 0016 warning('missing data'); 0017 elseif(nargin ==1) 0018 modelKEGG = model; 0019 end 0020 0021 modelKEGG.metsAbr = modelKEGG.mets; 0022 modelKEGG.mets = modelKEGG.KEGGID; 0023 0024 for i = 1: length(modelKEGG.metsAbr) 0025 if (isempty(modelKEGG.mets{i})) 0026 modelKEGG.mets(i)=modelKEGG.metsAbr(i); 0027 end 0028 end 0029