Skip to content

zhengli09/BASS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BASS: Bayesian Analytics for Spatial Segmentation

Overview

BASS Overview

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.

Installation

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

How to use BASS

Check our vignettes.

Citing the work

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.

Release Notes

Latest:

  • (v1.1.0.017) Updated the use of harmony package to its version 1.2.1
  • (v1.1.0.016) Fixed a bug in BASS.preprocess related to HarmonyMatrix
  • (v1.1.0.014) Enabled ARMA_64BIT_WORD such that sp_mat can handle large matrices

v1.1.0:

  • 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

About

Bayesian Analytics for Spatial Segmentation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published