From 9613015d0eeb923708d26fe26cbbe40be8060726 Mon Sep 17 00:00:00 2001 From: rxpavan <70786941+rxpavan@users.noreply.github.com> Date: Tue, 31 Oct 2023 23:02:42 +0530 Subject: [PATCH] Created a new variable 'tempModel' The previous code returns an error if the reduction parameter is set to true. This is because the reduced model is used to get the context-specific model (line 138). --- src/dataIntegration/transcriptomics/SWIFTCORE/swiftcore.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dataIntegration/transcriptomics/SWIFTCORE/swiftcore.m b/src/dataIntegration/transcriptomics/SWIFTCORE/swiftcore.m index 00356d3af6..3097e50ff4 100644 --- a/src/dataIntegration/transcriptomics/SWIFTCORE/swiftcore.m +++ b/src/dataIntegration/transcriptomics/SWIFTCORE/swiftcore.m @@ -38,7 +38,7 @@ % % .. Authors: % - Mojtaba Tefagh, Stephen P. Boyd, 2019, Stanford University - + tempModel = model; S = model.S; [m, n] = size(S); rev = ones(n, 1); @@ -135,6 +135,6 @@ end end reconInd = ismember(fullCouplings, reacNum(weights == 0)); - reconstruction = removeRxns(model, model.rxns(~reconInd)); + reconstruction = removeRxns(tempModel, tempModel.rxns(~reconInd)); reconstruction = removeUnusedGenes(reconstruction); -end \ No newline at end of file +end