Spatial transcriptomic studies perform gene expression profiling on tissues with spatial localization information. With technological advances, many spatial transcriptomic studies are reaching single-cell spatial resolution and are capable of collecting data from multiple tissue sections. Here, we develop a computational method, BASS, that enables multi-scale and multi-sample analysis for single-cell resolution spatial transcriptomics. Specifically, BASS performs multi-scale analyses in the form of cell type clustering at the single-cell scale and spatial domain detection at the tissue regional scale. The two analytic tasks are carried out in a coherent fashion through a Bayesian hierarchical modeling framework. For both analytic tasks, BASS properly accounts for the spatial correlation structure and seamlessly integrates gene expression information with spatial localization information to enhance analytic performance. In addition, BASS is capable of performing multi-sample analysis via joint modeling of multiple tissue sections/samples, facilitating the cross-sample integration of spatial transcriptomics.
BASS is implemented as an R (>= 4.0.3) package with underlying efficient C++ code interfaced through Rcpp and RcppArmadillo. BASS depends on a few other R packages that include GIGrvg, Matrix, harmony, label.switching, mclust, Rcpp, RcppArmadillo, RcppDist, SPARK, scran, and scater. Please refer to the package DESCRIPTION file for details. Dependent packages are supposed to be automatically installed while installing BASS.
Install the BASS R package maintained in github through the devtools
package.
if(!require(devtools))
install.packages(devtools)
devtools::install_github("zhengli09/BASS")
library(BASS)
?BASS
Check our vignettes.
If you find the BASS
package, any of the source code, or processed data
in this repository and in the BASS-analysis
repository useful for your work, please cite:
Li, Z., Zhou, X. BASS: multi-scale and multi-sample analysis enables accurate cell type clustering and spatial domain detection in spatial transcriptomic studies. Genome Biol 23, 168 (2022). https://doi.org/10.1186/s13059-022-02734-7
Visit our group website for more statistical tools on analyzing spatial transcriptomic data.
- (
v1.1.0.014
) Enabled ARMA_64BIT_WORD such that sp_mat can handle large matrices
- Changed functional programming to OO programming
- Optimized the implementation for Swendsen-Wang algorithm
- Updated threshold and message for checking the convergence of the spatial parameter beta