AllenCell / EMT_data_analysis

This repo contains code for EMT deliverable data analysis and has dependencies associated with output from EMT_image_analysis repo.
Other
1 stars 0 forks source link

EMT data analysis

This repository contains code for reproducing the plots shown in our manuscript [1]. This repository uses outputs generated by the EMT_image_analysis repository, such as image segmentations and 3D meshes.

[1] - A human induced pluripotent stem (hiPS) cell model for the holistic study of epithelial to mesenchymal transitions (EMTs)

Note

This code has been tested on Ubuntu 18.04.2 LTS and Windows 10 using Python 3.11.

Installation

  1. Install python 3.11 and pip>=24.0.0.
  2. Install the dependencies for lxml. On Ubuntu or Debian:
    sudo apt-get install libxml2-dev libxslt-dev python-dev
  3. Create a new virtual environment.
    python -m venv venv
    source venv/bin/activate
    pip install -e .

How to run:

1 - Feature extraction

Run: python Feature_extraction.py

This will generate one CSV for each movie with the extracted features. CSVs are stored in the folder EMT_data_analysis/results/feature_extraction

2 - Metric computation

Run: python Metric_computation.py

This will generate a single CSV containing information about all the movies to be used for analysis. The manifest is saved as EMT_data_analysis/results/metric_computation/Image_analysis_extracted_features.csv.

3 - Nuclei localization

Run: python Nuclei_localization.py

This will generate CSV for individual nuclei classified as inside the basement memebrane or not over the course of the timelapse for EOMES and H2B movies. The manifest is saved as EMT_data_analysis/results/nuclei_localization/Migration_timing_trough_mesh_extracted_feature.csv.

4 - Analysis Plots

Run: python Analysis_plots.py

This will generate the plots in the manuscript and store them in results/figures folder. The manifests used as inputs in this workflow are automatically downloaded from AWS by default. The user can opt to also use local version of these manifests if they produced locally by running the scripts Feature_extraction.py, Metric_computation.py and Nuclei_localization.py. To use local version of the manifests, please set load_from_aws=False everywhere in the script Analysis_plots.py.

Contact

If you have questions about this code, please reach out to us at cells@alleninstitute.org.

Licensing

All code in this repository is provided to you under the Allen Institute Software License.