Skip to main content

Spateo: multidimensional spatiotemporal modeling of single-cell spatial transcriptomics

Project description

documentation

Installation - Tutorials - API - Citation - Technical

Citation

Xiaojie Qiu1$*, Daniel Y. Zhu3$, Jiajun Yao2, 4, 5, 6$, Zehua Jing2, 4,7$, Lulu Zuo8$, Mingyue Wang2, 4, 9, 10$, Kyung Hoi (Joseph) Min11, Hailin Pan2, 4, Shuai Wang2, 4, 7, Sha Liao4, Yiwei Lai4, Shijie Hao2, 4, 7, Yuancheng Ryan Lu1, Matthew Hill17, Jorge D. Martin-Rufino17, Chen Weng1, Anna Maria Riera-Escandell18, Mengnan Chen2, 4, Liang Wu4, Yong Zhang4, Xiaoyu Wei2, 4, Mei Li4, Xin Huang4, Rong Xiang2, 4, 7, Zhuoxuan Yang4, 12, Chao Liu4, Tianyi Xia4, Yingxin Liang10, Junqiang Xu4,7, Qinan Hu9, 10, Yuhui Hu9, 10, Hongmei Zhu8, Yuxiang Li4, Ao Chen4, Miguel A. Esteban4, Ying Gu2, 4,7, Douglas A. Lauffenburger3, Xun Xu2, 4, 13, Longqi Liu2, 4, 14, 15*, Jonathan S. Weissman1,19, 20*, Shiping Liu2, 4, 14, 15, 16*, Yinqi Bai2, 4* $Co-first authors; *:Corresponding authors

Spateo: multidimensional spatiotemporal modeling of single-cell spatial transcriptomics

https://www.biorxiv.org/content/10.1101/2022.12.07.519417v1

Abstract

Cells do not live in a vacuum, but in a milieu defined by cell–cell communication that can be measured via emerging high-resolution spatial transcriptomics approaches. However, analytical tools that fully leverage such data for kinetic modeling remain lacking. Here we present Spateo (aristoteleo/spateo-release), a general framework for quantitative spatiotemporal modeling of single-cell resolution spatial transcriptomics. Spateo delivers novel methods for digitizing spatial layers/columns to identify spatially-polar genes, and develops a comprehensive framework of cell-cell interaction to reveal spatial effects of niche factors and cell type-specific ligand-receptor interactions. Furthermore, Spateo reconstructs 3D models of whole embryos, and performs 3D morphometric analyses. Lastly, Spateo introduces the concept of “morphometric vector field” of cell migrations, and integrates spatial differential geometry to unveil regulatory programs underlying various organogenesis patterns of Drosophila. Thus, Spateo enables the study of the ecology of organs at a molecular level in 3D space, beyond isolated single cells.

Spateo

Highlights of Spateo:

  • Spateo introduces a sophisticated approach, Starro, to segment single cells based purely on RNA signal, unsupervisedly identifies continuous tissue domains via spatially-constrained clustering, and dissect the intricate spatial cell type distribution and tissue composition;

  • Spateo identifies spatial polarity/gradient genes (e.g. neuronal layer specific genes) by solving a partial differential equation to digitize layers and columns of a spatial domain.

  • Spateo implements a full suite of spatially-aware modules for differential expression inference, including novel parametric models for spatially-informed prediction of cell-cell interactions and interpretable estimation of downstream effects.

  • Spateo enables reconstruction of 3D whole-organ models from 2D slices, identifying different “organogenesis modes” (patterns of cell migration during organogenesis) for each organ and quantifying morphometric properties (such as organ surface area, volume, length and cell density) over time.

  • Spateo brings in the concept of the “morphometric vector field” that predicts migration paths for each cell within an organ in a 3D fashion and reveals principles of cell migration by exploring various differential geometry quantities.

Spateo Development Process

  • Follow feature-staging-main review process
    • create a specific branch for new feature
    • implement and test on your branch; add unit tests
    • create pull request
    • discuss with lab members and merge into the main branch once all checks pass
  • Follow python Google code style

Code quality

  • File and function docstrings should be written in Google style
  • We use black to automatically format code in a standardized format. To ensure that any code changes are up to standard, use pre-commit as such.
# Run the following two lines ONCE.
pip install pre-commit
pre-commit install

Then, all future commits will call black automatically to format the code. Any code that does not follow the standard will cause a check to fail.

Unit testing

Unit-tests should be written for most functions. To run unit tests, simply run the following.

# Install ONCE.
pip install -r dev-requirements.txt

# Run test
make test

Any failing tests will cause a check to fail.

Documentation

We use sphinx to generate documentation. Importantly, we used the submodule functionality to import documentation from a separate repository (https://github.com/aristoteleo/spateo-tutorials). It is important to keep the submodule up to date with the main repository and the following commands will help you do so.

Update All Submodules at Once:

  1. Fetch and Merge Changes for All Submodules:

    You can fetch the latest changes for all submodules and merge them into your current checkouts of the submodules:

    git submodule update --remote --merge
    
  2. Commit the Updated Submodules:

    This step is important because the parent repository tracks a specific commit of the submodule. By updating the submodule, the parent repository needs to be informed of the new commit to track.

    git add .
    git commit -m "Updated all submodules"
    git push
    

Once you are done the above, check the link directory (something like spateo-tutorials @ 8e372ee) under the docs folder to make sure the related commit (such as 8e372ee) is the same as the latest one in the spateo-tutorials repository. If not, you may need to redo the above procedure again.



Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spateo-release-1.1.0.tar.gz (621.4 kB view details)

Uploaded Source

Built Distribution

spateo_release-1.1.0-py3-none-any.whl (742.0 kB view details)

Uploaded Python 3

File details

Details for the file spateo-release-1.1.0.tar.gz.

File metadata

  • Download URL: spateo-release-1.1.0.tar.gz
  • Upload date:
  • Size: 621.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for spateo-release-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b1f540aef39bc91a487b63fcd42e3e61cddb9179bf4198e13000fd31f27edcef
MD5 c12238436a435a52fdb9be57cf264e93
BLAKE2b-256 772da58dad63d9aca089ec249169b22a3c52ff9f6eea9a6edc0bd68251f13b3a

See more details on using hashes here.

File details

Details for the file spateo_release-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for spateo_release-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01161a47cf0ad5fe30e69c97351a3b70842b2367d004692fbf3c8b8aea2d2684
MD5 782ec90b2585fa6ed807740ce490365f
BLAKE2b-256 8924cb010342a12cbb7c01361f42d8573a212707735674d73d2cd489d7e678eb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page