Skip to content

Commit

Permalink
Merge pull request #692 from SysBioChalmers/fix/refineAnimalGemPipeline
Browse files Browse the repository at this point in the history
fix: refine animal GEM updating pipeline
  • Loading branch information
haowang-bioinfo authored Aug 21, 2023
2 parents 0745ddf + bb4cc9f commit 02055c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion code/addMetabolicNetwork.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 6 additions & 3 deletions code/updateAnimalGEM.m
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 02055c9

Please sign in to comment.