diff --git a/doc/src/geckomat/limit_proteins/calculateFfactor.html b/doc/src/geckomat/limit_proteins/calculateFfactor.html index 0a0ad575..855823fe 100644 --- a/doc/src/geckomat/limit_proteins/calculateFfactor.html +++ b/doc/src/geckomat/limit_proteins/calculateFfactor.html @@ -121,23 +121,22 @@

SOURCE CODE ^end -0067 -0068 % Get MW and abundance (unit does not matter, f is fraction) -0069 [~,idx] = ismember(protData.uniprot,uniprotDB.ID); -0070 protData.MW = uniprotDB.MW(idx); -0071 protData.abundance = protData.level .* protData.MW; -0072 -0073 totalProt = sum(protData.abundance); -0074 -0075 % Get enzymes in model -0076 enzymesInModel = ismember(protData.uniprot,enzymes); -0077 totalEnz = sum(protData.abundance(enzymesInModel)); -0078 -0079 f = totalEnz/totalProt; -0080 end +0066 % Get MW and abundance (unit does not matter, f is fraction) +0067 [~,idx] = ismember(protData.uniprotIDs,uniprotDB.ID); +0068 protData.MW = uniprotDB.MW(idx); +0069 protData.abundances = protData.level .* protData.MW; +0070 end +0071 +0072 totalProt = sum(protData.abundances); +0073 +0074 % Get enzymes in model +0075 enzymesInModel = ismember(protData.uniprotIDs,enzymes); +0076 totalEnz = sum(protData.abundances(enzymesInModel)); +0077 +0078 f = totalEnz/totalProt; +0079 end
Generated by m2html © 2005
\ No newline at end of file diff --git a/doc/src/geckomat/limit_proteins/constrainEnzConcs.html b/doc/src/geckomat/limit_proteins/constrainEnzConcs.html index 1ee4e2b5..9c3b7d13 100644 --- a/doc/src/geckomat/limit_proteins/constrainEnzConcs.html +++ b/doc/src/geckomat/limit_proteins/constrainEnzConcs.html @@ -103,7 +103,7 @@

SOURCE CODE ^%If non-NaN in model.ec.concs, then constrain by UB 0045 if any(protCons) -0046 model.S(protPoolIdx, usageRxnsIdx(protCons)) = 0; +0046 % model.S(protPoolIdx, usageRxnsIdx(protCons)) = 0; % Since GECKO 3.2.0 0047 model.lb(usageRxnsIdx(protCons)) = -model.ec.concs(protCons); 0048 end 0049 end diff --git a/doc/src/geckomat/limit_proteins/updateProtPool.html b/doc/src/geckomat/limit_proteins/updateProtPool.html index ce88a1a0..e757f1f7 100644 --- a/doc/src/geckomat/limit_proteins/updateProtPool.html +++ b/doc/src/geckomat/limit_proteins/updateProtPool.html @@ -28,8 +28,13 @@

SYNOPSIS ^DESCRIPTION ^

 updateProtPool
-   Updates the protein pool to compensate for measured proteomics data (in
-   model.ec.concs).
+   Obsolete since GECKO 3.2.0, as all (measured and unmeasured) enzymes
+   are drawn from the protein pool. Instead, use setProtPoolSize. See
+   https://github.com/SysBioChalmers/GECKO/issues/375 for explanation.
+
+   Before GECKO 3.2.0: updates the protein pool to compensate for measured
+   proteomics data (in model.ec.concs), as only the unmeasured enzymes
+   draw from the protein pool.
 
  Input:
    ecModel         an ecModel in GECKO 3 format (with ecModel.ec structure)
@@ -39,6 +44,7 @@ 

DESCRIPTION ^CROSS-REFERENCE INFORMATION ^
 <h2><a name=SOURCE CODE ^

0001 function ecModel  = updateProtPool(ecModel, Ptot, modelAdapter)
 0002 % updateProtPool
