0001 function model = getKcatAcrossIsozymes(model)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
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