Spatially variable gene (SVG) detection is one of the most important tasks in spatial transcriptomics (ST) data analysis. To identify SVGs from population-level ST data, current practices often call SVGs separately from individual slices and then combine, or select highly variable genes from the concatenated expression matrix of all subjects as a surrogate. These approaches fail to simultaneously account for the common and subject-specific spatial patterns, leading to low accuracy and power. To overcome this issue, we develop PopSVG, a statistical method for population-level SVG detection. PopSVG hierarchically models the spatial expression from a population of biological replicates, balancing inter-subject homogeneity and heterogeneity. After parameter estimation, PopSVG computes statistical significance of genes being population-level SVGs. Extensive experiments demonstrate PopSVG’s superiority over existing approaches in identifying biologically relevant SVGs and improving multi-slice tissue domain segmentation, while scaling efficiently to large datasets.
The CPU version:
pip install git+https://github.com/ToryDeng/PopSVG.gitThe GPU version:
pip install "git+https://github.com/ToryDeng/PopSVG.git#egg=popsvg[gpu]"This command will addtionally install the JAX package.
popsvg/: core Python package for preprocessing, spatial regression, and model estimation.tutorials/: example notebooks for running PopSVG on CPU and GPU, including a small tutorial dataset.reproducibility/: scripts and notebooks used to reproduce analyses present in the paper.docs/: documentation assets, including the workflow figure used in this README.
| Environment 1 | Environment 2 | |
|---|---|---|
| CPU | Intel Xeon Platinum 8276L | Intel Xeon Gold 6240R |
| GPU | NVIDIA RTX 3090 | NVIDIA RTX A6000 |
| Memory | 256 GB | 256GB |
| System | Ubuntu 24.04.2 LTS | Ubuntu 22.04.5 LTS |
| Python | 3.12.9 | 3.11.11 |
Coming soon.
