Skip to main content

An integrated pipeline designed to deconvolute and decompose spatial transcriptomics data, and produce pseudo single-cell resolution images.

Project description

Spotiphy enables single-cell spatial whole transcriptomics via generative modeling

Pypi version Downloads Github star Static Badge Open In Colab Zenodo

Spotiphy_cover

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.

Spotiphy_overview

📚 Tutorials & Documentation

Currently available tutorial:

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:

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}
}

Nature Methods article

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

spotiphy-0.3.1.tar.gz (31.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spotiphy-0.3.1-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file spotiphy-0.3.1.tar.gz.

File metadata

  • Download URL: spotiphy-0.3.1.tar.gz
  • Upload date:
  • Size: 31.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for spotiphy-0.3.1.tar.gz
Algorithm Hash digest
SHA256 da0c0b8398c6c0abdedc9767ed0352ffa7ca292be9bb67980096013ec2836a0d
MD5 089b19ad88648157e425154beeb59e5c
BLAKE2b-256 194346778820830be3b70f8c6d43894a3c04261927bfa02ebf1533e0a50f0575

See more details on using hashes here.

File details

Details for the file spotiphy-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: spotiphy-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 31.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for spotiphy-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 81b93b16b9a3b2506c6e912e0abb889de5ec50e0f490081b036ec29d4e06042a
MD5 470680b4aa68f99caa1b48f53afdc35e
BLAKE2b-256 52753a0122cc4a4aecece9f73bff550e273d5b7db07b0f0b0f841581922bf244

See more details on using hashes here.

Supported by

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