Spotiphy enables single-cell spatial whole transcriptomics via generative modeling
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.
📚 Tutorials & Documentation
Currently available tutorial:
- Mouse cortex analysis: Documentation | Google Colab
Full documentation is available at jyyulab.github.io/Spotiphy.
⚙️ Installation
We recommend using a dedicated conda environment:
conda create -n Spotiphy-env python=3.9
conda activate Spotiphy-env
Spotiphy 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.2
After 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.0
To test the Installation, try to import Spotiphy in Python.
import spotiphy
❓ FAQ & Support
Frequently 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
Cite Spotiphy:
@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}
}
Metadata
Release files for spotiphy 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| spotiphy-0.3.1.tar.gz | 31.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spotiphy-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 62.8 kB
Release files / spotiphy-0.3.1.tar.gz
| Download URL | spotiphy-0.3.1.tar.gz |
|---|---|
| Size | 31.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da0c0b8398c6c0abdedc9767ed0352ffa7ca292be9bb67980096013ec2836a0d
|
|
BLAKE2b-256 checksum How to use checksums |
194346778820830be3b70f8c6d43894a3c04261927bfa02ebf1533e0a50f0575
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.23
|
Release files / spotiphy-0.3.1-py3-none-any.whl
| Download URL | spotiphy-0.3.1-py3-none-any.whl |
|---|---|
| Size | 31.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81b93b16b9a3b2506c6e912e0abb889de5ec50e0f490081b036ec29d4e06042a
|
|
BLAKE2b-256 checksum How to use checksums |
52753a0122cc4a4aecece9f73bff550e273d5b7db07b0f0b0f841581922bf244
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.23
|
Security for spotiphy 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.