This repository contains all required code and data to reproduce the figures in the paper 'Fast differentiation and sensitivity analysis of optimal flux modes in metabolic models'.
For those interested in calculating sensitivities of elementary flux modes and optimal flux modes in enzyme constrained genome scale metabolic models, please see the DifferentiableMetabolism.jl and ElementaryFluxModes.jl packages.
To reproduce the table and figures used in the paper, take the following steps:
- Download yeast-GEM v9.0.1 from
https://github.com/SysBioChalmers/yeast-GEM/archive/refs/tags/v9.0.1.zip - Extract the
yeast-GEM.matfile into the folderdata/data/yeastGEM.
- Download https://zenodo.org/records/6438262 (Li, F., Yuan, L., Lu, H. et al. Deep learning-based kcat prediction enables improved enzyme-constrained model reconstruction. Nat Catal 5, 662–672 (2022))
- Only the folders
ssGEMs,PredcitedKcat343species, andProteinfastaare required
The file paths to this dataset must be edited to match:
~/DifferentiableOFMPaper/data/data/fungi343species/ssGEMs
~/DifferentiableOFMPaper/data/data/fungi343species/PredcitedKcat343species,
~/DifferentiableOFMPaper/data/data/fungi343species/Proteinfasta,
- Download iML1515 from http://bigg.ucsd.edu/models/iML1515
- Save into the folder
~/DifferentiableOFMPaper/data/EColi
Raw timings calculated on an AMD Ryzen 9 5950X with 32 GB main memory are saved in data/results/timing.csv.
To calculate timings on one's own setup, first run the files in the folder data/code/yeastGEM in the order:
data/code/yeastGEM/curating.jldata/code/yeastGEM/gecko_setup.jlFollowed by running the file:src/TimeComparison/time_comparison.jlWe took an average of 10 runs to report in the paper, therefore this code is very slow.
Run the .jl files in the following order:
src/Fungi/setup/gecko_setup.jl: creates enzyme-constrained models of the ssGEMssrc/Fungi/sensitivities.jl: calculate the sensitivity of all model growth rates to their parameterssrc/Fungi/plotting.jl: plot the growth sensitivity per metabolic pathway
iML1515 model was taken from http://bigg.ucsd.edu/models/iML1515, to follow the curation steps to make an enzyme-constrained model, run:
data/code/EColi/gecko_setup.jl
If only interested in reproducing the figure, run:
src/EColi/efm.jl
As in Figure 2, running data/code/EColi/gecko_setup.jl is not necessary to reproduce the figure, but can be run to curate the model. To reproduce the figure, run:
src/EColi/acetate.jl