Skip to content

bioshape-analysis/cell_shape_analysis

Repository files navigation

Overview

This repository contains the code used for the analysis presented in:

A metric-space framework for cell motility: continuous trajectories and discrete states across physical and shape domains

by Pavel Buklemishev, Natalia Kravtsova, Clément Soubrier, Lilianna Houston, Lubna Tahtamuni, Ashok Prasad, and Dao Duc Khanh.

Abstract

Living cells change shape as they move, but physical movement and shape change naturally inhabit different mathematical spaces, making their relationship difficult to quantify. We propose a framework that decouples time-dependent cell motility data into two trajectories in metric spaces: a physical trajectory of the cell centroid in Euclidean space $(\mathbb{R}^2,d_E)$, and a shape trajectory of cell outlines in the 2-Wasserstein space $(\mathcal{W}^2,d_W)$, where shape differences are measured by the optimal-transport distance. The key structural observation is that classical motility statistics---path length, speed, and straightness---are functionals of pairwise distances alone, so they are well defined on any metric space and transfer verbatim from the physical to the shape domain; in the shape domain the speed then measures the rate of morphological remodeling and the straightness index measures proximity to a Wasserstein geodesic. We complement this continuous representation with a discrete one, quantizing cell outlines into polarization states via protrusion detection (conformal mean curvature flow) that, together with migration mode, form the state space of a Markov chain. The construction is cell-type-agnostic and applies to any time series of cell shapes. Applying the framework to a novel dataset of chicken fibroblast cells, we find that speed and straightness are strongly correlated across the two domains, that protrusive behavior is associated with migration mode, and that the long-run dynamics are captured by the stationary distribution of the fitted Markov chain.

Description

The repository includes code for:

  • segmenting cell trajectories and shapes and extracting tracking information (dataset_preprocessing/);
  • preprocessing cell outlines and trajectories (dataset_preprocessing/ and data/);
  • computing physical and shape trajectory statistics (straight_nonstraight_visualization/Physical_and_shape_trajectories.ipynb);
  • classifying cell behavior using quartile-based and DC-MSS frameworks (trajectory_classification/);
  • detecting protrusions using conformalized mean curvature flow-based shape representations (conformal_mapping/unwrapping_2D/unwrap2D) (in progress);
  • performing Markov chain analysis for cell states (not included yet; in progress).

Figures and Results from the Paper

The following manuscript figures and tables are currently linked to the code in this repository:

Manuscript item Source
Fig. 4 straight_nonstraight_visualization/Physical_and_shape_trajectories.ipynb
Fig. 5 straight_nonstraight_visualization/Physical_and_shape_trajectories.ipynb
Fig. 6D Not included yet
Fig. 6E Not included yet
Table 1 Not included yet
Fig. 7 Not included yet

Supplementary materials:

Supplementary item Source
Fig. S1 straight_nonstraight_visualization/Physical_and_shape_trajectories.ipynb
Fig. S2 Not included yet

Repository Structure

.
├── compute_ot_dataset
│   ├── centroids.npy
│   ├── compute_OT.py
│   ├── first_last_shape_distances.npy
│   ├── first_shapes.npy
│   ├── last_shapes.npy
│   ├── ot_distances.npy
│   └── times.npy
├── conformal_mapping
│   └── unwrapping_2D
│       └── unwrap2D
│           ├── __init__.py
│           ├── README.md
│           └── unwrap2D.py
├── data
│   ├── cells_filtered.zip
│   ├── cells.zip
│   └── filter_cells.py
├── dataset_preprocessing
│   ├── construct_dataset.py
│   ├── extract_individuals.py
│   ├── final_graph.py
│   ├── main.py
│   ├── plot_final_lineage_tree.py
│   ├── run_image_processing.ipynb
│   └── segmentation.py
├── README.md
├── straight_nonstraight_visualization
│   └── Physical_and_shape_trajectories.ipynb
└── trajectory_classification
    ├── classifier.m
    ├── time_events_filtered.h5
    └── trajectories_to_matlab.py

Data Availability

The data associated with this repository are available on Zenodo:

https://zenodo.org/records/21047731

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors