Map 2D cellular shapes to disk, square and rectangle representations for analysis
Project description
u-Unwrap2D
Library for 2D Contour-guided computing and Shape parameterization
- Library Features
- Getting Started
- Dependencies and Installation
- Questions and Issues
- Developers
- Danuser Lab Links
:star2: Apr 2026 :star2:
- u-Unwrap is available in PyPI and can be directly installed with
pip install u-Unwrap
August 29, 2024
u-Unwrap2D is a Python library built on top of u-Unwrap3D to enable mapping of 2D contours and 2D shapes into canonical representations for registration and windowing to facilitate downstream analysis with particular attention to single cell biology.
The disk parameterization of u-Unwrap2D or u-Unwrap is described in the following manuscript, particularly with respect to spatiotemporal analysis of single cell morphodynamics: Mapping Cell Morphology to a Standard Coordinate System for Analyzing Dynamic Cell Signaling, Imageomics NeurIPS Workshop, 2025, written by Shiqiu Yu, Gaudenz Danuser, Felix Y. Zhou.
The contour-guided spatial windowing is briefly described in the following manuscript, and used to compare edge-based molecular signaling patterns across experimental conditions: Caveolin-1 regulates context-dependent signaling and survival in Ewing sarcoma, bioRxiv, 2025, written by Dagan Segal, Xiaoyu Wang, Hanieh Mazloom-Farisbaf, Felix Y. Zhou, Divya Rajendran, Erin Butler, Bingying Chen, Bo-Jui Chang, Khushi Ahuja, Averi Perny, Kushal Bhatt, Dana Kim Reed, Diego H. Castrillon, Jeon Lee, Elise Jeffery, Lei Wang, Khai Nguyen, Noelle S. Williams, Stephen X. Skapek, Satwik Rajaram, Reto Fiolka, Khuloud Jaqaman, Gary Hon, James F. Amatruda, Gaudenz Danuser.
The functions in this library on built on the idealogy of u-Unwrap3D for 2D. For more information please read: Surface-guided computing to quantify dynamic interactions between cell morphology and molecular signals in 3D, bioRxiv, 2025, written by Felix Y. Zhou, Virangika K. Wimalasena, Qiongjing Zou, Andrew Weems, Gabriel M. Gihana, Edward Jenkins, Bingying Chen, Bo-Jui Chang, Meghan K. Driscoll, Andrew J. Ewald and Gaudenz Danuser.
Library Features
u-Unwrap2D exposes differential geometric and image processing functions to primarily enable two core functionalities depicted in the banner image:
- Disk Parameterization of Cell Shape: The entire cell shape is mapped to a disk. As this involves metric distortion. u-Unwrap implements conformal mapping, equiareal mapping through a robust density-based relaxation scheme, and (in development), equidistant mapping based on redistributing vertices of the equiareal map.
- Contour-Guided Spatial Windowing: The cell contour is propagated using conformalized mean curvature flow implemented in an active contours scheme that allows additional regularization by gradient of a harmonic Poisson distance transform. This implementation as depicted allows flexible handling of highly complex, high-curvature cell geometries inaccessible by conventional methods. Compared to disk parameterization, contour-guided spatial windowing allows more equidistant propagation into the cell area, and is much more efficient to run for edge-centric analyses.
Additionally:
- An optimized diffeomorphic and gradient vector flow algorithm for consistent cell boundary tracking of highly morphodynamic shapes, (see
tutorial/example1_unwrap2Dpipeline.ipynb)
The library functions are provided through one module, which can be accessed by import unwrap2D.unwrap2D after installation.
| Module | Functionality |
|---|---|
| unwrap2D | Functions for unwrapping 2D contours and mapping images to disk and square representations. Much recycle/adapt u-Unwrap3D functions. |
Getting Started
The simplest way to get started is to check out the included notebooks in the tutorials/ folder of this GitHub which guides users using example data in the example_data/ folder through key steps of our NeurIPS 2025 Workshop paper for using u-Unwrap to perform consistent spatiotemporal windowing of a highly dynamic neutrophil cell.
- example1_unwrap2Dpipeline.ipynb: This notebook demonstrates the spatiotemporal analysis pipeline involving consistent edge boundary tracking and disk parameterization of each timepoint.
- example2_windowing_analysis.ipynb: This notebook is an example of spatial windowing on the disk parameterization and subsequent further analysis, including sampling the activity matrix (remapping signal activities), and visualization of the windows mapped back to the original cell shape.
Dependencies and Installation
PyPI Installation
u-Unwrap is available in PyPI. Install using pip:
pip install u-Unwrap
Manual Installation
You should be able to install the library using pip:
pip install .
Should this fail, the only dependency is u-Unwrap3D, our 3D unwrapping library which can be installed using the command below from PyPI or from its GitHub, https://github.com/DanuserLab/u-unwrap3D. u-Unwrap3D has been tested for Python 3.9-3.12. You can try installing that library first, then perform the above pip install ..
pip install u-Unwrap3D
Questions and Issues
Feel free to open a GitHub issue, and we will get back as soon as we can.
Developers
Felix Zhou (felixzhou1@gmail.com)
Shiqiu Yu (Shiqiu.Yu2@UTSouthwestern.edu)
Danuser Lab Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file u_unwrap-0.1.1.tar.gz.
File metadata
- Download URL: u_unwrap-0.1.1.tar.gz
- Upload date:
- Size: 71.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb71d1b2113c013506f0f19f58f3fbe89b4db2d420f9ac73f6961c9d40da0e98
|
|
| MD5 |
584584f391b40efe31f5cea498d3a55d
|
|
| BLAKE2b-256 |
c0572cb15ea4f0755be243178df704cb4ee910792e9f83340760be05cd8e337d
|
File details
Details for the file u_unwrap-0.1.1-py3-none-any.whl.
File metadata
- Download URL: u_unwrap-0.1.1-py3-none-any.whl
- Upload date:
- Size: 59.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
215769560d85e6bce0c7a6058238418930bfe14b81d2d4655ee45dfe6bc98bc6
|
|
| MD5 |
d3b34b17623ee3fabd276ad785a079d8
|
|
| BLAKE2b-256 |
ace9f7a7b254bb599847e4509d7bea67e7428149dc5bcf9e7c1389a00523eeee
|