Skip to content

Commit

Permalink
fix: rename model files to yeast-GEM
Browse files Browse the repository at this point in the history
  • Loading branch information
edkerk committed Jun 24, 2021
1 parent c0113a1 commit 919d396
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/yaml-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
- name: Import with cobrapy
run: |
pip install -r requirements/ci-requirements.txt
python -c "import cobra ; cobra.io.load_yaml_model('model/yeastGEM.yml')"
python -c "import cobra ; cobra.io.load_yaml_model('model/yeast-GEM.yml')"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This repository contains the current consensus genome-scale metabolic model of _
|:-------:|:--------------:|:---------:|:----------:|:-----:|
|_Saccharomyces cerevisiae_|[Yeast 7.6](https://sourceforge.net/projects/yeast/)|4058|2742|1150|

**Last update:** 2021-06-15
**Last update:** 2021-06-24

## Installation

Expand Down
2 changes: 1 addition & 1 deletion code/deprecated/modelCuration/addiSce926changes.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Load model:
model = readCbModel('../../model/yeastGEM.xml');
model = readCbModel('../../model/yeast-GEM.xml');

%Correct some gene relations based on isce926:
fid = fopen('../../data/modelCuration/iSce926curatedGeneRules.tsv');
Expand Down
14 changes: 7 additions & 7 deletions code/increaseVersion.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function increaseVersion(bumpType)
end

%Bump version number:
oldModel = load('../model/yeastGEM.mat');
oldModel = load('../model/yeast-GEM.mat');
oldVersion = oldModel.model.modelID;
oldVersion = oldVersion(strfind(oldVersion,'_v')+2:end);
oldVersion = str2double(strsplit(oldVersion,'.'));
Expand Down Expand Up @@ -50,21 +50,21 @@ function increaseVersion(bumpType)

%Load model:
initCobraToolbox
model = readCbModel('../model/yeastGEM.xml');
model = readCbModel('../model/yeast-GEM.xml');

%Include tag and save model:
model.modelID = ['yeastGEM_v' newVersion];
model.modelID = ['yeast-GEM_v' newVersion];
saveYeastModel(model,false,false) %only save if model can grow

%Check if any file changed (except for history.md and 1 line in yeastGEM.xml):
%Check if any file changed (except for history.md and 1 line in yeast-GEM.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},'model/yeastGEM.xml')
if strcmp(diff_i{3},'model/yeast-GEM.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;
Expand Down Expand Up @@ -98,7 +98,7 @@ function increaseVersion(bumpType)
delete('backup');

%Store model as .mat:
save('../model/yeastGEM.mat','model');
save('../model/yeast-GEM.mat','model');

%Convert to RAVEN format and store model as .xlsx:
model = ravenCobraWrapper(model);
Expand All @@ -110,7 +110,7 @@ function increaseVersion(bumpType)
model.annotation.email = '[email protected]';
model.annotation.organization = 'Chalmers University of Technology';
model.annotation.note = 'Saccharomyces cerevisiae - strain S288C';
exportToExcelFormat(model,'../model/yeastGEM.xlsx');
exportToExcelFormat(model,'../model/yeast-GEM.xlsx');

%Update version file:
fid = fopen('../version.txt','wt');
Expand Down
2 changes: 1 addition & 1 deletion code/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# find .env + define paths:
dotenv_path = find_dotenv()
REPO_PATH = dirname(dotenv_path)
MODEL_PATH = f"{REPO_PATH}/model/yeastGEM.xml"
MODEL_PATH = f"{REPO_PATH}/model/yeast-GEM.xml"

def read_yeast_model(make_bigg_compliant=False):
"""Reads the SBML file of the yeast model using COBRA.
Expand Down
2 changes: 1 addition & 1 deletion code/loadYeastModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

scriptFolder = fileparts(which(mfilename));
currentDir = cd(scriptFolder);
model = readCbModel('../model/yeastGEM.xml');
model = readCbModel('../model/yeast-GEM.xml');
model = buildRxnGeneMat(model);
cd(currentDir)

Expand Down
10 changes: 5 additions & 5 deletions code/missingFields/BiGGidsCompliance.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"\n",
"# Create new BiGG ids compliant with lipid standards:\n",
"import cobra\n",
"model = cobra.io.read_sbml_model(\"../../model/yeastGEM.xml\")\n",
"model = cobra.io.read_sbml_model(\"../../model/yeast-GEM.xml\")\n",
"file_name = '../../data/databases/BiGGmetDictionary_newIDs.csv'\n",
"new_file_name = file_name.replace(\".csv\",\"_new.csv\")\n",
"with open(file_name) as old_file:\n",
Expand Down Expand Up @@ -196,7 +196,7 @@
"source": [
"# Create new BiGG ids for SLIME rxns compliant with lipid standards:\n",
"import cobra\n",
"model = cobra.io.read_sbml_model(\"../../model/yeastGEM.xml\")\n",
"model = cobra.io.read_sbml_model(\"../../model/yeast-GEM.xml\")\n",
"file_name = '../../data/databases/BiGGrxnDictionary_newIDs.csv'\n",
"new_file_name = file_name.replace(\".csv\",\"_new.csv\")\n",
"with open(file_name) as old_file:\n",
Expand Down Expand Up @@ -237,7 +237,7 @@
"source": [
"# Create new BiGG ids for exchange rxns:\n",
"import cobra\n",
"model = cobra.io.read_sbml_model(\"../../model/yeastGEM.xml\")\n",
"model = cobra.io.read_sbml_model(\"../../model/yeast-GEM.xml\")\n",
"file_name = '../../data/databases/BiGGrxnDictionary_newIDs.csv'\n",
"new_file_name = file_name.replace(\".csv\",\"_new.csv\")\n",
"with open(file_name) as old_file:\n",
Expand Down Expand Up @@ -291,7 +291,7 @@
"\n",
"# Create new BiGG ids for exchange rxns:\n",
"import cobra\n",
"model = cobra.io.read_sbml_model(\"../../model/yeastGEM.xml\")\n",
"model = cobra.io.read_sbml_model(\"../../model/yeast-GEM.xml\")\n",
"file_name = '../../data/databases/BiGGrxnDictionary_newIDs.csv'\n",
"new_file_name = file_name.replace(\".csv\",\"_new.csv\")\n",
"with open(file_name) as old_file:\n",
Expand Down Expand Up @@ -341,7 +341,7 @@
"import csv\n",
"from copy import copy\n",
"from re import findall\n",
"model = cobra.io.read_sbml_model(\"../../model/yeastGEM.xml\")\n",
"model = cobra.io.read_sbml_model(\"../../model/yeast-GEM.xml\")\n",
"file_name = '../../data/databases/BiGGrxnDictionary_newIDs.csv'\n",
"new_file_name = file_name.replace(\".csv\",\"_new.csv\")\n",
"with open(file_name) as old_file:\n",
Expand Down
2 changes: 1 addition & 1 deletion code/missingFields/GetMNXID.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
% HMR3, and the part 'Load MNXref data structure' is modified to read the reference data from RAVEN.
%
% model a model structure;please load yeast model using function 'loadYeastModel.m' from
% yeastGEM github repository.
% yeast-GEM github repository.
% type type = 'mets' or 'rxns'
% level level = 1:only compares MNXid FROM kegg and CHEBI
% level =2 compares MNX from yeast7.6MNX model and CHEBI and KEGG
Expand Down
2 changes: 1 addition & 1 deletion code/modelTests/cobrapy-compliance.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
],
"source": [
"import cobra\n",
"model = cobra.io.read_sbml_model(\"../../model/yeastGEM.xml\")"
"model = cobra.io.read_sbml_model(\"../../model/yeast-GEM.xml\")"
]
},
{
Expand Down
10 changes: 5 additions & 5 deletions code/saveYeastModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ function saveYeastModel(model,upDATE,allowNoGrowth)
checkGrowth(model,'anaerobic',allowNoGrowth)

%Update .xml, .txt and .yml models:
copyfile('tempModel.xml','../model/yeastGEM.xml')
copyfile('tempModel.xml','../model/yeast-GEM.xml')
delete('tempModel.xml');
writeCbModel(model,'text','../model/yeastGEM.txt');
exportForGit(model,'yeastGEM','../model',{'yml'},false,false);
writeCbModel(model,'text','../model/yeast-GEM.txt');
exportForGit(model,'yeast-GEM','../model',{'yml'},false,false);

%Detect boundary metabolites and save them in a .txt file:
fid = fopen('../model/boundaryMets.txt','wt');
Expand Down Expand Up @@ -100,9 +100,9 @@ function saveYeastModel(model,upDATE,allowNoGrowth)

%Convert notation "e-005" to "e-05 " in stoich. coeffs. to avoid
%inconsistencies between Windows and MAC:
copyfile('../model/yeastGEM.xml','backup.xml')
copyfile('../model/yeast-GEM.xml','backup.xml')
fin = fopen('backup.xml','r');
fout = fopen('../model/yeastGEM.xml','w');
fout = fopen('../model/yeast-GEM.xml','w');
still_reading = true;
while still_reading
inline = fgets(fin);
Expand Down
20 changes: 10 additions & 10 deletions data/databases/BiGGrxnDictionary_newIDs.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,7 @@ r_2080,TREtv
r_2082,TRP__Ltm
r_2087,TYR__Ltx
r_2107,ZYMSTtce
r_2108,BIOMASS_yeastGEM_LIP
r_2108,BIOMASS_yeast-GEM_LIP
r_2111,GROWTH
r_2125,COAtlp
r_2134,EX_44mzym_e
Expand Down Expand Up @@ -2191,11 +2191,11 @@ r_3996,PCHOL_CHOtrm
r_4005,PE_HStrm
r_4038,TAG_CHOtrm
r_4040,HEMEAtm
r_4041,BIOMASS_yeastGEM
r_4047,BIOMASS_yeastGEM_PROT
r_4048,BIOMASS_yeastGEM_CARB
r_4049,BIOMASS_yeastGEM_RNA
r_4050,BIOMASS_yeastGEM_DNA
r_4041,BIOMASS_yeast-GEM
r_4047,BIOMASS_yeast-GEM_PROT
r_4048,BIOMASS_yeast-GEM_CARB
r_4049,BIOMASS_yeast-GEM_RNA
r_4050,BIOMASS_yeast-GEM_DNA
r_4051,CERtg
r_4052,MIP2Ctg
r_4053,IPCtg
Expand All @@ -2208,9 +2208,9 @@ r_4059,LPItrm
r_4060,PGtmm
r_4061,CLtmm
r_4062,SINK_LIPBACK
r_4063,BIOMASS_yeastGEM_LIPBACK
r_4063,BIOMASS_yeast-GEM_LIPBACK
r_4064,SINK_LIPCHAIN
r_4065,BIOMASS_yeastGEM_LIPCHAIN
r_4065,BIOMASS_yeast-GEM_LIPCHAIN
r_4066,cer1_24SLIMEg
r_4067,cer1_26SLIMEg
r_4068,cer2_24SLIMEg
Expand Down Expand Up @@ -2557,5 +2557,5 @@ r_4586,STASYN
r_4587,CA2t3ec
r_4589,CU2TRA
r_4592,MGt2ec
r_4598,BIOMASS_yeastGEM_COFACTOR
r_4599,BIOMASS_yeastGEM_ION
r_4598,BIOMASS_yeast-GEM_COFACTOR
r_4599,BIOMASS_yeast-GEM_ION
2 changes: 1 addition & 1 deletion model/dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MATLAB 9.10.0.1602886 (R2021a)
libSBML 5.17.0
RAVEN_toolbox commit 3b821c2
RAVEN_toolbox 2.5.1
COBRA_toolbox commit 25dbea4
SBML_level 3
SBML_version 1
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion model/yeastGEM.xml → model/yeast-GEM.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:fbc="http://www.sbml.org/sbml/level3/version1/fbc/version2" xmlns:groups="http://www.sbml.org/sbml/level3/version1/groups/version1" level="3" version="1" fbc:required="false" groups:required="false">
<model metaid="yeastGEM.xml" id="M_yeastGEM_devel" name="The Consensus Genome-Scale Metabolic Model of Yeast" fbc:strict="true">
<model metaid="yeast-GEM.xml" id="M_yeast__45__GEM_devel" name="The Consensus Genome-Scale Metabolic Model of Yeast" fbc:strict="true">
<listOfUnitDefinitions>
<unitDefinition id="mmol_per_gDW_per_hr">
<listOfUnits>
Expand Down
4 changes: 2 additions & 2 deletions model/yeastGEM.yml → model/yeast-GEM.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
!!omap
- metaData:
id: "yeastGEM_devel"
id: "yeast-GEM_devel"
name: "The Consensus Genome-Scale Metabolic Model of Yeast"
date: "2021-06-15"
date: "2021-06-24"
- metabolites:
- !!omap
- id: "s_0001"
Expand Down

0 comments on commit 919d396

Please sign in to comment.