Skip to content

Study optimal single-cell microscopy experiment design in the presence of measurement errors.

License

Notifications You must be signed in to change notification settings

voduchuy/NoisyMeasurementFIM

Repository files navigation

NoisyMeasurementFIM

Code to reproduce numerical simulations and figures from the paper

Huy D. Vo, Linda Forero, Luis Aguilera, Brian Munsky. Analysis and design of single-cell experiments to harvest fluctuation information while rejecting measurement noise. Front. Cell Dev. Biol., 26 May 2023. DOI: 10.3389/fcell.2023.1133994.

Dependencies

For computing the FSP sensitivity solutions and MLE validations:

  • CME solvers: PACMENSL and PyPACMENSL (only for the FSP solutions).
  • PyGMO 2 (for MLE validations only).

For plotting the numerial results:

  • Python 3X.
  • NumPy 1.22.
  • Matplotlib.
  • Pandas.
  • A working installation of LaTex.

The dependency PACMENSL is a C++ library for parallel FSP solution of the chemical master equation. Follow the steps in the README file of that repository to compile the library. We note that it is only needed if the reader wishes to repeat the computation scripts. If the reader only wants to inspect the numerical results and reproduce the figures in the manuscript, only Python packages are needed. We provide convenient scripts and configuration files to set up a Python environment quickly for plotting the results (see below).

Setting up environment to reproduce figures

Downloading the numerical results

Readers who do not wish to repeat the time-consuming calculations (which requires installing the C++ dependencies and may require cluster access) may simply download the numerical results from Zenodo. A convenient Python script (download_results.py) is provided in the root folder that will download the Zip file, unpack, and populate the subfolders of the repository with .npz and .png files needed for plotting.

Setting up Python environment

This step requires that either Anaconda or Miniforge is installed on the reader's computer. An environment file environment.yml is provided in the root folder of this repository. Readers can use Anaconda to set up the Python environment for executing the notebooks by running the following command in Terminal:

conda env create -f environment.yml

This will create an environment named fimhuyvo2022 in the user's default environment path. The Python packages needed for executing the provided notebooks will be installed in this environment. Users can then activate the environment

conda activate fimhuyvo2022

Provided that the numerical outputs have been downloaded and the files are copied to the correct locations (see above), the Jupyter notebooks can be executed.

Note: The numerical results and notebooks were executed on an Apple Macbook with M1 chip for the publication. For the M1-specific environment that was used, see environment_macos.yml.

Executing the Jupyter notebooks

After the environment has been created and activated, user can run jupyter notebook from the Terminal, change dir to one of the subfolders bursting_gene, toggle_switch, yeast. A single Jupyter notebook is provided in each subfolder that produce all figures related to the corresponding CME (telegraph, 2-D toggle switch, or compartmental MAPK-activated gene expression).

Cleaning up

The Anaconda environment can be removed with

conda env remove -n fimhuyvo2022

About

Study optimal single-cell microscopy experiment design in the presence of measurement errors.

Resources

License

Stars

Watchers

Forks

Packages

No packages published