Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yeast 8.1.3 #139

Merged
merged 13 commits into from
Jul 16, 2018
27 changes: 26 additions & 1 deletion ComplementaryScripts/increaseVersion.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function increaseVersion(bumpType)

%Bump version number:
oldModel = load('../ModelFiles/mat/yeastGEM.mat');
oldVersion = oldModel.model.description;
oldVersion = oldModel.model.modelID;
oldVersion = oldVersion(strfind(oldVersion,'_v')+2:end);
oldVersion = str2double(strsplit(oldVersion,'.'));
newVersion = oldVersion;
Expand Down Expand Up @@ -49,6 +49,31 @@ function increaseVersion(bumpType)
model.modelID = ['yeastGEM_v' newVersion];
saveYeastModel(model,false)

%Check if any file changed (except for history.md and 1 line in yeastGEM.xml):
diff = git('diff --numstat');
diff = strsplit(diff,'\n');
change = false;
for i = 1:length(diff)
diff_i = strsplit(diff{i},'\t');
if length(diff_i) == 3
%.xml file: 1 line should be added & 1 line should be deleted
if strcmp(diff_i{3},'ModelFiles/xml/yeastGEM.xml')
if eval([diff_i{1} ' > 1']) || eval([diff_i{2} ' > 1'])
disp(['NOTE: File ' diff_i{3} ' is changing more than expected'])
change = true;
end
%Any other file except for history.md: no changes should be detected
elseif ~strcmp(diff_i{3},{'history.md'})
disp(['NOTE: File ' diff_i{3} ' is changing'])
change = true;
end
end
end
if change
error(['Some files are changing from devel. To fix, first update devel, ' ...
'then merge to master, and try again.'])
end

%Allow .mat & .xls storage:
copyfile('../.gitignore','backup')
fin = fopen('backup','r');
Expand Down
61 changes: 61 additions & 0 deletions ComplementaryScripts/missingFields/addSBOterms.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% model = addSBOterms(model)
%
% Benjamín J. Sánchez
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function model = addSBOterms(model)

%Get RAVEN model for matching names & compartments
model_r = ravenCobraWrapper(model);

%Add SBO terms for mets:
model.metSBOTerms = cell(size(model.mets));
for i = 1:length(model.mets)
metName = model_r.metNames{i};
if ismember(metName,{'biomass','DNA','RNA','protein','carbohydrate','lipid'}) ...
|| endsWith(metName,' backbone') || endsWith(metName,' chain')
model.metSBOTerms{i} = 'SBO:0000649'; %Biomass
else
model.metSBOTerms{i} = 'SBO:0000247'; %Simple chemical
end
end

%Add SBO terms for rxns:
model.rxnSBOTerms = cell(size(model.rxns));
for i = 1:length(model.rxns)
rxnName = model_r.rxnNames{i};
metNames = model_r.metNames(model.S(:,i) ~= 0);
metComps = model_r.metComps(model.S(:,i) ~= 0);
metStoich = model_r.S(model.S(:,i) ~= 0,i);

if length(metNames) == 1
if strcmp(model_r.comps{metComps},'e')
model.rxnSBOTerms{i} = 'SBO:0000627'; %Exchange rxn

elseif metStoich > 0
model.rxnSBOTerms{i} = 'SBO:0000628'; %Demand rxn
else
model.rxnSBOTerms{i} = 'SBO:0000632'; %Sink rxn
end

elseif strcmp(rxnName,'biomass pseudoreaction')
model.rxnSBOTerms{i} = 'SBO:0000629'; %Biomass pseudo-rxn

elseif strcmp(rxnName,'non-growth associated maintenance reaction')
model.rxnSBOTerms{i} = 'SBO:0000630'; %ATP maintenance

elseif contains(rxnName,'pseudoreaction') || contains(rxnName,'SLIME rxn')
model.rxnSBOTerms{i} = 'SBO:0000395'; %Encapsulating process

elseif length(unique(metComps)) > 1 && length(unique(metNames)) < length(metNames)
model.rxnSBOTerms{i} = 'SBO:0000655'; %Transport rxn

else
model.rxnSBOTerms{i} = 'SBO:0000176'; %Metabolic rxn
end
end

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 changes: 5 additions & 0 deletions ComplementaryScripts/saveYeastModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ function saveYeastModel(model,upDATE)
scriptFolder = fileparts(which(mfilename));
currentDir = cd(scriptFolder);

