Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

leonardlab/PlantDX_GAMES

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlantDX_GAMES

This repository contains supporting code for the Plant-DX modeling work. This work utilizes the Dray, et al. GAMES conceptual workflow, and is currently using the GAMES v1.0.1 framework. See details below regarding how to setup the code and conduct a test run to produce plots of the modeling objectives for the base case Plant-Dx model, and fit/ comparison to a dataset from the COVID-Dx system.

PLANNED UPDATES

this codebase is under construction to:

  1. add an additional mechanism to the base case model, supported by data from the COVID-Dx system.
  2. refactor the model code into the GAMESv2.0.0 framework, from the GAMESv1.0.1 framework. "COVID-Dx" will also be removed from all file names that contain it in this step.

SETUP ON YOUR DEVICE

macOS:

1. install dependencies with your preferred package manager (I recommend conda--i.e. anaconda or miniconda-- or pip):

  • dependencies:
    python >=3.7
    lmfit >=0.9.14
    matplotlib >=3.1.3
    numpy >=1.18.1
    pandas >=1.0.5
    salib >=1.3.8
    scipy >=1.4
  • install with conda:
    conda install <package_name>
  • install with pip:
    pip install <package_name>

2. clone the repo with the http or ssh url

(I usually recommend ssh, but http* is easier and does not require additional setup):

  • using the terminal (on macOS), cd into the directory in which you would like the repo to be cloned. To clone the repo into a directory with the same name as the repo use the following command (for http**):
    git clone https://github.com/leonardlab/PlantDX_GAMES.git
*cloning with http requires that you login to your github account
**to clone with ssh, use the ssh url instead of the http url.

3. make results folder:

in the directory of your local PlantDX_GAMES repo, make a new directory named "Results". Files from each run of the code will be saved there.

4. update the required paths in the code files to make them executable on your machine:

  • Change results_folder_path to correct absolute path to results folder in:
    -- Saving.py
  • Change paper.mplstyle.py path to correct absolute path in:
    -- Analysis.py,
    -- Run.py,
    -- Test.py
  • Change path_exp to correct absolute path in:
    -- Settings.py
  • Change df_data and df_error paths to correct absolute paths in:
    -- Run.py
  • Change num_cores to match the number of cores on your device in:
    -- Run.py
    -- each instance instance of mp.pool() in Run.py
Absolute paths are strongly recommended for any instance of a path within the code.
(Run.py threw errors for me when running the code with relative paths in the past, so I recommend avoiding them if possible.)

windows:

(information based on GAMESv1.0.0 readme):

The parallelization component of this code was written using Python’s multiprocessing package, which has a different implementation on mac vs. windows OS. This code was run and tested on macOS and is not currently set up to support any other OS.
However, GAMES v1.0.1 code was successfully run on Linux, and on Windows without parallelization.
If you are a Windows user, we recommend setting parallelization = ‘no’ on line XXX in Run.py to use a version of the code that does not use parallelization. However, this particular model is not well suited to run without parallelization and there is a chance it is not feasible for the iterative, parameter estimation code.

TEST RUNNING THE CODE:

update the following in Settings.py:

  • folder_name
    (will overwrite previous results if not updated each time before running)

The code is now ready to run.

The test run will solve the model ODEs using the best fit parameters for fitting to a slice of the dataset from the high throughput experiment (from the COVID-Dx system). It will then plot each of the 6 modeling objectives, as described in the COVID-Dx manuscript (in preparation). Plots and experimental summary metrics will be saved in the folder of the name <folder_name> (from above), which will be created within the Results directory you created in the code setup.

To execute the test run, run the Test_COVID_Dx.py file.


Key information from GAMESv1 code releases:

This code is associated with the Dray, K.E. et al. ACS Synthetic Biology manuscript "GAMES: A dynamic model development workflow for rigorous characterization of synthetic genetic systems". *please contact corresponding author J.N. Leonard for a copy of the manuscript if needed.

Detailed descriptions of the files and functions in this repository are included in the Supplementary Information (Supplementary Notes 2-3) of the manuscript. Simulation outputs associated with the manuscript are included as Supplementary Data 1. Test.py and Run.py are the executable files. Settings.py can be used to change the settings for different simulation runs.

RELEASE NOTE v1.0.1: The previous release of this code included an incorrect standard error value to define the error distribution used to randomly add noise to data points, leading to a slightly smaller error distribution. This new release uses the appropriate value, which will slightly impact some figures relating to generation of PEM evaluation data and calculation of PPL thresholds. To reproduce the figures exactly as in the manuscript, please use the initial release of the code (v1.0.0).


Citation from COVID-Dx private repository:

This code is associated with Chapter 3 of Dr. Kate Dray's PhD thesis (Northwestern University, Chemical Engineering) and follows the GAMES conceptual workflow. The code presented here uses v1.0.1 of the GAMES software package (along with Python 3.7). Other package requirements can be found in the documentatation for v1.0.1 on the GAMES code (or above).

About

supporting code for the Plant-DX model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published