Skip to content

warmflashlab/ZhuDevelopment2026

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ZhuDevelopment2026

This repository contains the code from the manuscript: Dependence of cell fate potential and cadherin switching on the coordinate within the primitive streak during differentiation of human pluripotent stem cells Authors: Ye Zhu and Aryeh Warmflash

Overview

This repository contains Python code for RNA sequencing analysis and MATLAB code used for the quantitative analysis of fixed and live cell imaging data as described in the manuscript.

The RNA sequencing code is presenting as a iPython notebook, the data can be found under accession number GSE317192

The imaging processing code code facilitates reproducible analysis of nuclear and membrane protein expression using custom image processing pipelines. The methods include nuclear segmentation, intensity profiling, directional sampling for fixed cells, and membrane-to-cell intensity ratio calculations for live cells. Notice that the work flow is designed to integrate with image pre-processing tools like FIJI and ilastik for initial segmentation, followed by advanced quantitative analysis in MATLAB.

Data Requirements for Fixed Cell Image Processing

To process fixed cell images, the following data preparation steps should be completed before running the MATLAB scripts:

  1. Raw Images Confocal microscopy images (in OIR format) should be acquired with four fluorescence channels: Channel 1: DAPI (nuclear marker) Channels 2-4: Protein markers of interest
  2. Maximum Intensity Projection Raw images must be processed in FIJI using a macro (createMAXProj.ijm) to generate maximum intensity projection (MaxProj) images (in TIFF format).
  3. Mask File Generation (Segmentation in ilastik) The MaxProj images should be used as input for ilastik to perform pixel-based segmentation and generate mask files in HDF5 (.h5) format.
  4. File Naming Convention Each image and corresponding mask file should be renamed based on the plate number, well number, and position number in the format: PXX_WYY_ZZ.tif (Example: P01_W01_01.tif) The same naming convention should also be applied to the .h5 mask files.
  5. Folder Organization All input files must be stored in a working directory with the following structure:

/working_folder ├── MAXProj/ # Stores Max Projection TIFF images │ ├── P01_W01_01.tif │ ├── P01_W01_02.tif │ ├── ... │ ├── MAXProj_ilastik/ # Stores mask files generated by ilastik │ ├── P01_W01_01.h5 │ ├── P01_W01_02.h5 │ ├── ... ├── AnalysisParamScript_IP.m └──singleCellMembraneQuant.m

Data Processing Steps for Fixed Cell Image Analysis

To analyze fixed cell images, follow these steps using the MATLAB scripts provided in the repository:

  1. Customize Analysis Parameters Open AnalysisParamScript_IP.m and modify the parameters to match your experiment setup. Set relevant parameters such as file paths, segmentation thresholds, and analysis conditions.
  2. Run Image Processing and Quantification Open singleCellMembraneQuant.m and run the script section by section to process images and extract quantitative data. The script performs the following key operations: (1) Reads Max Projection TIFF images from the MAXProj/ folder. (2) Loads nuclear segmentation masks from the MAXProj_ilastik/ folder. (3.a)Computes single-cell nuclear intensity for nuclear-localized proteins. (3.b)Or applies directional membrane profiling to quantify membrane protein expression. (4)Stores per-cell intensity values in structured data arrays.
  3. Generate Data Visualizations After extracting single-cell protein intensities, the script provides options to visualize the data: (1) Violin plots to compare protein expression intensity distributions across experimental conditions. (2) Scatter plots to assess variability and correlation of expression levels.

Data Requirements for Live Cell Image Processing

  1. Raw Images Confocal microscopy images (in OIR format) should be acquired with three fluorescence channels:
  • Channel 1: CAAX (membrane marker)
  • Channel 2: E-Cad
  • Channel 3: N-Cad
  1. Concatenation of Multi-Day Imaging Data Imaging was performed over two days, with media change after day one. If two image files exist for the same position, merge them using concatenate_2_looped.ijm in FIJI. Output: A single TIFF file with all channels, Z-slices, and time points.
  2. Preprocessing with a01_preProcess.m (1) Extracting multi-channel fluorescence data. (2) Optional: Performing maximum intensity projection (MIP). (3) Applying pixel shift correction and background subtraction. (4) Saving processed TIFF images for quantification.
  3. Mask File Generation (Segmentation in ilastik) in HDF5 (.h5) format. (1) generate the membrane mask using channel 1 (membrane marker). (2) generate the dead cell mask using all channels.

Data Processing Steps for Live Cell Image Analysis (a02_runQuant.m)

This script processes live cell imaging data by extracting and analyzing membrane and cytoplasmic protein intensities over time.

  1. Define Input Directories Set experiment parameters, including: Raw image folder (contains preprocessed multi-channel images). ilastik mask folder (segmentation masks for membrane, background, and cell regions). Dead cell mask folder (segmentation masks identifying dead cells).
  2. Extract and Process Image Data For each condition and colony: (1) Read the preprocessed multi-channel TIFF file using bfGetReader. (2) Extract image properties. (3) Load segmentation masks from ilastik (readIlastikFile3). (4) Remove dead cell pixels from the original masks using removeDeadCellMask.
  3. Compute Membrane and Cell Intensity Measurements For each time point and Z slice, extract intensity values for: Membrane pixels,Cytoplasmic (non-membrane) pixels, Background pixels
  4. Calculate Intensity Ratios Using extracted intensities, compute Membrane-to-Cytoplasm Ratio (memToCell)
  5. Save Processed Data Store extracted single-cell intensity values and ratios in a structured Result cell array. Save the results as a MATLAB .mat file for further analysis.
  6. Load and Normalize Data Reload saved data from the .mat file. Normalize membrane-to-cytoplasm ratios for comparison across conditions.
  7. Generate Plots of E-Cad and N-Cad for each condition

To generate Timelapse movies with the time stamp and the scale bar, use SaveMovieWithTimeAndScaleBar.ijm in FIJI

About

Code from Zhu and Warmflash, Development 2026,

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors