From 14f682522fb16b5b60e5d6f259f2b9a76fd62674 Mon Sep 17 00:00:00 2001 From: ae-tafur Date: Wed, 17 Aug 2022 15:05:17 +0200 Subject: [PATCH 1/4] ATP synthase (m) complex curation --- code/modelCuration/ATP_complex_curation.m | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 code/modelCuration/ATP_complex_curation.m diff --git a/code/modelCuration/ATP_complex_curation.m b/code/modelCuration/ATP_complex_curation.m new file mode 100644 index 00000000..a482c05d --- /dev/null +++ b/code/modelCuration/ATP_complex_curation.m @@ -0,0 +1,20 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% complexAnnotation +% Correct complex annotation for ATP_complex_mitochondrial +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Load model +cd .. +model = loadYeastModel + +% Change gene rules for ATP synthase mitochondrial (r_0226) +newModel = changeGeneAssoc(model, 'r_0226', ['Q0080 and Q0085 and Q0130 and ' ... + 'YBL099W and YBR039W and YDL004W and YDR298C and YDR377W and YJR121W ' ... + 'and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W and ' ... + 'YDR322C-A and YPR020W and YOL077W-A']); + +% Delete unused genes (if any) +newModel = deleteUnusedGenes(newModel, 2); + +% Save model: +saveYeastModel(newModel) From fc3512fd850b925ebbde41525d31f3ccba544113 Mon Sep 17 00:00:00 2001 From: ae-tafur Date: Wed, 17 Aug 2022 15:06:45 +0200 Subject: [PATCH 2/4] results --- README.md | 2 +- code/modelCuration/ATP_complex_curation.m | 2 +- model/dependencies.txt | 6 +- model/yeast-GEM.txt | 2 +- model/yeast-GEM.xml | 80 ++++++----------------- model/yeast-GEM.yml | 15 ++--- 6 files changed, 29 insertions(+), 78 deletions(-) diff --git a/README.md b/README.md index 6acb1d3f..6da026a9 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ This repository contains the current consensus genome-scale metabolic model of _ | Taxonomy | Latest update | Version | Reactions | Metabolites | Genes | |:-------|:--------------|:------|:------|:----------|:-----| -| _Saccharomyces cerevisiae_ | 15-Jun-2022 | develop | 4063 | 2744 | 1163 | +| _Saccharomyces cerevisiae_ | 17-Aug-2022 | develop | 4063 | 2744 | 1160 | # Installation & usage diff --git a/code/modelCuration/ATP_complex_curation.m b/code/modelCuration/ATP_complex_curation.m index a482c05d..7136244f 100644 --- a/code/modelCuration/ATP_complex_curation.m +++ b/code/modelCuration/ATP_complex_curation.m @@ -5,7 +5,7 @@ % Load model cd .. -model = loadYeastModel +model = loadYeastModel; % Change gene rules for ATP synthase mitochondrial (r_0226) newModel = changeGeneAssoc(model, 'r_0226', ['Q0080 and Q0085 and Q0130 and ' ... diff --git a/model/dependencies.txt b/model/dependencies.txt index 11e5eba1..667a8e66 100644 --- a/model/dependencies.txt +++ b/model/dependencies.txt @@ -1,4 +1,4 @@ -MATLAB 9.10.0.1851785 (R2021a) Update 6 +MATLAB 9.12.0.2009381 (R2022a) Update 4 libSBML 5.19.0 -RAVEN_toolbox commit cef4a35 -COBRA_toolbox unknown +RAVEN_toolbox 2.7.5 +COBRA_toolbox 3.33 diff --git a/model/yeast-GEM.txt b/model/yeast-GEM.txt index 259abdad..ff5b5a95 100755 --- a/model/yeast-GEM.txt +++ b/model/yeast-GEM.txt @@ -201,7 +201,7 @@ r_0222 ADP[c] + ATP[c] + H+[c] => P(1),P(4)-bis(5'-adenosyl) tetraphosphate[c] + r_0223 ADP[c] + GTP[c] + H+[c] => P1-(5'-adenosyl),P4-(5'-guanosyl) tetraphosphate[c] + phosphate[c] YCL050C 0.00 1000.00 0.00 r_0224 GDP[c] + GTP[c] + H+[c] => P(1),P(4)-bis(5'-guanosyl) tetraphosphate[c] + phosphate[c] YCL050C 0.00 1000.00 0.00 r_0225 ATP[c] + PRPP[c] => 5-phosphoribosyl-ATP[c] + diphosphate[c] YER055C 0.00 1000.00 0.00 -r_0226 ADP[m] + 3 H+[c] + phosphate[m] => ATP[m] + 2 H+[m] + H2O[m] (Q0080 and Q0085 and Q0130 and YBL099W and YBR039W and YDL004W and YDR298C and YDR322C-A and YDR377W and YJR121W and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W) or (Q0080 and Q0085 and Q0130 and YBL099W and YBR039W and YDL004W and YDR298C and YDR377W and YJR121W and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W and YPR020W) or (Q0080 and Q0085 and Q0130 and YBL099W and YBR039W and YDL004W and YDR298C and YDR322C-A and YDR377W and YJR121W and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W and YJL180C and YLR393W and YNL315C and YOL077W-A and YCL005W-A) 0.00 1000.00 0.00 +r_0226 ADP[m] + 3 H+[c] + phosphate[m] => ATP[m] + 2 H+[m] + H2O[m] Q0080 and Q0085 and Q0130 and YBL099W and YBR039W and YDL004W and YDR298C and YDR377W and YJR121W and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W and YDR322C-A and YPR020W and YOL077W-A 0.00 1000.00 0.00 r_0227 ATP[c] + H2O[c] => ADP[c] + H+[e] + phosphate[c] (YCR024C-A and YEL017C-A and YGL008C) or (YCR024C-A and YEL017C-A and YPL036W) or YER005W 0.00 1000.00 0.00 r_0228 GDP-alpha-D-mannose[c] + N,N'-diacetylchitobiosyldiphosphodolichol[c] => beta-D-mannosyldiacetylchitobiosyldiphosphodolichol[c] + GDP[c] + H+[c] YBR110W 0.00 1000.00 0.00 r_0229 dethiobiotin[c] + polysulphur[c] <=> biotin[c] + 2 H+[c] YGR286C -1000.00 1000.00 0.00 diff --git a/model/yeast-GEM.xml b/model/yeast-GEM.xml index 45be28ed..19eb7faf 100644 --- a/model/yeast-GEM.xml +++ b/model/yeast-GEM.xml @@ -48323,64 +48323,25 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -166683,7 +166644,6 @@ - @@ -166933,7 +166893,6 @@ - @@ -167080,7 +167039,6 @@ - diff --git a/model/yeast-GEM.yml b/model/yeast-GEM.yml index 021283b0..d82fe64c 100755 --- a/model/yeast-GEM.yml +++ b/model/yeast-GEM.yml @@ -3,7 +3,7 @@ - metaData: id: "yeastGEM_develop" name: "The Consensus Genome-Scale Metabolic Model of Yeast" - date: "2022-06-15" + date: "2022-08-17" givenName: "Eduard" familyName: "Kerkhoven" email: "eduardk@chalmers.se" @@ -34954,7 +34954,7 @@ - s_1326: -1 - lower_bound: 0 - upper_bound: 1000 - - gene_reaction_rule: "(Q0080 and Q0085 and Q0130 and YBL099W and YBR039W and YDL004W and YDR298C and YDR322C-A and YDR377W and YJR121W and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W) or (Q0080 and Q0085 and Q0130 and YBL099W and YBR039W and YDL004W and YDR298C and YDR377W and YJR121W and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W and YPR020W) or (Q0080 and Q0085 and Q0130 and YBL099W and YBR039W and YDL004W and YDR298C and YDR322C-A and YDR377W and YJR121W and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W and YJL180C and YLR393W and YNL315C and YOL077W-A and YCL005W-A)" + - gene_reaction_rule: "Q0080 and Q0085 and Q0130 and YBL099W and YBR039W and YDL004W and YDR298C and YDR377W and YJR121W and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W and YDR322C-A and YPR020W and YOL077W-A" - eccodes: "3.6.3.14" - subsystem: - "Oxidative phosphorylation" @@ -108261,6 +108261,7 @@ - name: "YBR241C" - !!omap - id: "YBR242W" + - name: "YBR242W" - annotation: !!omap - kegg.genes: "sce:YBR242W" - ncbigene: "852544" @@ -109827,9 +109828,6 @@ - !!omap - id: "YJL168C" - name: "SET2" - - !!omap - - id: "YJL180C" - - name: "ATP12" - !!omap - id: "YJL196C" - name: "ELO1" @@ -110451,9 +110449,6 @@ - !!omap - id: "YLR386W" - name: "VAC14" - - !!omap - - id: "YLR393W" - - name: "ATP10" - !!omap - id: "YLR395C" - name: "COX8" @@ -110850,9 +110845,6 @@ - !!omap - id: "YNL292W" - name: "PUS4" - - !!omap - - id: "YNL315C" - - name: "ATP11" - !!omap - id: "YNL316C" - name: "PHA2" @@ -111516,6 +111508,7 @@ - name: "MET16" - !!omap - id: "YPR170W-B" + - name: "YPR170W__45__B" - annotation: !!omap - kegg.genes: "sce:YPR170W-B" - ncbigene: "5848745" From e5f02acdced50cde19c7282b232aae73838e31a0 Mon Sep 17 00:00:00 2001 From: edkerk Date: Mon, 5 Sep 2022 19:01:22 +0200 Subject: [PATCH 3/4] refactor: standardize curation script --- README.md | 2 +- code/modelCuration/ATP_complex_curation.m | 20 ----------- code/modelCuration/TEMPLATEcuration.m | 9 ++--- code/modelCuration/v8_6_1.m | 42 +++++++++++++++++++++++ model/dependencies.txt | 6 ++-- model/yeast-GEM.xml | 6 ++++ model/yeast-GEM.yml | 2 +- 7 files changed, 58 insertions(+), 29 deletions(-) delete mode 100644 code/modelCuration/ATP_complex_curation.m create mode 100644 code/modelCuration/v8_6_1.m diff --git a/README.md b/README.md index 6da026a9..2c8c1845 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ This repository contains the current consensus genome-scale metabolic model of _ | Taxonomy | Latest update | Version | Reactions | Metabolites | Genes | |:-------|:--------------|:------|:------|:----------|:-----| -| _Saccharomyces cerevisiae_ | 17-Aug-2022 | develop | 4063 | 2744 | 1160 | +| _Saccharomyces cerevisiae_ | 05-Sep-2022 | develop | 4063 | 2744 | 1160 | # Installation & usage diff --git a/code/modelCuration/ATP_complex_curation.m b/code/modelCuration/ATP_complex_curation.m deleted file mode 100644 index 7136244f..00000000 --- a/code/modelCuration/ATP_complex_curation.m +++ /dev/null @@ -1,20 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% complexAnnotation -% Correct complex annotation for ATP_complex_mitochondrial -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% Load model -cd .. -model = loadYeastModel; - -% Change gene rules for ATP synthase mitochondrial (r_0226) -newModel = changeGeneAssoc(model, 'r_0226', ['Q0080 and Q0085 and Q0130 and ' ... - 'YBL099W and YBR039W and YDL004W and YDR298C and YDR377W and YJR121W ' ... - 'and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W and ' ... - 'YDR322C-A and YPR020W and YOL077W-A']); - -% Delete unused genes (if any) -newModel = deleteUnusedGenes(newModel, 2); - -% Save model: -saveYeastModel(newModel) diff --git a/code/modelCuration/TEMPLATEcuration.m b/code/modelCuration/TEMPLATEcuration.m index cd155bd8..f42dd6d5 100644 --- a/code/modelCuration/TEMPLATEcuration.m +++ b/code/modelCuration/TEMPLATEcuration.m @@ -18,6 +18,7 @@ cd .. model = getEarlierModelVersion('$VERSION'); model.id='yeastGEM_develop'; +dataDir=fullfile(pwd(),'..','data','modelCuration','v8.6.1'); %Modify to the correct version cd modelCuration %% Brief description of curation to be performed (PR #xxx) [include correct PR or Issue number] @@ -50,10 +51,10 @@ [new.accuracy,new.tp,new.tn,new.fn,new.fp] = essentialGenes(model); fprintf('Genes in model: %d\n',numel(model.genes)); fprintf('Gene essentiality accuracy: %.4f\n', new.accuracy); -fprintf('Gene essentiality TP: %d\n', numel(new.tp)); -fprintf('Gene essentiality TN: %d\n', numel(new.tn)); -fprintf('Gene essentiality FP: %d\n', numel(new.fp)); -fprintf('Gene essentiality FN: %d\n', numel(new.fn)); +fprintf('True non-essential genes: %d\n', numel(new.tp)); +fprintf('True essential genes: %d\n', numel(new.tn)); +fprintf('False non-essential genes: %d\n', numel(new.fp)); +fprintf('False essential genes: %d\n', numel(new.fn)); fprintf('\nRun growth analysis\n') R2=growth(model); fprintf('R2 of growth prediction: %.4f\n', R2); diff --git a/code/modelCuration/v8_6_1.m b/code/modelCuration/v8_6_1.m new file mode 100644 index 00000000..f1a4d4bb --- /dev/null +++ b/code/modelCuration/v8_6_1.m @@ -0,0 +1,42 @@ +% This scripts applies curations to be applied on yeast-GEM release 8.6.1. +% Indicate which Issue/PR are addressed. If multiple curations are performed +% before a new release is made, just add the required code to this script. If +% more extensive coding is required, you can write a separate (generic) function +% that can be kept in the /code/modelCuration folder. Otherwise, try to use +% existing functions whenever possible. In particular /code/curateMetsRxnsGenes +% can do many types of curation. + +%% Load yeast-GEM 8.6.1 (requires local yeast-GEM git repository) +cd .. +model = getEarlierModelVersion('8.6.1'); +model.id='yeastGEM_develop'; +dataDir=fullfile(pwd(),'..','data','modelCuration','v8.6.1'); +cd modelCuration + +%% Correct ATP synthase mitochondrial complex gene associations (PR #323) +model = changeGrRules(model, 'r_0226', ['Q0080 and Q0085 and Q0130 and ' ... + 'YBL099W and YBR039W and YDL004W and YDR298C and YDR377W and YJR121W ' ... + 'and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W and ' ... + 'YDR322C-A and YPR020W and YOL077W-A'],true); +model = deleteUnusedGenes(model); +checkModelStruct(model,true,false) + +%% DO NOT CHANGE OR REMOVE THE CODE BELOW THIS LINE. +% Show some metrics: +cd ../modelTests +disp('Run gene essentiality analysis') +[new.accuracy,new.tp,new.tn,new.fn,new.fp] = essentialGenes(model); +fprintf('Genes in model: %d\n',numel(model.genes)); +fprintf('Gene essentiality accuracy: %.4f\n', new.accuracy); +fprintf('True non-essential genes: %d\n', numel(new.tp)); +fprintf('True essential genes: %d\n', numel(new.tn)); +fprintf('False non-essential genes: %d\n', numel(new.fp)); +fprintf('False essential genes: %d\n', numel(new.fn)); +fprintf('\nRun growth analysis\n') +R2=growth(model); +fprintf('R2 of growth prediction: %.4f\n', R2); + +% Save model: +cd .. +saveYeastModel(model) +cd modelCuration diff --git a/model/dependencies.txt b/model/dependencies.txt index 667a8e66..76a5ff7a 100644 --- a/model/dependencies.txt +++ b/model/dependencies.txt @@ -1,4 +1,4 @@ -MATLAB 9.12.0.2009381 (R2022a) Update 4 +MATLAB 9.12.0.1956245 (R2022a) Update 2 libSBML 5.19.0 -RAVEN_toolbox 2.7.5 -COBRA_toolbox 3.33 +RAVEN_toolbox commit 20950d8 +COBRA_toolbox unknown diff --git a/model/yeast-GEM.xml b/model/yeast-GEM.xml index 19eb7faf..c0a605c0 100644 --- a/model/yeast-GEM.xml +++ b/model/yeast-GEM.xml @@ -23,6 +23,12 @@ + + 2022-09-05T17:01:46Z + + + 2022-09-05T17:01:46Z + diff --git a/model/yeast-GEM.yml b/model/yeast-GEM.yml index d82fe64c..452e5051 100755 --- a/model/yeast-GEM.yml +++ b/model/yeast-GEM.yml @@ -3,7 +3,7 @@ - metaData: id: "yeastGEM_develop" name: "The Consensus Genome-Scale Metabolic Model of Yeast" - date: "2022-08-17" + date: "2022-09-05" givenName: "Eduard" familyName: "Kerkhoven" email: "eduardk@chalmers.se" From 3f34b45205d76af7da981bdd81a490a6d9253634 Mon Sep 17 00:00:00 2001 From: Eduard Kerkhoven Date: Mon, 5 Sep 2022 15:43:41 +0200 Subject: [PATCH 4/4] feat: misc changes to increaseVersion already present in yeast-GEM 8.6.1 README.md --- code/increaseVersion.m | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/code/increaseVersion.m b/code/increaseVersion.m index a7b2ece9..97502c62 100644 --- a/code/increaseVersion.m +++ b/code/increaseVersion.m @@ -52,27 +52,29 @@ function increaseVersion(bumpType) %Run tests cd modelTests disp('Running gene essentiality analysis') -[new.accuracy,new.tp,new.tn,new.fn,new.fp] = essentialGenes(newModel); +[new.accuracy,new.tp,new.tn,new.fn,new.fp] = essentialGenes(model); disp('Run growth analysis') -new.R2=growth(newModel); +new.R2=growth(model); + saveas(gcf,'../../growth.png'); +cd .. copyfile('../README.md','backup.md') fin = fopen('backup.md','r'); fout = fopen('../README.md','w'); searchStats1 = '^(- Accuracy\: )0\.\d+'; -searchStats2 = '^(- True positive genes\: )\d+'; -searchStats3 = '^(- True negative genes\: )\d+'; -searchStats4 = '^(- False positive genes\: )\d+'; -searchStats5 = '^(- False negative genes\: )\d+'; -newStats1 = ['$1' num2str(new.accuracy)]; +searchStats2 = '^(- True non-essential genes\: )\d+'; +searchStats3 = '^(- True essential genes\: )\d+'; +searchStats4 = '^(- False non-essential genes\: )\d+'; +searchStats5 = '^(- False essential genes\: )\d+'; +newStats1 = ['$1' num2str(new.accuracy,'%.3f')]; newStats2 = ['$1' num2str(numel(new.tp))]; newStats3 = ['$1' num2str(numel(new.tn))]; newStats4 = ['$1' num2str(numel(new.fp))]; newStats5 = ['$1' num2str(numel(new.fn))]; -searchStats6 = '^(- R2<\/sup>\: )0\.\d+'; -newStats6 = ['$1' num2str(new.R2)]; +searchStats6 = '^(- Correlation coefficient R2<\/sup>\: )0\.\d+'; +newStats6 = ['$1' num2str(new.R2,'%.3f')]; while ~feof(fin) str = fgets(fin); @@ -105,10 +107,11 @@ function increaseVersion(bumpType) delete('backup'); %Include tag and save model: +disp('Write model files') model.id = ['yeastGEM_v' newVersion]; saveYeastModel(model,true,true,true) %only save if model can grow -%Check if any file changed (except for history.md and 1 line in yeast-GEM.xml): +%Check for any unexpected file changes [~,diff] = system('git diff --numstat'); diff = strsplit(diff,'\n'); change = false; @@ -117,18 +120,20 @@ function increaseVersion(bumpType) if length(diff_i) == 3 switch diff_i{3} case 'model/yeast-GEM.xml' - %.xml file: 2 lines should be added & 2 lines should be deleted - if eval([diff_i{1} ' > 2']) || eval([diff_i{2} ' > 2']) + %.xml file: 4 lines should be added & 4 lines should be + %deleted (2 with version information, 2 with current date) + if eval([diff_i{1} ' > 4']) || eval([diff_i{2} ' > 4']) disp(['NOTE: File ' diff_i{3} ' is changing more than expected']) change = true; end case 'model/yeast-GEM.yml' %.yml file: 2 lines should be added & 2 lines should be deleted + %(1 with version information, 1 with current date) if eval([diff_i{1} ' > 2']) || eval([diff_i{2} ' > 2']) disp(['NOTE: File ' diff_i{3} ' is changing more than expected']) change = true; end - case 'history.md' + case {'history.md','README.md','growth.png','model/yeast-GEM.mat'} otherwise disp(['NOTE: File ' diff_i{3} ' is changing']) change = true;