Skip to content

Commit

Permalink
yeast 8.6.3 (#339)
Browse files Browse the repository at this point in the history
* chore: update workflows (#333)

* chore: update gh workflow dependencies

* revert: latest yamllint action has issues

* fix: loosen python vesion requested by workflow

* chore: relax workflow dependency

* revert: use of git history in workflow

* Volatile Esters & Polyphosphate Reactions (#337)

* initial fork, xlsx data

* allowing xlsx files

* csv overview file v1

* feat-rxn: volatile esters & polyphosphate reactions

* chore: remove additional model files

* Revert "initial fork, xlsx data"

This reverts commit 9699677.

* refactor: reorganize reconstruction script and data files

* fix: correct identifiers, subsystems, notes, EC numbers etc.

* chore: rerun v8_6_2.m

- change in reaction r_0226 is because previous run used model 8.6.1 as input, not 8.6.2

* fix: update mention to correct PR

* fix: remove unused metabolites & correct subsystem

---------

Co-authored-by: Ulf Liebal <[email protected]>

* fix: install dependencies in workflow (#341)

* fix: install dependencies in workflow

* refactor: create .env in previous workflow step

---------

Co-authored-by: Mihail Anton <[email protected]>
Co-authored-by: Ulf Liebal <[email protected]>
  • Loading branch information
3 people authored Jul 7, 2023
1 parent 3be6d1c commit 3eeeaa1
Show file tree
Hide file tree
Showing 19 changed files with 4,120 additions and 521 deletions.
105 changes: 52 additions & 53 deletions .github/workflows/memote-history.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,55 @@ jobs:
memote-history:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: '3.9.7'

- name: Install memote
run: pip install -r code/requirements/ci-requirements.txt

- name: Setup variables
id: setup
run: |
echo "::set-output name=history::history_report.html"
echo "::set-output name=deployment::$(awk -F '=' '{if (! ($0 ~ /^;/) && $0 ~ /deployment/) print $2}' memote.ini | tr -d ' ')"
echo "::set-output name=other-repo::gh-pages-repo"
- name: Checkout repo for gh-pages branch
uses: actions/checkout@v2
with:
repository: ${{ github.repository }}
ref: ${{ steps.setup.outputs.deployment }}
path: ${{ steps.setup.outputs.other-repo }}

# - name: Convert model
# run: |
# touch .env
# python -c 'import code.io as io; model = io.read_yeast_model(make_bigg_compliant=True); io.write_yeast_model(model)'

- name: Memote short run
run: |
git config --global user.name "memote-bot"
memote run --skip-unchanged --solver-timeout 30
- name: Compute Memote history on push
run: |
# Generate the history report on the deployment branch
memote report history --filename="${{ steps.setup.outputs.other-repo }}/${{ steps.setup.outputs.history }}"
- name: Auto-commit results
uses: stefanzweifel/[email protected]
with:
commit_user_name: memote-bot
commit_message: "chore: update memote history report"
file_pattern: ${{ steps.setup.outputs.history }}
branch: ${{ steps.setup.outputs.deployment }}
repository: ${{ steps.setup.outputs.other-repo }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Install memote
run: pip install -r code/requirements/ci-requirements.txt

- name: Setup variables
id: setup
run: |
echo "::set-output name=history::history_report.html"
echo "::set-output name=deployment::$(awk -F '=' '{if (! ($0 ~ /^;/) && $0 ~ /deployment/) print $2}' memote.ini | tr -d ' ')"
echo "::set-output name=other-repo::gh-pages-repo"
- name: Checkout repo for gh-pages branch
uses: actions/checkout@v2
with:
repository: ${{ github.repository }}
ref: ${{ steps.setup.outputs.deployment }}
path: ${{ steps.setup.outputs.other-repo }}

# - name: Convert model
# run: |
# touch .env
# python -c 'import code.io as io; model = io.read_yeast_model(make_bigg_compliant=True); io.write_yeast_model(model)'

- name: Memote short run
run: |
git config --global user.name "memote-bot"
memote run --skip-unchanged --solver-timeout 30
- name: Compute Memote history on push
run: |
# Generate the history report on the deployment branch
memote report history --filename="${{ steps.setup.outputs.other-repo }}/${{ steps.setup.outputs.history }}"
- name: Auto-commit results
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: memote-bot
commit_message: "chore: update memote history report"
file_pattern: ${{ steps.setup.outputs.history }}
branch: ${{ steps.setup.outputs.deployment }}
repository: ${{ steps.setup.outputs.other-repo }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43 changes: 43 additions & 0 deletions .github/workflows/memote-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: memote release

on:
release:
type: [published]

jobs:
memote:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v3
with:
ref: main

- name: Checkout gh-pages branch
uses: actions/checkout@v3
with:
ref: gh-pages
path: gh-pages-repo

- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Install memote
run: pip install -r code/requirements/requirements.txt

- name: Memote run
run: |
memote report snapshot --solver-timeout 30 --filename="gh-pages-repo/release_report.html"
- name: Auto-commit results
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: memote-bot
commit_message: "chore: update memote release report"
file_pattern: release_report.html
branch: gh-pages
repository: gh-pages-repo
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 15 additions & 19 deletions .github/workflows/memote-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,20 @@ jobs:
memote-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Checkout
uses: actions/checkout@v2
- name: Create .env
run: touch .env

- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: '3.9.7'

- name: Install memote
run: pip install -r code/requirements/ci-requirements.txt

- name: Convert model
run: |
touch .env
python -c 'import code.io as io; model = io.read_yeast_model(make_bigg_compliant=True); io.write_yeast_model(model)'
- name: Memote on PR
run: |
# Untracked build, skip saving to gh-pages
memote run --ignore-git --solver-timeout 30
- name: Memote on PR
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/metabolicatlas/memote-docker:0.13
options: -v ${{ github.workspace }}:/opt
shell: bash
run: |
cd /opt
pip install -r code/requirements/ci-requirements.txt
python -c 'import code.io as io; model = io.read_yeast_model(make_bigg_compliant=True); io.write_yeast_model(model)'
memote run --ignore-git --solver-timeout 30
44 changes: 0 additions & 44 deletions .github/workflows/memote_release.yml

This file was deleted.

51 changes: 24 additions & 27 deletions .github/workflows/yaml-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,35 @@ name: YAML validation

on:
push:
branches: [ develop ]
branches: [develop]
pull_request:
branches: [ main, develop ]
branches: [main, develop]

jobs:
yaml-validation:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: YAML Lint
uses: ibiqlik/action-yamllint@v1
with:
## File(s) or Directory, separate by space if multiple files or folder are specified
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]
# format: # optional, default is colored
## Return non-zero exit code on warnings as well as errors
# strict: # optional, default is false

- name: YAML Lint
uses: ibiqlik/[email protected]
with:
## File(s) or Directory, separate by space if multiple files or folder are specified
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]
# format: # optional, default is colored
## Return non-zero exit code on warnings as well as errors
# strict: # optional, default is false

- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: '3.9.7'

- name: Import with cobrapy
run: |
pip install -r code/requirements/ci-requirements.txt
python -c "import cobra ; cobra.io.load_yaml_model('model/yeast-GEM.yml')"
- name: Import with cobrapy
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/metabolicatlas/memote-docker:0.13
options: -v ${{ github.workspace }}:/opt
shell: bash
run: |
cd /opt
python -c "import cobra ; cobra.io.load_yaml_model('model/yeast-GEM.yml')"
18 changes: 2 additions & 16 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.2 | 4063 | 2744 | 1160 |

### Gene essentiality prediction

- Accuracy: 0.881
- True non-essential genes: 926
- 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_ | 07-Jun-2023 | develop | 4099 | 2768 | 1161 |

# Installation & usage

Expand Down Expand Up @@ -117,4 +103,4 @@ Contributions are always welcome! Please read the [contributions guideline](http

## 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).
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).
49 changes: 49 additions & 0 deletions code/modelCuration/v8_6_2.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
% This scripts applies curations to be applied on yeast-GEM release 8.6.2.
% 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.2 (requires local yeast-GEM git repository)
cd ..
model = getEarlierModelVersion('8.6.2');
model.id='yeastGEM_develop';
dataDir=fullfile(pwd(),'..','data','modelCuration','v8_6_2');
cd modelCuration

%% Volatile Esters & Polyphosphate Reactions (PR #336)
% See https://github.com/SysBioChalmers/yeast-GEM/pull/336 for more detailed
% explanation of what changes were made by including 8 new distinct ester
% reactions and polyphosphate synthesis and transport reactions.

%% Curate gene association for transport rxns (PR #306)
% Add new reactions and genes
metsInfo = fullfile(dataDir,'VolPolyPMets.tsv');
genesInfo = fullfile(dataDir,'VolPolyPGenes.tsv');
rxnsCoeffs = fullfile(dataDir,'VolPolyPRxnsCoeffs.tsv');
rxnsInfo = fullfile(dataDir,'VolPolyPRxns.tsv');

model = curateMetsRxnsGenes(model, metsInfo, genesInfo, rxnsCoeffs, rxnsInfo);


%% 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
2 changes: 2 additions & 0 deletions data/modelCuration/v8_6_2/VolPolyPGenes.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
genes geneShortName ncbigene refseq uniprot kegg.genes ecogene hprd asap ccds ncbiprotein
YJL012C VTC4 853441 NM_001181446 P47075 sce:YJL012C NP_012522
Loading

0 comments on commit 3eeeaa1

Please sign in to comment.