Identifying disease-indicative genes is critical for deciphering disease mechanisms and continues to attract significant interest. Spatial transcriptomics offers unprecedented insights for the detection of disease-specific genes by enabling within-tissue contrasts. However, this new technology poses challenges for conventional statistical models developed for RNA-seq, as these models often neglect the spatial organization of tissue spots. In this article, we propose a Bayesian shrinkage model to characterize the relationship between high-dimensional gene expressions and the disease status of tissue spots, incorporating spatial correlation among these spots through autoregressive terms. Our model adopts a hierarchical structure to accommodate for the missing data within tissues and is further extended to facilitate the analysis of multiple correlated samples. To ensure the model’s applicability to datasets of varying sizes, we carry out two computational frameworks for Bayesian parameter estimation, tailored to both small and large sample scenarios.
If the model runs slowly, try reducing the number of HVGs (highly variable genes) — this can greatly boost the computation speed.
The DiSTect package requires several core dependencies, including rstan, rjags, ggplot2, GGally, network, and sna.
Please make sure all these packages are installed before proceeding with the installation of DiSTect.
🚨 Need help? Don’t hesitate to reach out — feel free to ask any questions if you encounter issues during installation! 💬
To install the required packages (rstan, ggplot2, GGally, network, and sna), run the following command in R:
install.packages(c("rstan", "ggplot2", "GGally", "network", "sna"), dependencies = TRUE)First, install JAGS via Homebrew in your terminal:
brew install jagsThen install rjags from source in R:
install.packages("rjags", type = "source")Please visit the JAGS official website to download and install JAGS manually. After that, install rjags in R:
install.packages("rjags")Once all dependencies are installed, use the following commands to install DiSTect from GitHub:
# install devtools if not already installed
install.packages("devtools")
# install the DiSTect package
devtools::install_github("StaGill/DiSTect")
# load the package
library(DiSTect)A R Markdown of the tutorial is accessible from: https://qihuangzhang.github.io/software/DiSTect_tutorial.
The dataset about HER2-positive breast is accessible from https://github.com/almaan/her2st.
Use the following BibTeX entry:
@article{zhao2025distect,
title={DiSTect: a Bayesian model for disease-associated gene discovery and prediction in spatial transcriptomics},
author={Zhao, Qicheng and Deng, Anji and Zhang, Qihuang},
journal={Bioinformatics},
pages={btaf530},
year={2025},
publisher={Oxford University Press}
}
