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.
This code has been tested on Ubuntu 18.04.2 LTS and Windows 10 using Python 3.11.
- Install python 3.11 and pip>=24.0.0.
- Install the dependencies for lxml. On Ubuntu or Debian:
sudo apt-get install libxml2-dev libxslt-dev python-dev- Create a new virtual environment.
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt(Alternatively, if you have pdm, you can run pdm sync.)
Run: python EMT_data_analysis/analysis_scripts/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
Run: python EMT_data_analysis/analysis_scripts/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.
Run: python EMT_data_analysis/analysis_scripts/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.
Run: python EMT_data_analysis/analysis_scripts/Analysis_tools.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 functions in EMT_data_analysis/figure_generation can be used to generate 3D renderings shown in the paper. Functions have only been tested on Ubuntu 18.04/22.04
On Ubuntu or Debian:
sudo apt-get install xvfb libgl1-mesa-glxOn Windows:
Comment out any instance of pv.start_xvfb() in the code before running.
Run
python EMT_data_analysis/figure_generation/colony_mask.py --data_id [Optional] --output_directory [Optional]If no input arguments are provided, the code will default to the data shown in the paper and output results to EMT_data_analysis/results/3D_all_cells_mask.
Data ID values are only valid inputs if they have a none-empty value for All Cells Mask File Download in the image_and_segmentation_data.csv manifest on AWS
Run
python EMT_data_analysis/figure_generation/inside-outside_classification.py --data_id [Optional] --output_directory [Optional]If no input arguments are provided, the code will default to the data shown in the paper and output results to EMT_data_analysis/results/Inside-Outside/mesh-figures.
Data ID values are only valid inputs if they have a none-empty value for CollagenIV Segmentation Mesh Folder in the image_and_segmentation_data.csv manifest on AWS
If you have questions about this code, please reach out to us at [email protected].
All code in this repository is provided to you under the Allen Institute Software License.