Welcome to the public repository for our master's thesis project Systems Biology at the Vrije Universiteit Amsterdam, supervised by Frank J. Bruggeman and Gregory Bokinsky.
This repository contains the code, data, and scripts used to model and analyze three interconnected biosynthetic pathways: Fatty Acid Synthesis (FAS), Lipopolysaccharide (LPS) Synthesis, and Phospholipid Synthesis (PLS).
It was used to study how growth perturbations affect the membrane phospholipid composition.
This integrated model stands on the shoulders of existing work. This includes, among countless others:
- Fatty Acid Synthesis (FAS): The FAS pathway kinetics are adapted and built upon the model by Ruppe et al. (2020). (Referenced in our files and data as the "Fox" model).
- Lipopolysaccharide Synthesis (LPS): The LPS pathway kinetics are adapted from the model by Emiola et al. (2015).
- Experimental Data: Used to compare our simulated steady-state concentrations to by Noga et al. (2020).
To run the models and scripts in this repository, we used the following environment:
- Mathematica: Version 14.3
- Python: Version 3.12.3
You can install the exact versions used during development by saving the block below as a requirements.txt file, or simply reference them here:
numpy==1.26.4
pandas==2.1.4
matplotlib==3.6.3
scipy==1.11.4
To install these dependencies all at once, run this command in your terminal:
pip install -r requirements.txtHere is a map of how the files are organized:
These Wolfram Mathematica (.nb) notebooks are the core of the project.
NewModel.nb: The primary notebook containing the multi-pathway model for steady state concentration simulations.NewModelOptimization.nb: The optimization of the product inhibition parameter.NewModelStoichioCheck.nb: Stoichiometric analysis using a package for the new model.FoxModel.nb: The model for the FAS, adapted from MATLAB.FoxModelStoichioCheck.nb: Stoichiometric analysis using a package for the FAS model.
All the parameters, equations, and experimental values that feed into the simulations.
FAS/: Kinetic parameters, total enzyme concentrations, import/export equations, and ODE layouts (for both 2020 and 2022 versions of the reference model) in CSV and Excel formats.LPS/: ODEs, rates, and enzyme concentrations for the Lipopolysaccharide pathway.PLS/: ODEs, rates, and enzyme concentrations for the Phospholipid pathway.new_model/: Initial concentration values (inits) and ODE setups specifically formatted for our integrated model.experimental/: Log-normal distribution datasets for ACP, PL (phospholipids), and various enzyme concentrations.shared/: Kinetic parameters for Michaelis-Menten (MM) reactions and fixed concentration files for the FAS, LPS and PLS pathways.
A mix of Python and Mathematica scripts used for data conversion, formatting, parameter determination, and analysis.
MATLAB_to_Mathematica.nb: Converts raw MATLAB ODE structures into a format Mathematica can easily parse.combine_branches.nb: Helper script used to programmatically merge the different pathway branches and check their stoichiometry.mass_action_in_rates.py&y_to_metabolite.py: Python utility scripts for reexpressing ODEs and printing metabolite names.enzyme_concentration_estimation.nb&malonyl_Km_determination.nb: Dedicated notebooks for estimating enzyme concentrations and substrate affinities.efm_script/: Contains Python tools (calculate_efms.py,generate_reversibles.py) and MATLAB matrices (.mat) to compute Elementary Flux Modes (EFMs).plotting/: Python scripts to visualize simulated and experimental data.MM_LPS_exports.nb&MM_PLS_exports.nb: Notebooks containing the rates and ODEs for the branching pathways. Edit equations here!
metadata/: Includesvariable_mappings.xlsxto help you map variable names across different datasets.raw_input/: The original, unaltered MATLAB ODE representations we imported.raw_output/: Unprocessed simulation outputs, including genetic algorithm evolution metrics for optimizing PlsB beta.results/: Saved visualizations from our runs.
- Ensure you have Wolfram Mathematica installed (Version 14.3 recommended).
- Check the equations for the branches (
MM_[BRANCH]_exports.nb) and generate branch equations. - Run the
combine_branches.nbscript to merge the equations from the FAS, LPS and PLS. - Run the simulation notebooks in the
modelfolder.
If you want to run the Python scripts:
- Install the necessary Python packages listed above.
- Run the plotting scripts inside
scripts/plotting/, the EFM calculators inscripts/efm_script/, or others inscripts/always from the mainmodelfolder.
- EFM calculation in
efm_script/takes too long/freezes due to combinatorial explosion. - When saving best in generation to the Excel in
NewModelOptimization.nb, the best is compared against the parameter instead of fitness causing the tracking to stop if the parameter decreases. Use individuals dataset instead!