Constrain enzymes with proteomics#
Load the absolute proteomics data and the exchange fluxes of one experiment, bound the usage of each measured enzyme by its concentration, set the protein pool for the experiment, and constrain the exchange reactions and the growth rate. At the end, the ecModel describes the experiment, and solving it shows whether the ecModel reaches the measured growth rate. Proteomics data require a full ecModel, which has a usage reaction per enzyme; a light ecModel has none (see Choose the ecModel structure).
Place in the workflow
The diagram orders the functions of this page within the workflow. Boxes with a dashed outline are optional steps, a dotted arrow is an optional path, and a diamond is a choice. Rounded boxes with a dotted outline are the context, other pages or the model to start from, and a click on one opens its page.
---
config:
flowchart:
useMaxWidth: false
---
flowchart TB
classDef opt stroke-dasharray: 5 4
classDef ctx fill:transparent,stroke-dasharray: 2 3
PV(["Previous: a functional full ecModel"]):::ctx
LD["loadProtData<br/>fillEnzConcs"]
LV["levelComplexConcs"]:::opt
CE["constrainEnzConcs"]
IZ["getIsozymeCoverage<br/>zeroUnmeasuredIsozymes"]:::opt
FD["loadFluxData<br/>Ptot and fluxes of the condition"]
PP["calculateFfactor (optional)<br/>setProtPoolSize"]
FL["constrainFluxData<br/>exchange fluxes and growth rate"]
GR{"Growth reaches the measured growth rate?"}
PV --> LD --> LV --> CE --> IZ --> FD --> PP --> FL --> GR
LD --> CE
CE --> FD
NX(["Next: Relax proteomics constraints"]):::ctx
NA(["Next: Analyse an ecModel"]):::ctx
GR -->|no| NX
GR -->|yes| NA
click PV href "first-ecmodel.html"
click NX href "relaxing-proteomics.html"
click NA href "analysis.html"
---
config:
flowchart:
useMaxWidth: false
---
flowchart TB
classDef opt stroke-dasharray: 5 4
classDef ctx fill:transparent,stroke-dasharray: 2 3
PV(["Previous: a functional full ecModel"]):::ctx
LD["load_prot_data<br/>fill_enz_concs"]
LV["level_complex_concs"]:::opt
CE["constrain_enz_concs"]
IZ["get_isozyme_coverage<br/>zero_unmeasured_isozymes"]:::opt
FD["load_flux_data<br/>Ptot and fluxes of the condition"]
PP["calculate_f_factor (optional)<br/>set_prot_pool_size"]
FL["apply_flux_data_constraints<br/>exchange fluxes and growth rate"]
GR{"Growth reaches the measured growth rate?"}
PV --> LD --> LV --> CE --> IZ --> FD --> PP --> FL --> GR
LD --> CE
CE --> FD
NX(["Next: Relax proteomics constraints"]):::ctx
NA(["Next: Analyse an ecModel"]):::ctx
GR -->|no| NX
GR -->|yes| NA
click PV href "first-ecmodel.html"
click NX href "relaxing-proteomics.html"
click NA href "analysis.html"
Functions#
MATLAB |
Python |
Note |
|---|---|---|
reads |
||
writes the concentrations of one condition to |
||
gives the subunits of each complex one abundance |
||
sets the concentrations as upper bounds of the |
||
|
|
lists the reactions with a measured and an unmeasured isozyme |
|
|
lowers the usage bound of the unmeasured isozymes of these reactions |
calculates f from the proteomics data |
||
sets the upper bound of |
||
reads |
||
sets the bounds of the growth rate and the exchange reactions of one condition |
Setup#
A full ecModel with kcats and a protein pool (see Build an ecModel), in the variable ecModel (MATLAB) or ec_model (Python), and the files data/proteomics.tsv and data/fluxData.tsv of the project. In MATLAB, the model adapter of the project is the default adapter, and params = ModelAdapterManager.getDefault().getParameters(); holds its parameters; in Python, params = ec_model.adapter.params holds them. The objective is the biomass reaction, maximised: ecModel = setParam(ecModel, 'obj', params.bioRxn, 1); in MATLAB, and ec_model.objective = params.bio_rxn with ec_model.objective_direction = "max" in Python (see Basic model operations). The examples assume a proteomics.tsv with two conditions of three replicates each, and select the first condition in both files.
Choose the options#
Choice |
Options |
Criteria |
|---|---|---|
Complexes |
level with |
Level when the subunits of a complex are measured at different amounts. |
Unmeasured isozymes |
no bound (default), a bound at the detection limit, or a bound of 0 |
A protein that is missing from the data can be absent or below the detection limit. |
f |
the value in |
f from the same proteomics data describes the same proteome as the concentrations. |
Exchange fluxes |
|
A percentage forces a flux through each reaction. |
Growth rate |
|
|
A complex that is bounded subunit by subunit carries no more flux than its least abundant subunit allows. Levelling uses the subunit copies in ec.rxnEnzMat, which come from the complex data (applyComplexData); without complex data, every subunit counts as one copy.
An unmeasured isozyme without a bound can carry the flux of a measured one. A bound of 0 treats the protein as absent; a bound at the detection limit treats it as present at a low amount.
The f in model_adapter.toml is often calculated from PaxDB data, or is the default 0.5 (see Set the protein pool).
'loose' bounds each exchange reaction between 0 and the measured value. With a percentage, an error in the fluxes or in the enzyme data can make the ecModel infeasible. 'max' sets the measured growth rate as upper bound and 'min' as lower bound (see Analyse an ecModel for the objectives).
Start with 'loose' and 'max'. The ecModel then has a solution also when the proteomics limit growth, which flexibilizeEnzConcs and relaxProteomicsGreedy need (see Relax proteomics constraints). With 'min', an ecModel that cannot reach the growth rate is infeasible.
Prepare the data files#
data/proteomics.tsv is tab-delimited with one header row. The first column holds the UniProt identifiers, and every following column holds one replicate, in mg/gDCW. The replicates of the first condition come first, then those of the second condition, and so on. The header must have one column more than the total number of replicates; otherwise loadProtData raises the error loadProtData:replicateMismatch (Python: ValueError). A cell with NA, na, NaN, #VALUE! or no value is not measured, and a row without an identifier is removed. Relative proteomics data cannot be used: a concentration in another unit gives wrong bounds and no error.
data/fluxData.tsv is tab-delimited with one header row and one row per condition. The columns are the condition name, the total protein content Ptot (g/gDCW), the growth rate (1/h), and then one column per exchange reaction, in mmol/gDCW/h, negative for uptake and positive for excretion. The header of an exchange column has the form <metabolite> (<reaction id>). Optional columns evotuneRMSEweight and source can be at any position. A line with a different number of cells than the header raises an error. The example shows 7 of the 11 columns (the first six and the last one) of fluxData.tsv in the full_ecModel tutorial of GECKO, which uses yeast-GEM; r_1714 is the glucose exchange of yeast-GEM:
Condition Ptot grRate glucose (r_1714) CO2 (r_1672) oxygen (r_1992) ethanol (r_1761)
Std 0.4228 0.1 -1.1 2.7 -2.5 1.00E-05
The proteomics.tsv of the same tutorial has one condition with three replicates, so it is loaded with loadProtData(3); the [3, 3] of the examples below raises loadProtData:replicateMismatch on it. See Files in the data folder for the other files of the project.
Load the proteomics data#
loadProtData takes the number of replicates of each condition, in the order of the columns. It returns one column per condition. With the default settings, it filters each condition in this order:
MATLAB |
Python |
Default |
Effect |
|---|---|---|---|
|
|
2/3 |
a protein measured in fewer than this fraction of the replicates is removed; a vector gives one value per condition |
|
|
1 |
a protein with a higher relative standard deviation over the replicates is removed |
|
|
1 |
the concentration is the mean of the replicates plus this number of standard deviations |
|
|
0 |
a protein with a lower concentration is removed |
|
|
5 |
this percentage of the lowest concentrations is removed |
|
|
true |
false skips the filters above and returns the mean of the replicates |
|
|
false |
whether a 0 is a measurement |
A protein that is removed is NaN for that condition, and its enzyme draws from the protein pool without a bound of its own. By default a 0 is read as not measured, because proteomics reports a protein below the detection limit as 0 or as missing. With zerosAsMeasured true, a 0 counts as a measured replicate, and a protein measured as 0 in every replicate keeps the concentration 0. constrainEnzConcs then sets the usage bound of its enzyme to 0, which removes every flux through the enzyme. Set it to true when a 0 means that the protein is absent, for example in a deletion strain.
fillEnzConcs writes the concentrations of one condition to ec.concs and sets every other enzyme to NaN. The condition index starts at 1 in MATLAB and at 0 in Python.
% two conditions with three replicates each
protData = loadProtData([3, 3]);
ecModel = fillEnzConcs(ecModel, protData, 'dataCol', 1);
from geckopy import fill_enz_concs, load_prot_data
params = ec_model.adapter.params
# two conditions with three replicates each
prot_data = load_prot_data(params.path / "data" / "proteomics.tsv", [3, 3])
fill_enz_concs(ec_model, prot_data, data_col=0)
Level the concentrations of complexes#
levelComplexConcs runs after fillEnzConcs and before constrainEnzConcs. It groups the enzymes of the reactions with several subunits into complexes (getComplexFamilies), converts the concentrations to molar amounts with ec.mw, and writes the median over the measured subunits, per copy, back to every subunit of the complex, multiplied by its copies. The option statistic selects 'median' or 'mean'. The option families takes the output of getComplexFamilies (Python: complex_families), for a grouping with other values of minShared and minOverlap (Python: min_shared, min_overlap). With fillMissing true (default), an unmeasured subunit of a complex receives the concentration of the complex. A subunit in two complexes belongs to the complex whose enzyme sets catalyse more reactions. A subunit in three or more complexes, in two complexes of equal weight, or that also catalyses a reaction alone keeps its measured value, and a subunit measured as 0 stays 0.
[ecModel, levelResult] = levelComplexConcs(ecModel);
levelResult has the fields adjusted (measured subunits that received the concentration of the complex), added (unmeasured subunits that received it), shared (subunits kept as measured) and skipped (complexes without a measured subunit).
from geckopy import level_complex_concs
level_result = level_complex_concs(ec_model)
level_complex_concs changes ec_model.ec.concs and returns a LevelComplexResult with the attributes adjusted, added, shared and skipped.
An ecModel with levelled complexes is relaxed per complex (see Relax proteomics constraints).
Apply the concentrations as bounds#
constrainEnzConcs sets the upper bound of the usage_prot_<id> reaction of each enzyme with a concentration to that concentration, and the upper bound of each enzyme with NaN to 1000. Every usage reaction draws from the protein pool, also when it has a measured bound.
ecModel = constrainEnzConcs(ecModel);
from geckopy import constrain_enz_concs
constrain_enz_concs(ec_model)
The option removeConstraints (Python: remove_constraints) resets all usage bounds to 1000 and leaves ec.concs unchanged. The option restrictTo (Python: restrict_to) takes a list of UniProt identifiers; the usage reactions of the other enzymes keep their bounds.
Limit unmeasured isozymes#
A reaction can have a measured isozyme and an unmeasured one. The unmeasured isozyme then draws from the protein pool without a bound, and the ecModel can use it in place of the measured one. getIsozymeCoverage lists these reactions and does not change the ecModel. zeroUnmeasuredIsozymes runs after constrainEnzConcs, calls getIsozymeCoverage, and lowers the usage bound of the enzymes of the unmeasured isozymes. The method 'zero' (default) sets the bound to 0; 'detectionLimit' (Python: "detection_limit") sets it to limit in mg/gDCW, by default the smallest concentration above 0 in ec.concs. An enzyme that also catalyses a reaction without a measured isozyme is not changed. ec.concs is not changed, and no other GECKO function calls zeroUnmeasuredIsozymes.
[coverage, zeroable] = getIsozymeCoverage(ecModel);
[ecModel, changed] = zeroUnmeasuredIsozymes(ecModel, 'method', 'detectionLimit');
from geckopy import get_isozyme_coverage, zero_unmeasured_isozymes
coverage, zeroable = get_isozyme_coverage(ec_model)
changed = zero_unmeasured_isozymes(ec_model, method="detection_limit")
coverage has one row per reaction, with its measured and unmeasured enzymes. changed has one row per enzyme with its new upper bound.
Set the protein pool for the condition#
The upper bound of the protein pool exchange is \(P_{tot} \cdot f \cdot \sigma \cdot 1000\) mg/gDCW (see Set the protein pool). Use the Ptot of the condition from fluxData.tsv. calculateFfactor divides the summed concentrations of the enzymes of the ecModel by the summed concentrations of all proteins in the data. It uses the proteins that loadProtData kept, so the filters change f. To calculate f over all measured proteins of one condition, load the data without filters and select the column of the condition. With several columns, calculateFfactor averages each protein over the columns in which it is measured. Sigma is read from model_adapter.toml when it is not given.
fluxData = loadFluxData();
protAll = loadProtData([3, 3], 'filterData', false);
protAll.abundances = protAll.abundances(:, 1);
f = calculateFfactor(ecModel, 'protData', protAll);
ecModel = setProtPoolSize(ecModel, 'Ptot', fluxData.Ptot(1), 'f', f);
from geckopy import (
ProtData, calculate_f_factor, load_flux_data, set_prot_pool_size,
)
flux_data = load_flux_data(params.path / "data" / "fluxData.tsv")
prot_all = load_prot_data(
params.path / "data" / "proteomics.tsv", [3, 3], filter_data=False,
)
prot_cond = ProtData(
uniprot_ids=prot_all.uniprot_ids, abundances=prot_all.abundances[:, [0]],
)
f = calculate_f_factor(ec_model, prot_cond)
set_prot_pool_size(ec_model, p_tot=float(flux_data.p_tot[0]), f=f)
Constrain the exchange fluxes and the growth rate#
constrainFluxData sets the bounds of the carbon source uptake reaction of model_adapter.toml (c_source) to 0, then sets the growth rate and the exchange fluxes of the condition. The condition is an index (from 1 in MATLAB, from 0 in Python) or a name from the first column of fluxData.tsv. The proteomics column and the flux condition are selected separately; select the same experiment in both.
With
'loose', a negative flux becomes the lower bound with an upper bound of 0, and a positive flux becomes the upper bound with a lower bound of 0. A flux of 0 blocks the reaction.With a percentage
p, the bounds are the measured value × (1 ± p/200); 10 gives 95 % and 105 % of the measured value.A flux of -1000 allows any uptake and 1000 allows any excretion, with both options.
An empty cell leaves the bounds of the reaction unchanged.
An exchange reaction that is not in the ecModel raises an error.
ecModel = constrainFluxData(ecModel, 'fluxData', fluxData, 'condition', 1, ...
'maxMinGrowth', 'max', 'looseStrictFlux', 'loose');
sol = solveLP(ecModel);
fprintf('Growth rate: %g /h, measured: %g /h\n', sol.f, fluxData.grRate(1))
from geckopy import apply_flux_data_constraints
apply_flux_data_constraints(
ec_model, flux_data, condition=0,
max_min_growth="max", loose_strict_flux="loose",
)
growth = ec_model.slim_optimize()
print(f"Growth rate: {growth:g} /h, measured: {flux_data.gr_rate[0]:g} /h")
With 'max', the growth rate cannot exceed the measured one. A growth rate below it means that the enzyme concentrations, the kcats, the protein pool or the exchange fluxes limit growth. Relax proteomics constraints raises the limiting enzyme bounds and shows how to find which of these limits growth.
Troubleshooting#
Problem |
Possible reason |
Solution |
|---|---|---|
|
the replicate numbers do not add up to the number of replicate columns of |
Correct |
|
an enzyme of the ecModel has a negative concentration in the selected condition |
Correct |
|
|
Use a column index from 0 to the number of conditions minus 1 |
|
the identifiers in |
Use UniProt identifiers in |
A protein with a replicate of 0 is missing or has a higher mean than expected |
a 0 is read as not measured |
Set |
The ecModel is infeasible or grows much slower after |
enzymes with a bound of 0: measured zeros, or isozymes set to 0 |
Load with |
A complex is still limited by one subunit after levelling |
the subunit is in three or more complexes, in two complexes of equal weight, or catalyses a reaction alone, and keeps its measured value |
Check the field |
|
a reaction identifier in the header of |
Correct the header to |
|
the ecModel is a light ecModel, or |
Use a full ecModel; correct the proteomics data |
|
|
Use |
See also#
Relax proteomics constraints, for an ecModel that does not reach the measured growth rate.
Set the protein pool, for Ptot, f and sigma.
Analyse an ecModel, for the objectives that go with
'max'and'min'.