Skip to content

Commit

Permalink
Merge pull request #324 from SysBioChalmers/develop
Browse files Browse the repository at this point in the history
yeast 8.6.2
  • Loading branch information
edkerk authored Sep 5, 2022
2 parents 264e271 + dc1c786 commit 33933f5
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 369 deletions.
16 changes: 1 addition & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,7 @@ This repository contains the current consensus genome-scale metabolic model of _

| Taxonomy | Latest update | Version | Reactions | Metabolites | Genes |
|:-------|:--------------|:------|:------|:----------|:-----|
| _Saccharomyces cerevisiae_ | 05-Sep-2022 | 8.6.1 | 4063 | 2744 | 1163 |

### Gene essentiality prediction

- Accuracy: 0.881
- True non-essential genes: 929
- True essential genes: 63
- False non-essential genes: 96
- False essential genes: 38

### Growth prediction

- Correlation coefficient R<sup>2</sup>: 0.865

![Growth curve](growth.png)
| _Saccharomyces cerevisiae_ | 05-Sep-2022 | develop | 4063 | 2744 | 1160 |

# Installation & usage

Expand Down
31 changes: 18 additions & 13 deletions code/increaseVersion.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '^(- R<sup>2<\/sup>\: )0\.\d+';
newStats6 = ['$1' num2str(new.R2)];
searchStats6 = '^(- Correlation coefficient R<sup>2<\/sup>\: )0\.\d+';
newStats6 = ['$1' num2str(new.R2,'%.3f')];

while ~feof(fin)
str = fgets(fin);
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
9 changes: 5 additions & 4 deletions code/modelCuration/TEMPLATEcuration.m
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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);
Expand Down
42 changes: 42 additions & 0 deletions code/modelCuration/v8_6_1.m
Original file line number Diff line number Diff line change
@@ -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
Binary file removed growth.png
Binary file not shown.
Loading

0 comments on commit 33933f5

Please sign in to comment.