%Update SBO terms in model:
cd missingFields
model = addSBOterms(model);
cd ..

%Check if model is a valid SBML structure:
writeCbModel(model,'sbml','tempModel.xml');
[~,errors] = TranslateSBML('tempModel.xml');
Expand Down
4 changes: 2 additions & 2 deletions ModelFiles/boundaryMets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,5 @@ s_2826[e] oleate [extracellular]
s_1163[e] myristate [extracellular]
s_3715[e] raffinose [extracellular]
s_3716[e] melibiose [extracellular]
s_3746[c] lipid - backbones [cytoplasm]
s_3747[c] lipid - tails [cytoplasm]
s_3746[c] lipid backbone [cytoplasm]
s_3747[c] lipid chain [cytoplasm]
2 changes: 1 addition & 1 deletion ModelFiles/dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MATLAB 9.4.0.813654 (R2018a)
libSBML 5.17.0
RAVEN_toolbox 2.0.0
COBRA_toolbox commit c72a7bd
COBRA_toolbox commit 1361503
SBML_level 3
SBML_version 1
fbc_version 2
64,173 changes: 51,450 additions & 12,723 deletions ModelFiles/xml/yeastGEM.xml

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions ModelFiles/yml/yeastGEM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18374,11 +18374,11 @@
- formula: C26H52O2
- !!omap
- id: s_3746
- name: lipid - backbones
- name: lipid backbone
- compartment: c
- !!omap
- id: s_3747
- name: lipid - tails
- name: lipid chain
- compartment: c
- reactions:
- !!omap
Expand Down Expand Up @@ -71614,14 +71614,14 @@
- confidence_score: 1
- !!omap
- id: r_4062
- name: lipid - backbones exchange
- name: lipid backbone exchange
- metabolites: !!omap
- s_3746: -1
- lower_bound: 0
- upper_bound: 0
- !!omap
- id: r_4063
- name: lipid pseudoreaction - backbone
- name: lipid backbone pseudoreaction
- metabolites: !!omap
- s_0089: -0.0069103
- s_0666: -0.026583
Expand All @@ -71637,14 +71637,14 @@
- confidence_score: 1
- !!omap
- id: r_4064
- name: lipid - tails exchange
- name: lipid chain exchange
- metabolites: !!omap
- s_3747: -1
- lower_bound: 0
- upper_bound: 0
- !!omap
- id: r_4065
- name: lipid pseudoreaction - tail
- name: lipid chain pseudoreaction
- metabolites: !!omap
- s_3740: -0.0080858
- s_3741: -0.02373
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This repository contains the current consensus genome-scale metabolic model of _

**GEM Category:** Species; **Utilisation:** predictive simulation, multi-omics integrative analysis, _in silico_ strain design, model template; **Field:** metabolic-network reconstruction; **Type of Model:** curated, reconstruction; **Model Source:** [Yeast 7.6](https://sourceforge.net/projects/yeast/); **Taxonomy:** _Saccharomyces cerevisiae_; **Metabolic System:** General Metabolism; **Condition:** aerobic, glucose-limited, defined media, maximization of growth.

* Last update: 2018-06-26
* Last update: 2018-07-13

* Main Model Descriptors:

Expand Down Expand Up @@ -66,6 +66,7 @@ The model is available in `.xml`, `.txt`, `.yml`, `.mat` and `.xlsx` (the last 2
* `missingFields`: Folder with functions for adding missing fields to the model.
* `addGeneNames.m`: Adds the field `geneNames` by extracting the data from KEGG.
* `addConfidenceScores.m`: Adds confidence scores based in a basic automatic criteria.
* `addSBOterms.m`: Adds SBO terms to metabolites and reactions based on the corresponding names.
* `getMissingFields.m`: Retrieves missing information (`rxnECNumbers` and `subSystems`) from KEGG & Swissprot. It uses `changeRules.m` for properly reading the gene-reaction rules, and `findInDB.m`, `getAllPath.m`, `findSubSystem.m` & `deleteRepeated.m` for reading the databases. The latter 4 functions are adapted versions of functions from the [GECKO toolbox](https://github.com/SysBioChalmers/GECKO).
* `modelCuration`: Folder with curation functions.
* `addiSce926changes.m`: Updates the model to include curation from [the iSce926 model](http://www.maranasgroup.com/submission_models/iSce926.htm).
Expand Down