From 82b322d117c5b129f3b771ef8529d45e0f18db8e Mon Sep 17 00:00:00 2001 From: Hao Wang Date: Wed, 16 Aug 2023 18:37:09 +0200 Subject: [PATCH 1/4] fix: sync geneShortNames field with genes field - These gene names are now padded with empty elements, this is fine but not a decent way --- code/addMetabolicNetwork.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/addMetabolicNetwork.m b/code/addMetabolicNetwork.m index f5551bfa..2c2ed107 100644 --- a/code/addMetabolicNetwork.m +++ b/code/addMetabolicNetwork.m @@ -144,8 +144,11 @@ newGenes = setdiff(newGenes, newModel.genes); end -% append new genes to list of model genes +% append new genes and their names to model newModel.genes = [newModel.genes; newGenes]; +emptyGeneNames = newGenes; +emptyGeneNames(:) = {''}; +newModel.geneShortNames = [newModel.geneShortNames; emptyGeneNames]; % add new columns to rxnGeneMat will be updated after the new reactions are added below. newModel.rxnGeneMat(:, end+1:end+numel(newGenes)) = 0; From 880813a6be91f1098d9966eecde883e245f85ac4 Mon Sep 17 00:00:00 2001 From: Hao Wang Date: Wed, 16 Aug 2023 18:53:18 +0200 Subject: [PATCH 2/4] feat: enable the option to reset biomass equation or not - Previously, the only option is to set biomass to MAR00021, now the option of reusing MAR13082 from HumanGEM is provided --- code/updateAnimalGEM.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/updateAnimalGEM.m b/code/updateAnimalGEM.m index f10633e3..4833b8f0 100644 --- a/code/updateAnimalGEM.m +++ b/code/updateAnimalGEM.m @@ -1,4 +1,4 @@ -function [animalGEM, speciesSpecNetwork, gapfillNetwork]=updateAnimalGEM(orthologPairs,rxnsToAdd,metsToAdd,modelId) +function [animalGEM, speciesSpecNetwork, gapfillNetwork]=updateAnimalGEM(orthologPairs,rxnsToAdd,metsToAdd,modelId,resetBiomass) % updateAnimalGEM % Generate a model by using the Human-GEM as a template and taking into % account species-specific pathways/reactions @@ -11,7 +11,9 @@ % rxnsToAdd the structure of species-specific reactions % metsToAdd the structure of species-specific metabolites % modelId model id -% +% resetBiomass reset biomass objective function to "biomass_componenets" +% which is constituted by generic componenets that +% suppose to occur in a eukaryotic cell (opt, default TRUE) % % Output: % animalGEM an updated animal GEM @@ -81,7 +83,7 @@ %% Gap-filling -[animalGEM, gapfillNetwork]=gapfill4EssentialTasks(animalGEM,ihuman); +[animalGEM, gapfillNetwork]=gapfill4EssentialTasks(animalGEM,ihuman,resetBiomass); %% post-gapfilling procedures From 80e1a18284a2ff79863e2f65c246e64db9553ced Mon Sep 17 00:00:00 2001 From: Hao Wang Date: Thu, 17 Aug 2023 11:59:40 +0200 Subject: [PATCH 3/4] Update code/updateAnimalGEM.m Co-authored-by: Mihail Anton --- code/updateAnimalGEM.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/updateAnimalGEM.m b/code/updateAnimalGEM.m index 4833b8f0..def969a0 100644 --- a/code/updateAnimalGEM.m +++ b/code/updateAnimalGEM.m @@ -11,7 +11,7 @@ % rxnsToAdd the structure of species-specific reactions % metsToAdd the structure of species-specific metabolites % modelId model id -% resetBiomass reset biomass objective function to "biomass_componenets" +% resetBiomass reset biomass objective function to "biomass_components" % which is constituted by generic componenets that % suppose to occur in a eukaryotic cell (opt, default TRUE) % From bb4cc9fb81d3bbae249468b94734c2122030b4fa Mon Sep 17 00:00:00 2001 From: Hao Wang Date: Fri, 18 Aug 2023 09:22:58 +0200 Subject: [PATCH 4/4] fix: ensure b field in single column - This is to resolve recurring issue reported in #511 --- code/updateAnimalGEM.m | 1 + 1 file changed, 1 insertion(+) diff --git a/code/updateAnimalGEM.m b/code/updateAnimalGEM.m index def969a0..5ce90e94 100644 --- a/code/updateAnimalGEM.m +++ b/code/updateAnimalGEM.m @@ -84,6 +84,7 @@ %% Gap-filling [animalGEM, gapfillNetwork]=gapfill4EssentialTasks(animalGEM,ihuman,resetBiomass); +animalGEM.b = animalGEM.b(:,1); % ensure b field in single column %% post-gapfilling procedures