-0003 %   Updates the protein pool to compensate for measured proteomics data (in
-0004 %   model.ec.concs).
-0005 %
-0006 % Input:
-0007 %   ecModel         an ecModel in GECKO 3 format (with ecModel.ec structure)
-0008 %   Ptot            total protein content in g/gDCW, overwrites the value
-0009 %                   from modelAdapter. For instance, condition-specific
-0010 %                   fluxData.Ptot from loadFluxData can be used. If nothing
-0011 %                   is provided, the modelAdapter value is used.
-0012 %   modelAdapter    a loaded model adapter (Optional, will otherwise use the
-0013 %                   default model adapter).
-0014 % Output:
-0015 %   model           an ecModel where model.ec.concs is populated with
-0016 %                   protein concentrations
-0017 % Usage:
-0018 %   ecModel  = updateProtPool(ecModel, Ptot, modelAdapter)
-0019 
-0020 if nargin < 3 || isempty(modelAdapter)
-0021     modelAdapter = ModelAdapterManager.getDefault();
-0022     if isempty(modelAdapter)
-0023         error('Either send in a modelAdapter or set the default model adapter in the ModelAdapterManager.')
-0024     end
-0025 end
-0026 params = modelAdapter.params;
-0027 
-0028 if nargin < 2 || isempty(Ptot)
-0029     Ptot = params.Ptot;
-0030     disp(['Total protein content used: ' num2str(Ptot) ' [g protein/gDw]'])
-0031 end
-0032 
-0033 % Convert Ptot to mg/gDW if provided in g/gDCW (which is default)
-0034 if Ptot < 1
-0035     Ptot = Ptot * 1000;
-0036 end
-0037 
-0038 Pmeas = sum(ecModel.ec.concs,'omitnan');
-0039 if Pmeas == 0
-0040     error('The model has not yet been constrained with proteomics, as ecModel.ec.concs is empty.')
-0041 end
-0042 
-0043 Pnew = (Ptot - Pmeas) * params.f;
-0044 
-0045 if Pnew > 0
-0046     PoolRxnIdx = strcmp(ecModel.rxns,'prot_pool_exchange');
-0047     ecModel.lb(PoolRxnIdx) = -Pnew*params.sigma;
-0048     sol = solveLP(ecModel);
-0049     if isempty(sol.x)
-0050         error(['Estimating the remaining protein pool by subtracting the ' ...
-0051                'sum of measured enzyme concentrations (in ecModel.ec.concs) ' ...
-0052                'from the total protein pool (Ptot) does not yield a functional ' ...
-0053                'model.'])
-0054     end
-0055 else
-0056     error('The total measured protein mass exceeds the total protein content.')
-0057 end
-0058 end
+0003 % Obsolete since GECKO 3.2.0, as all (measured and unmeasured) enzymes +0004 % are drawn from the protein pool. Instead, use setProtPoolSize. See +0005 % https://github.com/SysBioChalmers/GECKO/issues/375 for explanation. +0006 % +0007 % Before GECKO 3.2.0: updates the protein pool to compensate for measured +0008 % proteomics data (in model.ec.concs), as only the unmeasured enzymes +0009 % draw from the protein pool. +0010 % +0011 % Input: +0012 % ecModel an ecModel in GECKO 3 format (with ecModel.ec structure) +0013 % Ptot total protein content in g/gDCW, overwrites the value +0014 % from modelAdapter. For instance, condition-specific +0015 % fluxData.Ptot from loadFluxData can be used. If nothing +0016 % is provided, the modelAdapter value is used. +0017 % modelAdapter a loaded model adapter (Optional, will otherwise use the +0018 % default model adapter). +0019 % +0020 % Output: +0021 % model an ecModel where model.ec.concs is populated with +0022 % protein concentrations +0023 % Usage: +0024 % ecModel = updateProtPool(ecModel, Ptot, modelAdapter) +0025 +0026 % Do not run from GECKO version 3.2.0 onwards. This can be recognized by +0027 % prot_usage reactions that are constrained by proteomics and still draw +0028 % from the protein pool +0029 protRxns = find(startsWith(ecModel.rxns,'usage_prot_')); +0030 poolMetIdx = find(strcmp(ecModel.mets,'prot_pool')); +0031 % Selected proteins with proteomics constraints +0032 constProtRxns = ~(ecModel.lb(protRxns)==-1000); +0033 % Are any still drawing from prot_pool? This is introduced in GECKO 3.2.0. +0034 if any(full(ecModel.S(poolMetIdx,protRxns(constProtRxns)))) +0035 error(['In the provided ecModel, all protein usage reactions, both with ' ... +0036 'and without concentration constraints, draw from the protein pool. ' ... +0037 'This was introduced with GECKO 3.2.0. Since then, updateProtPool ' ... +0038 'has become obsolete, use setProtPoolSize instead to constrain the ' ... +0039 'total protein pool with condition-specific total protein content. See '... +0040 '<a href="https://github.com/SysBioChalmers/GECKO/issues/375">here</a> ' ... +0041 'for more explanation.']) +0042 end +0043 +0044 if nargin < 3 || isempty(modelAdapter) +0045 modelAdapter = ModelAdapterManager.getDefault(); +0046 if isempty(modelAdapter) +0047 error('Either send in a modelAdapter or set the default model adapter in the ModelAdapterManager.') +0048 end +0049 end +0050 params = modelAdapter.params; +0051 +0052 if nargin < 2 || isempty(Ptot) +0053 Ptot = params.Ptot; +0054 disp(['Total protein content used: ' num2str(Ptot) ' [g protein/gDw]']) +0055 end +0056 +0057 % Convert Ptot to mg/gDW if provided in g/gDCW (which is default) +0058 if Ptot < 1 +0059 Ptot = Ptot * 1000; +0060 end +0061 +0062 Pmeas = sum(ecModel.ec.concs,'omitnan'); +0063 if Pmeas == 0 +0064 error('The model has not yet been populated with proteomics, as ecModel.ec.concs is empty.') +0065 end +0066 +0067 Pnew = (Ptot - Pmeas) * params.f; +0068 +0069 if Pnew > 0 +0070 PoolRxnIdx = strcmp(ecModel.rxns,'prot_pool_exchange'); +0071 ecModel.lb(PoolRxnIdx) = -Pnew*params.sigma; +0072 sol = solveLP(ecModel); +0073 if isempty(sol.x) +0074 error(['Estimating the remaining protein pool by subtracting the ' ... +0075 'sum of measured enzyme concentrations (in ecModel.ec.concs) ' ... +0076 'from the total protein pool (Ptot) does not yield a functional ' ... +0077 'model.']) +0078 end +0079 else +0080 error('The total measured protein mass exceeds the total protein content.') +0081 end +0082 end

