Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ProtPool Calculation by Including usage_prot_ Reaction Fluxes #372

Merged
merged 12 commits into from
May 8, 2024
2 changes: 2 additions & 0 deletions src/geckomat/utilities/enzymeUsage.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
% absUsage vector of absolute enzyme usages
% UB vector of enzyme exchange reaction upper bounds
% protID string array of matching protein IDs
% fluxes vector of fluxes, copy of input fluxes
%
% Usage:
% usageData = enzymeUsage(ecModel,fluxes,zero)
Expand All @@ -42,6 +43,7 @@
usageData.LB = ecModel.lb(rxnIdx);
usageData.absUsage = abs(fluxes(rxnIdx));
usageData.capUsage = abs(usageData.absUsage./usageData.LB);
usageData.fluxes = fluxes;

if ~zero
nonzero = usageData.absUsage<0;
Expand Down
23 changes: 19 additions & 4 deletions src/geckomat/utilities/reportEnzymeUsage.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
function usageReport = topEnzymeUsage(ecModel, usageData, highCapUsage, topAbsUsage)
function usageReport = reportEnzymeUsage(ecModel, usageData, highCapUsage, topAbsUsage)
% reportEnzymeUsage
% Summarizes the results from enzymeUsage.
%
% Input:
% ecModel a GECKO3 ecModel
% usageData output from reportEnzymeUsage
% usageData output from enzymeUsage
% highCapUsage minimum ratio of enzyme capacity usage to be considered
% as high usage (Optional, default 0.9, refering to a
% minimum of 90% capacity usage)
Expand Down Expand Up @@ -61,7 +61,20 @@
topUsage.rxnNames = {};
topUsage.grRules = {};

protPool = -ecModel.lb(strcmp(ecModel.rxns,'prot_pool_exchange'))/100;
% Calculate the protein pool flux from the 'prot_pool_exchange' reaction
protPoolExchangeFlux = -ecModel.lb(strcmp(ecModel.rxns,'prot_pool_exchange'));

fluxValues = usageData.fluxes;

% Sum fluxes for all 'usage_prot_' reactions, excluding the 'usage_prot_standard'
usageProtIndices = startsWith(ecModel.rxns, 'usage_prot_') & ...
~contains(ecModel.rxns, 'standard');

% Sum the absolute values of the usage fluxes
totalUsageProtFlux = sum(abs(fluxValues(usageProtIndices)));

% Define the new protein pool as the sum of prot_pool_exchange flux and total usage_prot fluxes
protPool = (protPoolExchangeFlux + totalUsageProtFlux)/100;

for i=1:numel(topEnzyme)
[rxns, kcat, idx, rxnNames, grRules] = getReactionsFromEnzyme(ecModel,topEnzyme{i});
Expand All @@ -76,5 +89,7 @@
topUsage.rxnNames(end+1:end+rxnNumber,1) = rxnNames;
topUsage.grRules(end+1:end+rxnNumber,1) = grRules;
end
usageReport.topAbsUsage = struct2table(topUsage);
usageReport.topAbsUsage = struct2table(topUsage);
usageReport.totalProtPool = protPoolExchangeFlux;
usageReport.totalUsageFlux = totalUsageProtFlux;
end
Loading