mapKEGGID2Model

PURPOSE ^

this function matches the compound abreviation in model and from CompAbr

SYNOPSIS ^

function model = mapKEGGID2Model(model,Dictionary)

DESCRIPTION ^

 this function matches the compound abreviation in model and from CompAbr
 and connects with the model metabolite the corresponding KEGGID

 model      model structure
 CompAbr    List of compounds abreviation (non-compartelized)
 KEGGID     List of KEGGIDs for compounds in CompAbr

 11-09-07 IT

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function model = mapKEGGID2Model(model,Dictionary)
0002 
0003 % this function matches the compound abreviation in model and from CompAbr
0004 % and connects with the model metabolite the corresponding KEGGID
0005 %
0006 % model      model structure
0007 % CompAbr    List of compounds abreviation (non-compartelized)
0008 % KEGGID     List of KEGGIDs for compounds in CompAbr
0009 %
0010 % 11-09-07 IT
0011 CompAbr = Dictionary(:, 1);
0012 KEGGID = Dictionary(:, 2);
0013 for i = 1 : length(model.mets)
0014     % finds compartment of model metabolite
0015     MetTmp=regexprep(model.mets(i),'[','-');
0016     MetTmp=regexprep( MetTmp,']','-');
0017     if (length(strfind(char(MetTmp),'-c-'))>0)
0018         MetTmp=regexprep(MetTmp,'-c-','');
0019         KEGGComp='[c]';
0020     elseif (length(strfind(char(MetTmp),'-p-'))>0)
0021         MetTmp=regexprep(MetTmp,'-p-','');
0022         KEGGComp='[p]';
0023     elseif(length(strfind(char(MetTmp),'-e-'))>0)
0024         MetTmp=regexprep(MetTmp,'-e-','');
0025         KEGGComp='[e]';
0026     else
0027         MetTmp = model.mets(i); % assuming that no compartment is associated with compound
0028     end
0029     
0030     Match=strmatch(MetTmp, CompAbr,'exact');
0031     if (length(Match)==1 && length(KEGGID{Match})>0)
0032         % associates KEGGID with model metabolte - KEGGID is compartment
0033         % dependent!
0034         KEGGTmp=[char(KEGGID(Match)) char(KEGGComp)];
0035         model.KEGGID{i,1}=KEGGTmp;
0036     elseif (length(Match)>1 && length(KEGGID{Match})>0)
0037         model.KEGGID{i,1}=[];
0038         warning(['multiple matchings for' char(model.mets(i))]);
0039     else
0040    
0041         model.KEGGID{i,1}=[];
0042     end
0043     clear MetTmp KEGGTmp
0044 end

Generated on Thu 21-Jun-2012 15:39:23 by m2html © 2003