


updateProtPool
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)
Ptot total protein content in g/gDCW, overwrites the value
from modelAdapter. For instance, condition-specific
fluxData.Ptot from loadFluxData can be used. If nothing
is provided, the modelAdapter value is used.
modelAdapter a loaded model adapter (Optional, will otherwise use the
default model adapter).
Output:
model an ecModel where model.ec.concs is populated with
protein concentrations
Usage:
ecModel = updateProtPool(ecModel, Ptot, modelAdapter)

0001 function ecModel = updateProtPool(ecModel, Ptot, modelAdapter) 0002 % updateProtPool 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