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

refactor: standard-GEM #257

Merged
merged 9 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at bensan@chalmers.se. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at eduardk@chalmers.se. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

Expand Down
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ Here's how to set up yeast-GEM for local development to contribute smaller featu
* If your changes are not so small and require several steps, create a script that loads the model, reads data (if applicable), changes the model accordingly, and saves the model back.
* Each script should start with a commented section describing the script, explaining the parameters, and indicating your name and the date it was written. Existing functions can clarify what style should be used.
* As much as possible follow the model conventions:
- For new metabolites and/or reactions, please use `/ComplementaryScripts/otherChanges/getNewIndex.m` for obtaining new ids.
- For new metabolites and/or reactions, please use `/code/otherChanges/getNewIndex.m` for obtaining new ids.
- For metabolite and/or reaction names, please avoid any unconventional characters (e.g. Greek letters).
- For new genes, please use as id the [systematic names from SGD](http://seq.yeastgenome.org/help/community/nomenclature-conventions).
* Store scripts in the appropriate folder in `/ComplementaryScripts` and data (as `.tsv` files) in the appropriate folder in `/ComplementaryData`. If you think no folder is adequate for your script/data, feel free to create your own folder. Note that binary data such as `.mat` structures or `.xls` tables cannot be stored in the repo (as they cannot be version-controlled, and they increment too much the size of the repo).
* Store scripts in the appropriate folder in `/code` and data (as `.tsv` files) in the appropriate folder in `/data`. If you think no folder is adequate for your script/data, feel free to create your own folder. Note that binary data such as `.mat` structures or `.xls` tables cannot be stored in the repo (as they cannot be version-controlled, and they increment too much the size of the repo).
* When you are done making changes, review locally your changes with `git diff` or any git client, to make sure you are modifying the model as you intended.

7. Commit your changes and push your branch to GitHub.
Expand Down Expand Up @@ -150,8 +150,8 @@ Follow all other steps in the same way. Also, when creating your pull request (o
### Reviewing pull requests

Every pull request must be approved by at least one reviewer before it can be merged. When reviewing someone else's pull request, keep in mind the following aspects:
* **Compatibility:** First of all, make sure that the model is still compatible with the loading/saving wrappers (`loadYeastModel.m` & `saveYeastModel.m`) and that no errors appear. Check also that [`dependencies.txt`](https://github.com/SysBioChalmers/yeast-GEM/blob/master/ModelFiles/dependencies.txt) does not change in any unexpected ways (e.g. an "unknown" toolbox version). Finally, ensure that the SBML fields `model metaid`, `model id` and `model name` never change, as if they change it would create a conflict in the next release.
* **Documentation:** Every change should be justified with a reference/link/argument. This can be provided as data in `/ComplementaryData`, or directly as a comment in the pull request.
* **Compatibility:** First of all, make sure that the model is still compatible with the loading/saving wrappers (`loadYeastModel.m` & `saveYeastModel.m`) and that no errors appear. Check also that [`dependencies.txt`](https://github.com/SysBioChalmers/yeast-GEM/blob/master/model/dependencies.txt) does not change in any unexpected ways (e.g. an "unknown" toolbox version). Finally, ensure that the SBML fields `model metaid`, `model id` and `model name` never change, as if they change it would create a conflict in the next release.
* **Documentation:** Every change should be justified with a reference/link/argument. This can be provided as data in `/data`, or directly as a comment in the pull request.
* **Reproducibility:** If there are any added scripts, make sure that if you run them, the model gets updated from how it was in `devel` to how it is in the pull request. For this, you may _locally_ switch to the corresponding branch, replace the `.xml` file with the one from `devel` before the changes, and run the associated scripts. Remember to stash any undesired changes afterwards.
* **Style:** Ensure that the changes to the model are compliant with the model's rxn/met/gene naming conventions (when unsure, take a look at a similar field in the model). Also, make sure that scripts have a compliant style, and datasets are straight-forward to understand.
* When commenting in the review, please comply with our [code of conduct](https://github.com/SysBioChalmers/yeast-GEM/blob/master/.github/CODE_OF_CONDUCT.md).
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/yaml-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: ibiqlik/[email protected]
with:
## File(s) or Directory, separate by space if multiple files or folder are specified
file_or_dir: ModelFiles/
file_or_dir: model/
## Custom configuration (as YAML source)
config_data: "{extends: default, rules: {line-length: disable}}"
## Format for parsing output [parsable,standard,colored,auto]
Expand All @@ -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('ModelFiles/yml/yeastGEM.yml')"
python -c "import cobra ; cobra.io.load_yaml_model('model/yeast-GEM.yml')"
7 changes: 0 additions & 7 deletions ModelFiles/dependencies.txt

This file was deleted.

71 changes: 39 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,63 @@
@@ -0,0 +1,94 @@
# yeast-GEM: The consensus genome-scale metabolic model of _Saccharomyces cerevisiae_

[![DOI](https://zenodo.org/badge/52777598.svg)](https://zenodo.org/badge/latestdoi/52777598) [![GitHub version](https://badge.fury.io/gh/sysbiochalmers%2Fyeast-gem.svg)](https://badge.fury.io/gh/sysbiochalmers%2Fyeast-gem) [![Join the chat at https://gitter.im/SysBioChalmers/yeast-GEM](https://badges.gitter.im/SysBioChalmers/yeast-GEM.svg)](https://gitter.im/SysBioChalmers/yeast-GEM?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

* Brief Model Description:
## Description

This repository contains the current consensus genome-scale metabolic model of _Saccharomyces cerevisiae_. It is the continuation of the legacy project [yeastnet](https://sourceforge.net/projects/yeast/). For the latest release please [click here](https://github.com/SysBioChalmers/yeast-GEM/releases).

* Model KeyWords:

**GEM Category:** species; **Utilisation:** experimental data reconstruction, multi-omics integrative analysis, _in silico_ strain design, model template; **Field:** metabolic-network reconstruction; **Type of Model:** reconstruction, curated; **Model Source:** YeastMetabolicNetwork; **Omic Source:** genomics, metabolomics; **Taxonomy:** _Saccharomyces cerevisiae_; **Metabolic System:** general metabolism; **Bioreactor**; **Strain:** S288C; **Condition:** aerobic, glucose-limited, defined media;

* Last update: 2021-04-07
## Citation

* Main Model Descriptors:
* If you use yeast-GEM please cite the yeast8 paper:
> Lu, H. et al. _A consensus S. cerevisiae metabolic model Yeast8 and its ecosystem for comprehensively probing cellular metabolism._ Nature Communications 10, 3586 (2019). https://doi.org/10.1038/s41467-019-11581-3.
* Additionally, all yeast-GEM releases are archived in [Zenodo](https://zenodo.org/badge/latestdoi/52777598), for you to cite the specific version of yeast-GEM that you used in your study, to ensure reproducibility. You should always cite the original publication + the specific version, for instance:
> _The yeast consensus genome-scale model [Lu et al. 2019], version 8.3.4 [Sánchez et al. 2019], was used._

|Taxonomy | Template Model | Reactions | Metabolites| Genes |
Find the citation details for your specific version [here](https://zenodo.org/search?page=1&size=20&q=conceptrecid:%221494182%22&sort=-publication_date&all_versions=True).

## Keywords:

**Utilisation:** experimental data reconstruction; multi-omics integrative analysis; _in silico_ strain design; model template
**Field:** metabolic-network reconstruction
**Type of model:** reconstruction; curated
**Model source:** [YeastMetabolicNetwork](http://doi.org/10.1038/nbt1492)
**Omic source:** genomics; metabolomics
**Taxonomic name:** _Saccharomyces cerevisiae_
**Taxonomy ID:** [taxonomy:559292](https://identifiers.org/taxonomy:559292)
**Genome ID:** [insdc.gca:GCA_000146045.2](https://identifiers.org/insdc.gca:GCA_000146045.2)
**Metabolic system:** general metabolism
**Strain:** S288C
**Condition:** aerobic, glucose-limited, defined media

## Model overview

|Taxonomy | Template model | Reactions | Metabolites| Genes |
|:-------:|:--------------:|:---------:|:----------:|:-----:|
|_Saccharomyces cerevisiae_|[Yeast 7.6](https://sourceforge.net/projects/yeast/)|4058|2742|1150|

This repository is administered by Benjamín J. Sánchez ([@BenjaSanchez](https://github.com/benjasanchez)), Division of Systems and Synthetic Biology, Department of Biology and Biological Engineering, Chalmers University of Technology.
**Last update:** 2021-06-24

## Installation

### Required Software - User:
### Required software - User:

* Matlab user:
* A functional Matlab installation (MATLAB 7.3 or higher).
* The [COBRA toolbox for MATLAB](https://github.com/opencobra/cobratoolbox).
* Python user: Python 3.4, 3.5, 3.6 or 3.7

### Required Software - Contributor:
### Required software - Contributor:

* Both of the previous Matlab requirements.
* The [RAVEN toolbox for MATLAB](https://github.com/SysBioChalmers/RAVEN).
* A [git wrapper](https://github.com/manur/MATLAB-git) added to the search path.

### Dependencies - Recommended Software:
### Dependencies - Recommended software:
* For Matlab, the [libSBML MATLAB API](https://sourceforge.net/projects/sbml/files/libsbml/MATLAB%20Interface/) (version 5.17.0 is recommended).
* [Gurobi Optimizer](http://www.gurobi.com/registration/download-reg) for any simulations.

### Installation Instructions
### Installation instructions
* For users: Clone it from [`master`](https://github.com/SysBioChalmers/yeast-GEM) in the Github repo, or just download [the latest release](https://github.com/SysBioChalmers/yeast-GEM/releases). If you work in python, please create an environment with all requirements:
```bash
pip install -r requirements/requirements.txt # installs all dependencies
Expand All @@ -52,38 +70,27 @@ This repository is administered by Benjamín J. Sánchez ([@BenjaSanchez](https:
Make sure to load/save the model with the corresponding wrapper functions!
* In Matlab:
```matlab
cd ./ComplementaryScripts
cd ./code
model = loadYeastModel(); % loading
saveYeastModel(model); % saving
```
* In Python:
```python
import ComplementaryScripts.io as io
import code.io as io
model = io.read_yeast_model() # loading
io.write_yeast_model(model) # saving
```

### Online Visualization/Simulation
### Online visualization/simulation

* You can visualize selected pathways of yeast-GEM and perform online constraint-based simulations using [Caffeine](https://caffeine.dd-decaf.eu/interactive-map), by creating a simulation with the latest yeast-GEM version available, and choosing any _S. cerevisiae_ map (currently only `iMM904` maps are available). Learn more [about Caffeine](https://caffeine.dd-decaf.eu).
* Additionally, you can interactively navigate model components and visualize 3D representations of all compartments and subsystems of yeast-GEM at [Metabolic Atlas](https://metabolicatlas.org/explore?selected=Yeast-GEM). Learn more [about Metabolic Atlas](https://www.metabolicatlas.org/about).

## Model Files

The model is available in `.xml`, `.txt`, `.yml`, `.mat` and `.xlsx` (the last 2 extensions only in `master`). Additionally, the following 2 files are available:
* `dependencies.txt`: Tracks versions of toolboxes & SBML used for saving the model.
* `boundaryMets.txt`: Contains a list of all boundary metabolites in model, listing the id and name.

## Citation

* If you use yeast-GEM please cite the yeast8 paper:
> Lu, H. et al. _A consensus S. cerevisiae metabolic model Yeast8 and its ecosystem for comprehensively probing cellular metabolism._ Nature Communications 10, 3586 (2019). https://doi.org/10.1038/s41467-019-11581-3.

* Additionally, all yeast-GEM releases are archived in [Zenodo](https://zenodo.org/badge/latestdoi/52777598), for you to cite the specific version of yeast-GEM that you used in your study, to ensure reproducibility. You should always cite the original publication + the specific version, for instance:
> _The yeast consensus genome-scale model [Lu et al. 2019], version 8.3.4 [Sánchez et al. 2019], was used._

Find the citation details for your specific version [here](https://zenodo.org/search?page=1&size=20&q=conceptrecid:%221494182%22&sort=-publication_date&all_versions=True).

## Contributing

Contributions are always welcome! Please read the [contributions guideline](https://github.com/SysBioChalmers/yeast-GEM/blob/master/.github/CONTRIBUTING.md) to get started.

## Contributors

Code contributors are reported automatically by GitHub under [Contributors](https://github.com/SysBioChalmers/yeast-GEM/graphs/contributors), while other contributions come in as [Issues](https://github.com/SysBioChalmers/yeast-GEM/issues).
No newline at end of file
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

%Correct some gene relations based on isce926:
fid = fopen('../../ComplementaryData/modelCuration/iSce926curatedGeneRules.tsv');
fid = fopen('../../data/modelCuration/iSce926curatedGeneRules.tsv');
newRules = textscan(fid,'%s %s %s %s %s','Delimiter','\t','HeaderLines',1);
fclose(fid);

Expand All @@ -23,7 +23,7 @@
end

%Add new genes based on isce926:
fid1 = fopen('../../ComplementaryData/modelCuration/iSce926newGenes.tsv');
fid1 = fopen('../../data/modelCuration/iSce926newGenes.tsv');
newGenes = textscan(fid1,'%s %s %s %s %s','Delimiter','\t','HeaderLines',1);
fclose(fid1);

Expand All @@ -36,7 +36,7 @@
end

%Add gene standard name for new gene from isce926:
fid2 = fopen('../../ComplementaryData/databases/SGDgeneNames.tsv');
fid2 = fopen('../../data/databases/SGDgeneNames.tsv');
SGD = textscan(fid2,'%s %s','Delimiter','\t','HeaderLines',1);
fclose(fid2);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
cd otherChanges

%Load data from Forster 2003:
fid = fopen('../../ComplementaryData/physiology/biomassComposition_Forster2003.tsv');
fid = fopen('../../data/physiology/biomassComposition_Forster2003.tsv');
Forster2003 = textscan(fid,'%s %s %f32 %f32 %s','Delimiter','\t','HeaderLines',1);
data.mets = Forster2003{1};
data.abundances = double(Forster2003{3});
Expand Down Expand Up @@ -56,7 +56,7 @@

%Correct with data from biomassComposition_Cofactor_Ion:
data_original = data;
fid = fopen('../../ComplementaryData/physiology/biomassComposition_Cofactor_Ion.tsv');
fid = fopen('../../data/physiology/biomassComposition_Cofactor_Ion.tsv');
Cofactors = textscan(fid,'%s %s %f32 %f32 %s %s','Delimiter','\t','HeaderLines',1);
data.mets = Cofactors{1};
data.abundances = double(Cofactors{3});
Expand All @@ -79,7 +79,7 @@
[X,P,C,R,~,~,~,~] = sumBioMass(model);

%Correct with data from Lahtvee 2017:
fid = fopen('../../ComplementaryData/physiology/biomassComposition_Lahtvee2017.tsv');
fid = fopen('../../data/physiology/biomassComposition_Lahtvee2017.tsv');
Lahtvee2017 = textscan(fid,'%s %s %f32 %f32 %s','Delimiter','\t','HeaderLines',1);
data2.mets = Lahtvee2017{1};
data2.names = Lahtvee2017{2};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
model = loadYeastModel;

%Load data:
fid = fopen('../ComplementaryData/modelCuration/Missingmetaboliteformulas.tsv','r');
fid = fopen('../data/modelCuration/Missingmetaboliteformulas.tsv','r');
metaboliteData = textscan(fid,'%s %s %s %s %f32 %s','Delimiter','\t','HeaderLines',1);
fclose(fid);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
model_SLIMEr.S(Ppos,bioRxn) = +GAM;

%Save model & return to origin:
cd ../../yeast-GEM/complementaryScripts
cd ../../yeast-GEM/code
saveYeastModel(model_SLIMEr);
cd otherChanges

Expand Down
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('../ModelFiles/mat/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('../ModelFiles/xml/yeastGEM.xml');
model = readCbModel('../model/yeast-GEM.xml');

%Include tag and save model:
model.modelID = ['yeastGEM_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},'ModelFiles/xml/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,19 +98,19 @@ function increaseVersion(bumpType)
delete('backup');

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

%Convert to RAVEN format and store model as .xlsx:
model = ravenCobraWrapper(model);
model.annotation.defaultLB = -1000;
model.annotation.defaultUB = +1000;
model.annotation.taxonomy = 'taxonomy/559292';
model.annotation.givenName = 'Benjamin';
model.annotation.familyName = 'Sanchez';
model.annotation.email = 'bensan@chalmers.se';
model.annotation.givenName = 'Eduard';
model.annotation.familyName = 'Kerkhoven';
model.annotation.email = 'eduardk@chalmers.se';
model.annotation.organization = 'Chalmers University of Technology';
model.annotation.note = 'Saccharomyces cerevisiae - strain S288C';
exportToExcelFormat(model,'../ModelFiles/xlsx/yeastGEM.xlsx');
exportToExcelFormat(model,'../model/yeast-GEM.xlsx');

%Update version file:
fid = fopen('../version.txt','wt');
Expand Down
Loading