Home > src > geckomat > change_model > getKcatAcrossIsozymes.m

getKcatAcrossIsozymes

PURPOSE ^

getKcatAcrossIsozymes

SYNOPSIS ^

function model = getKcatAcrossIsozymes(model)

DESCRIPTION ^

 getKcatAcrossIsozymes
   For reactions without kcat value (0 in model.ec.kcat), isozymes are
   found (being based on the same reaction in the conventional GEM), that
   do have a kcat value assigned. The mean kcat value of these isozymes
   is then used to fill in model.ec.kcat.

 Input:
   model       an ecModel in full GECKO 3 format (with ecModel.ec structure),
               not GECKO light

 Output:
   model       an ecModel with kcat values assigned to isozymes in model.ec.kcat

 Usage: model = getKcatAcrossIsozymes(model);

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function model = getKcatAcrossIsozymes(model)
0002 % getKcatAcrossIsozymes
0003 %   For reactions without kcat value (0 in model.ec.kcat), isozymes are
0004 %   found (being based on the same reaction in the conventional GEM), that
0005 %   do have a kcat value assigned. The mean kcat value of these isozymes
0006 %   is then used to fill in model.ec.kcat.
0007 %
0008 % Input:
0009 %   model       an ecModel in full GECKO 3 format (with ecModel.ec structure),
0010 %               not GECKO light
0011 %
0012 % Output:
0013 %   model       an ecModel with kcat values assigned to isozymes in model.ec.kcat
0014 %
0015 % Usage: model = getKcatAcrossIsozymes(model);
0016 
0017 if model.ec.geckoLight
0018     error('Provided model is a GECKO light version, this function is not relevant for such models')
0019 end
0020 if all(model.ec.kcat==0)
0021     printOrange('WARNING: No kcat values are provided in model.ec.kcat, model remains unchanged.\n');
0022     return
0023 end
0024 
0025 noKcats     = model.ec.kcat==0;
0026 rxnIDs      = regexprep(model.ec.rxns,'_EXP_\d+','');
0027 noKcatID    = rxnIDs(noKcats);
0028 yesKcatID   = rxnIDs(~noKcats);
0029 yesKcatVal  = model.ec.kcat(~noKcats);
0030 
0031 noKcatVal   = cellfun(@(x) strcmp(x, yesKcatID), noKcatID, 'UniformOutput', false);
0032 noKcatVal   = cell2mat(cellfun(@(x) mean(yesKcatVal(x)), noKcatVal, 'UniformOutput', false));
0033 
0034 newKcat     = find(~isnan(noKcatVal));
0035 newKcatIdx  = find(noKcats);
0036 newKcatIdx  = newKcatIdx(newKcat);
0037 newKcat     = noKcatVal(newKcat);
0038 
0039 model.ec.kcat(newKcatIdx) = newKcat;
0040 model.ec.source(newKcatIdx) = {'isozymes'};
0041 end
0042

Generated by m2html © 2005