From 919d396719eb4aaa32d381d2d0ef13de29ed153e Mon Sep 17 00:00:00 2001 From: Eduard Kerkhoven Date: Thu, 24 Jun 2021 11:59:12 +0200 Subject: [PATCH] fix: rename model files to yeast-GEM --- .github/workflows/yaml-validation.yml | 2 +- README.md | 2 +- .../modelCuration/addiSce926changes.m | 2 +- code/increaseVersion.m | 14 ++++++------- code/io.py | 2 +- code/loadYeastModel.m | 2 +- code/missingFields/BiGGidsCompliance.ipynb | 10 +++++----- code/missingFields/GetMNXID.m | 2 +- code/modelTests/cobrapy-compliance.ipynb | 2 +- code/saveYeastModel.m | 10 +++++----- data/databases/BiGGrxnDictionary_newIDs.csv | 20 +++++++++---------- model/dependencies.txt | 2 +- model/{yeastGEM.txt => yeast-GEM.txt} | 0 model/{yeastGEM.xml => yeast-GEM.xml} | 2 +- model/{yeastGEM.yml => yeast-GEM.yml} | 4 ++-- 15 files changed, 38 insertions(+), 38 deletions(-) rename model/{yeastGEM.txt => yeast-GEM.txt} (100%) rename model/{yeastGEM.xml => yeast-GEM.xml} (99%) rename model/{yeastGEM.yml => yeast-GEM.yml} (99%) diff --git a/.github/workflows/yaml-validation.yml b/.github/workflows/yaml-validation.yml index 615895eb..4484e331 100644 --- a/.github/workflows/yaml-validation.yml +++ b/.github/workflows/yaml-validation.yml @@ -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')" diff --git a/README.md b/README.md index 8ed47a5a..99e9089d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/code/deprecated/modelCuration/addiSce926changes.m b/code/deprecated/modelCuration/addiSce926changes.m index e9ef6436..e347b110 100644 --- a/code/deprecated/modelCuration/addiSce926changes.m +++ b/code/deprecated/modelCuration/addiSce926changes.m @@ -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'); diff --git a/code/increaseVersion.m b/code/increaseVersion.m index 6dd39396..a39ab54a 100644 --- a/code/increaseVersion.m +++ b/code/increaseVersion.m @@ -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,'.')); @@ -50,13 +50,13 @@ 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; @@ -64,7 +64,7 @@ function increaseVersion(bumpType) 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; @@ -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); @@ -110,7 +110,7 @@ function increaseVersion(bumpType) model.annotation.email = 'bensan@chalmers.se'; 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'); diff --git a/code/io.py b/code/io.py index 656480db..34d79430 100644 --- a/code/io.py +++ b/code/io.py @@ -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. diff --git a/code/loadYeastModel.m b/code/loadYeastModel.m index 2a43c0e5..f3720277 100644 --- a/code/loadYeastModel.m +++ b/code/loadYeastModel.m @@ -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) diff --git a/code/missingFields/BiGGidsCompliance.ipynb b/code/missingFields/BiGGidsCompliance.ipynb index 5c76e88b..26e378fd 100644 --- a/code/missingFields/BiGGidsCompliance.ipynb +++ b/code/missingFields/BiGGidsCompliance.ipynb @@ -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", @@ -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", @@ -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", @@ -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", @@ -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", diff --git a/code/missingFields/GetMNXID.m b/code/missingFields/GetMNXID.m index 44c71464..a6bde14e 100644 --- a/code/missingFields/GetMNXID.m +++ b/code/missingFields/GetMNXID.m @@ -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 diff --git a/code/modelTests/cobrapy-compliance.ipynb b/code/modelTests/cobrapy-compliance.ipynb index ae6e2e2b..8d299a07 100644 --- a/code/modelTests/cobrapy-compliance.ipynb +++ b/code/modelTests/cobrapy-compliance.ipynb @@ -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\")" ] }, { diff --git a/code/saveYeastModel.m b/code/saveYeastModel.m index 556f902e..07a9e26d 100644 --- a/code/saveYeastModel.m +++ b/code/saveYeastModel.m @@ -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'); @@ -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); diff --git a/data/databases/BiGGrxnDictionary_newIDs.csv b/data/databases/BiGGrxnDictionary_newIDs.csv index 49d4ca9c..e5527a33 100644 --- a/data/databases/BiGGrxnDictionary_newIDs.csv +++ b/data/databases/BiGGrxnDictionary_newIDs.csv @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/model/dependencies.txt b/model/dependencies.txt index 7cc62468..5e3c6be0 100644 --- a/model/dependencies.txt +++ b/model/dependencies.txt @@ -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 diff --git a/model/yeastGEM.txt b/model/yeast-GEM.txt similarity index 100% rename from model/yeastGEM.txt rename to model/yeast-GEM.txt diff --git a/model/yeastGEM.xml b/model/yeast-GEM.xml similarity index 99% rename from model/yeastGEM.xml rename to model/yeast-GEM.xml index 85511034..426aee15 100644 --- a/model/yeastGEM.xml +++ b/model/yeast-GEM.xml @@ -1,6 +1,6 @@ - + diff --git a/model/yeastGEM.yml b/model/yeast-GEM.yml similarity index 99% rename from model/yeastGEM.yml rename to model/yeast-GEM.yml index 95d6364b..09811b61 100644 --- a/model/yeastGEM.yml +++ b/model/yeast-GEM.yml @@ -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"