Spotiphy is a Python package for integrating sequencing-based spatial transcriptomics, scRNA-seq data, and high-resolution histological images. Using a probabilistic generative model, Bayesian inference, and advanced image processing, Spotiphy performs three key tasks:
- Deconvolution – Estimate the abundance of each cell type in every spatial capture area.
- Decomposition – Resolve bulk spatial transcriptomics data down to the single-cell level.
- Pseudo single-cell image reconstruction – Generate images with pseudo single-cell resolution, enabling reconstruction of cell neighborhoods.
These outputs enable a wide range of downstream analyses. For further details, see our Nature Methods publication.
Currently available tutorial:
- Mouse cortex analysis: Documentation | Google Colab
Full documentation is available at jyyulab.github.io/Spotiphy.
We recommend using a dedicated conda environment:
conda create -n Spotiphy-env python=3.9
conda activate Spotiphy-envSpotiphy is built based on Pytorch and TensorFlow, which must be installed manually before use.
# macOS with Apple Silicon
conda install -c apple tensorflow-deps -y
pip install tensorflow-macos==2.16.2 tensorflow-metal==1.2.0
pip install torch
# Windows
pip install torch # Or follow https://pytorch.org/get-started/locally/ to install with CUDA support
pip install tensorflow==2.16.2After installing the dependencies, Spotiphy itself can be installed in one of the following ways:
- From GitHub: Installs the latest development version directly from the source code.
pip install git+https://github.com/jyyulab/Spotiphy.git- From PyPI: Installs the stable release from the Python Package Index (recommended for most users).
pip install spotiphy==0.3.1To test the Installation, try to import Spotiphy in Python.
import spotiphyFrequently asked questions: Spotiphy FAQ.
For further assistance, start a GitHub Discussion or contact the authors:
- Ziqian Zheng - zzheng92@wisc.edu
- Jiyuan Yang - jiyuan.yang@stjude.org
@article{yang2025spotiphy,
title={Spotiphy enables single-cell spatial whole transcriptomics across an entire section},
author={Yang, Jiyuan and Zheng, Ziqian and Jiao, Yun and Yu, Kaiwen and Bhatara, Sheetal and Yang, Xu and Natarajan, Sivaraman and Zhang, Jiahui and Pan, Qingfei and Easton, John and others},
journal={Nature Methods},
pages={1--13},
year={2025},
publisher={Nature Publishing Group US New York}
}
