Skip to content

Commit

Permalink
Merge pull request #356 from SysBioChalmers/develop
Browse files Browse the repository at this point in the history
yeast 8.7.1
  • Loading branch information
edkerk authored Oct 17, 2023
2 parents 0f94217 + 14ca363 commit 635d70d
Show file tree
Hide file tree
Showing 17 changed files with 24,017 additions and 1,578 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/memote-history.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
# MEMOTE wants to fetch all branches
with:
fetch-depth: 0


- name: Set up Python 3
uses: actions/setup-python@v4
with:
Expand All @@ -19,19 +21,12 @@ jobs:
- 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
uses: actions/checkout@v3
with:
repository: ${{ github.repository }}
ref: ${{ steps.setup.outputs.deployment }}
path: ${{ steps.setup.outputs.other-repo }}
ref: gh-pages
path: gh-pages-repo

# - name: Convert model
# run: |
Expand All @@ -40,21 +35,26 @@ jobs:

- name: Memote short run
run: |
git config --global user.name "memote-bot"
memote run --skip-unchanged --solver-timeout 30
memote run --ignore-git --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 }}"
git config --global user.name "memote-bot"
memote report history --filename="gh-pages-repo/history_report.html"
- name: Fetch async changes in gh-pages
run: |
cd gh-pages-repo
git pull
- 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 }}
file_pattern: history_report.html
branch: gh-pages
repository: gh-pages-repo
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 8 additions & 0 deletions .github/workflows/memote-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,21 @@ jobs:
with:
python-version: "3.9"

- name: Create .env
run: touch .env

- 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: Fetch async changes in gh-pages
run: |
cd gh-pages-repo
git pull
- name: Auto-commit results
uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/memote-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@ on: pull_request
jobs:
memote-run:
runs-on: ubuntu-latest
container:
image: ghcr.io/metabolicatlas/memote-docker:0.13
volumes:
- ${{ github.workspace }}:/project:rw
options: --user root --workdir /project

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create .env
run: touch .env

- 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
run: |
touch .env
cd /project
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Thumbs.db
*.mex*
*.mlappinstall
*.mltbx
*.mat
helpsearch*/

# Python-related things #
Expand All @@ -59,6 +60,7 @@ helpsearch*/

# Non-complying tables and files #
##################################
*.xls*
*.tab
*.doc*
*.ppt*
Expand Down
File renamed without changes.
16 changes: 1 addition & 15 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_ | 21-Jul-2023 | 8.7.0 | 4131 | 2806 | 1163 |

### Gene essentiality prediction

- Accuracy: 0.881
- True non-essential genes: 928
- True essential genes: 63
- False non-essential genes: 96
- False essential genes: 38

### Growth prediction

- Correlation coefficient R<sup>2</sup>: 0.842

![Growth curve](growth.png)
| _Saccharomyces cerevisiae_ | 16-Oct-2023 | develop | 4131 | 2806 | 1163 |

# Installation & usage

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

%% Add Uniprot IDs (PR #349)
% Gather Uniprot IDs with get_uniprot_id.py that is in dataDir.
uniprotFile = fullfile(dataDir,'SGD_with_Uniprot.csv');
fid = fopen(uniprotFile);
uniprot = textscan(fid,'%q %q %q','Delimiter',',','HeaderLines',1);
fclose(fid);

% Only keep data for genes that are in the model
uniprotGenes = uniprot{1,1};
uniprotIDs = uniprot{1,3};
isInModel = ismember(uniprotGenes,model.genes);
model = editMiriam(model,'gene',uniprotGenes(isInModel),'uniprot',uniprotIDs(isInModel),'add');

%% Corrent reaction name r_1024
rxnIdx = getIndexes(model,'r_1024','rxns');
model.rxnNames{rxnIdx} = 'sucrose hydrolyzing enzyme';

%% DO NOT CHANGE OR REMOVE THE CODE BELOW THIS LINE.
% Show some metrics:
cd(fullfile(codeDir,'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
Loading

0 comments on commit 635d70d

Please sign in to comment.