Skip to content

Update README.md

Update README.md #4

name: Update MEMOTE report and model files for ESCHER maps
on:
workflow_dispatch:
push:
paths:
- 'models/iCstr1054FB23.xml'
- 'models/iCstr1197FB23.xml'
- 'models/iCstr1115FB23.xml'
- 'models/iCstr1116FB23.xml'
- 'models/iCstrKCNa01FB23.xml'
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.9'
- name: Install dependencies
run: python -m pip install markupsafe==2.0.1
- name: Install dependencies ESCHER
run: |
python -m pip install pandas
python -m pip install cobra
python -m pip install escher
- name: Install dependencies MEMOTE
run: python -m pip install memote
- name: Convert all models to json
uses: jannekem/run-python-script-action@v1
with:
script: |
import cobra
import pandas as pd
model_TS = cobra.io.read_sbml_model('./models/iCstr1054FB23.xml')
df_TS = pd.DataFrame.from_dict([model_TS.optimize().fluxes]).T
df_TS.to_csv('./escher/iCstr1054FB23_FBA.csv')
cobra.io.save_json_model(model_TS, './escher/iCstr1054FB23.json')
model_1197 = cobra.io.read_sbml_model('./models/iCstr1197FB23.xml')
df_1197 = pd.DataFrame.from_dict([model_1197.optimize().fluxes]).T
df_1197.to_csv('./escher/iCstr1197FB23_FBA.csv')
cobra.io.save_json_model(model_1197, './escher/iCstr1197FB23.json')
model_1115 = cobra.io.read_sbml_model('./models/iCstr1115FB23.xml')
df_1115 = pd.DataFrame.from_dict([model_1115.optimize().fluxes]).T
df_1115.to_csv('./escher/iCstr1115FB23_FBA.csv')
cobra.io.save_json_model(model_1115, './escher/iCstr1115FB23.json')
model_1116 = cobra.io.read_sbml_model('./models/iCstr1116FB23.xml')
df_1116 = pd.DataFrame.from_dict([model_1116.optimize().fluxes]).T
df_1116.to_csv('./escher/iCstr1116FB23_FBA.csv')
cobra.io.save_json_model(model_1116, './escher/iCstr1116FB23.json')
model_KC = cobra.io.read_sbml_model('./models/iCstrKCNa01FB23.xml')
df_KC = pd.DataFrame.from_dict([model_KC.optimize().fluxes]).T
df_KC.to_csv('./escher/iCstrKCNa01FB23_FBA.csv')
cobra.io.save_json_model(model_KC, './escher/iCstrKCNa01FB23.json')
- name: Create memote report in difference mode for all models
run: |
memote report diff --filename "GEM_status.html" models/iCstr1054FB23.xml models/iCstr1197FB23.xml models/iCstr1115FB23.xml models/iCstr1116FB23.xml models/iCstrKCNa01FB23.xml
- name: Commit ESCHER basics and memote report
id: commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "famosab"
git add --all
if [-z "$(git status --porcelain)"]; then
echo "::set-output name=push::false"
else
git commit -m "Update Memote Report and Escher basics" -a
echo "::set-output name=push::true"
fi
- name: Push changes of the report
if: steps.commit.outputs.push == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}