Generated by m2html © 2005
\ No newline at end of file diff --git a/doc/src/geckomat/utilities/enzymeUsage.html b/doc/src/geckomat/utilities/enzymeUsage.html index 763f93d6..012d491c 100644 --- a/doc/src/geckomat/utilities/enzymeUsage.html +++ b/doc/src/geckomat/utilities/enzymeUsage.html @@ -30,7 +30,7 @@

DESCRIPTION ^
 enzymeUsage
    Gives enzyme usages based on a provided flux distribution, as obtained
    from a full GECKO model. It can give:
-   1)  absolute usage: the specific enzyme usage in ug/gDCW/h, which can
+   1)  absolute usage: the specific enzyme usage in mg/gDCW, which can
        be given for enzymes with- and without concentration information;
    2)  capacity usage: the ratio of available enzyme that is used, calcuted
        by (absUsage/UB) (note that capacity usage is 0 if an enzyme
@@ -76,7 +76,7 @@ 

SOURCE CODE ^% enzymeUsage 0003 % Gives enzyme usages based on a provided flux distribution, as obtained 0004 % from a full GECKO model. It can give: -0005 % 1) absolute usage: the specific enzyme usage in ug/gDCW/h, which can +0005 % 1) absolute usage: the specific enzyme usage in mg/gDCW, which can 0006 % be given for enzymes with- and without concentration information; 0007 % 2) capacity usage: the ratio of available enzyme that is used, calcuted 0008 % by (absUsage/UB) (note that capacity usage is 0 if an enzyme