From 94efe9e3e59fea18660eb953c4512adbaa4968ef Mon Sep 17 00:00:00 2001 From: Eduard Kerkhoven Date: Mon, 27 May 2024 11:47:37 +0200 Subject: [PATCH] Revert "Merge pull request #372 from HossFir/update-reportEnzymeUsage" This reverts commit cc8e449c8b7488ea3eeaa820831b1d41fd8f27bc, reversing changes made to 883b40db1d8cfbc76f10de076445ea6a3d9b2d7a. --- src/geckomat/utilities/enzymeUsage.m | 2 -- src/geckomat/utilities/reportEnzymeUsage.m | 19 ++----------------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/src/geckomat/utilities/enzymeUsage.m b/src/geckomat/utilities/enzymeUsage.m index f9a0faca..5d80bf19 100644 --- a/src/geckomat/utilities/enzymeUsage.m +++ b/src/geckomat/utilities/enzymeUsage.m @@ -26,7 +26,6 @@ % 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) @@ -43,7 +42,6 @@ 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; diff --git a/src/geckomat/utilities/reportEnzymeUsage.m b/src/geckomat/utilities/reportEnzymeUsage.m index 5d793990..4bb90391 100644 --- a/src/geckomat/utilities/reportEnzymeUsage.m +++ b/src/geckomat/utilities/reportEnzymeUsage.m @@ -61,20 +61,7 @@ topUsage.rxnNames = {}; topUsage.grRules = {}; -% 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; +protPool = -ecModel.lb(strcmp(ecModel.rxns,'prot_pool_exchange'))/100; for i=1:numel(topEnzyme) [rxns, kcat, idx, rxnNames, grRules] = getReactionsFromEnzyme(ecModel,topEnzyme{i}); @@ -89,7 +76,5 @@ topUsage.rxnNames(end+1:end+rxnNumber,1) = rxnNames; topUsage.grRules(end+1:end+rxnNumber,1) = grRules; end -usageReport.topAbsUsage = struct2table(topUsage); -usageReport.totalProtPool = protPoolExchangeFlux; -usageReport.totalUsageFlux = totalUsageProtFlux; +usageReport.topAbsUsage = struct2table(topUsage); end