Home > src > geckomat > gather_kcats > removeStandardKcat.m

removeStandardKcat

PURPOSE ^

removeStandardKcat

SYNOPSIS ^

function model = removeStandardKcat(model)

DESCRIPTION ^

 removeStandardKcat
   Remove the "standard" pseudoenzyme and standard kcat and MW values, as
   they were introduced by getStandardKcat. Also standard kcat values that
   were assigned by getStandardKcat if fillZeroKcat was set to true are
   removed from model.ec.kcat. Both the model.ec and model.S structures
   are modified.

 Input:
   model           an ecModel in GECKO 3 format (with ecModel.ec structure)
                   that has standard kcat values implemented by
                   getStandardKcat.

 Output:
   model           ecModel without standard pseudoprotein and standard
                   kcat values

 Usage:
    model = removeStandardKcat(model);

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function model = removeStandardKcat(model)
0002 % removeStandardKcat
0003 %   Remove the "standard" pseudoenzyme and standard kcat and MW values, as
0004 %   they were introduced by getStandardKcat. Also standard kcat values that
0005 %   were assigned by getStandardKcat if fillZeroKcat was set to true are
0006 %   removed from model.ec.kcat. Both the model.ec and model.S structures
0007 %   are modified.
0008 %
0009 % Input:
0010 %   model           an ecModel in GECKO 3 format (with ecModel.ec structure)
0011 %                   that has standard kcat values implemented by
0012 %                   getStandardKcat.
0013 %
0014 % Output:
0015 %   model           ecModel without standard pseudoprotein and standard
0016 %                   kcat values
0017 %
0018 % Usage:
0019 %    model = removeStandardKcat(model);
0020 
0021 % Remove standard enzyme from ec structure
0022 stdEnzIdx = find(strcmpi(model.ec.enzymes, 'standard'));
0023 if ~isempty(stdEnzIdx)
0024     model.ec.genes(stdEnzIdx)       = [];
0025     model.ec.enzymes(stdEnzIdx)     = [];
0026     model.ec.mw(stdEnzIdx)          = [];
0027     model.ec.sequence(stdEnzIdx)    = [];
0028     if isfield(model.ec,'concs')
0029         model.ec.concs(stdEnzIdx)   = [];
0030     end
0031     rxnEnzIdx = find(model.ec.rxnEnzMat(:,stdEnzIdx));
0032     model.ec.rxns(rxnEnzIdx)        = [];
0033     model.ec.kcat(rxnEnzIdx)        = [];
0034     model.ec.source(rxnEnzIdx)      = [];
0035     model.ec.notes(rxnEnzIdx)       = [];
0036     model.ec.eccodes(rxnEnzIdx)     = [];
0037     model.ec.rxnEnzMat(:,stdEnzIdx) = [];
0038     model.ec.rxnEnzMat(rxnEnzIdx,:) = [];
0039 end
0040 
0041 % Remove standard kcat values and reapply kcat constraints for those
0042 % specific reactions
0043 stdKcatIdx = find(strcmpi(model.ec.source, 'standard'));
0044 if ~isempty(stdKcatIdx)
0045     model.ec.source(stdKcatIdx)     = {''};
0046     model.ec.kcat(stdKcatIdx)       = 0;
0047     model = applyKcatConstraints(model,stdKcatIdx);
0048 end
0049 
0050 % Remove standard protein, usage and gene from model structure
0051 stdMetIdx = find(strcmpi(model.mets, 'prot_standard'));
0052 if ~isempty(stdMetIdx)
0053     model       = removeMets(model,stdMetIdx,false,false,false,false);
0054 end
0055 stdProtEx = find(strcmpi(model.rxns, 'usage_prot_standard'));
0056 if ~isempty(stdProtEx)
0057     model       = removeReactions(model,stdProtEx,false,false,false);
0058 end
0059 stdProtGene = find(strcmpi(model.genes, 'standard'));
0060 if ~isempty(stdProtGene)
0061     model       = removeGenes(model,stdProtGene,false,false,false);
0062 end
0063 end

Generated by m2html © 2005