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; diff --git a/code/updateAnimalGEM.m b/code/updateAnimalGEM.m index f10633e3..5ce90e94 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_components" +% 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,8 @@ %% Gap-filling -[animalGEM, gapfillNetwork]=gapfill4EssentialTasks(animalGEM,ihuman); +[animalGEM, gapfillNetwork]=gapfill4EssentialTasks(animalGEM,ihuman,resetBiomass); +animalGEM.b = animalGEM.b(:,1); % ensure b field in single column %% post-gapfilling procedures