BayesTME: A unified statistical framework for spatial transcriptomics

Haoran Zhang, Miranda V. Hunter, Jacqueline Chou, Jeffrey F. Quinn, Mingyuan Zhou, Richard M. White, Wesley TanseybioRxiv 2022 · DOI

TL;DR

BayesTME is a novel, reference-free Bayesian framework that unifies the analysis of spatial transcriptomics data. It goes beyond existing methods by not only identifying cell types and their spatial distribution but also uncovering within-cell-type spatial gene expression patterns, which the authors term "spatial transcriptional programs," offering a deeper understanding of tissue microenvironments.

What Problem Does This Paper Address?

Spatial transcriptomics (ST) technologies allow us to measure gene expression at thousands of locations within a tissue, revealing how cellular phenotypes vary in space. This spatial organization is crucial for understanding disease progression and therapeutic response, especially in complex environments like the tumor microenvironment (TME). However, analyzing ST data is challenging due to several sources of variation: technical noise (like spot bleeding), varying cell counts per spot, differences in cell type proportions, and, critically, the spatial variation of gene expression within individual cell types. Existing ST analysis tools often tackle only a subset of these challenges, require external single-cell RNA sequencing (scRNA-seq) data for reference, or fail to capture the nuanced within-cell-type spatial signals. This paper aims to provide a unified, end-to-end solution that addresses these limitations.

Methods

BayesTME employs a holistic, hierarchical Bayesian generative model to simultaneously account for multiple sources of spatial variation. Key methodological contributions include:

  • Unified Generative Model: Integrates spot bleeding correction, cell type deconvolution, and spatial differential expression into a single framework.
  • Reference-Free Analysis: Does not require paired scRNA-seq data, making it applicable to a wider range of tissues and experimental conditions. It can automatically infer the number of cell types.
  • Anisotropic Bleed Correction: Models technical errors (UMI bleeding between spots) using a semi-parametric, direction-aware approach that accounts for variations in bleeding patterns.
  • Spatial Transcriptional Programs (STPs): A novel concept that identifies coordinated patterns of gene expression within specific cell types that vary spatially. This is achieved by modeling gene expression with a negative binomial distribution where the success rate parameter captures spatial variation, and hierarchical priors encourage genes to form coherent spatial programs.
  • Empirical Bayes Inference: Uses an efficient, multi-stage inference procedure to estimate model parameters and provide uncertainty quantification.
  • Automatic Hyperparameter Tuning: Employs spatial cross-validation to select the optimal number of cell types and smoothing parameters, reducing manual effort.

Datasets

The paper utilizes both simulated and real biological datasets for evaluation:

  • Simulated Data: Used to benchmark performance in bleed correction, cell type identification, deconvolution, and the discovery of spatial transcriptional programs. These simulations were designed to mimic real ST data characteristics, including directional bleeding and complex spatial patterns.
  • Human Melanoma Tissue: A published dataset was used to demonstrate BayesTME's ability to identify spatial programs related to immune-tumor interactions.
  • Zebrafish Melanoma Model: Two samples from a published dataset were used to showcase BayesTME's capacity to capture bilateral symmetry in muscle tissue and identify novel tumor interface programs.

Key Insights and Ideas

  • Within-Cell-Type Spatial Variation is Crucial: The paper highlights that gene expression can vary significantly within a single cell type based on its spatial location and microenvironment. This is a critical insight that existing methods often miss.
  • Spatial Transcriptional Programs (STPs) as a New Signal: STPs represent a novel way to characterize tissue architecture by identifying groups of genes that exhibit coordinated spatial expression patterns within a cell type. These programs can reveal fundamental biological processes.
  • Reference-Free is Powerful: The ability to perform analysis without scRNA-seq reference data significantly broadens the applicability of ST analysis, especially for complex or rare cell types not well-represented in reference datasets.
  • Technical Noise is Directional: The study reveals that spot bleeding is not uniform but can be anisotropic, meaning UMIs tend to bleed in specific directions, which needs to be accounted for in analysis.

Key Results

  • Superior Performance: BayesTME outperforms existing methods in benchmarks for bleed correction, cell type identification, spot deconvolution, and tissue segmentation.
  • Accurate Bleed Correction: BayesTME significantly outperforms SpotClean in realistic, anisotropic bleeding scenarios, achieving a much lower Mean Squared Error (MSE).
  • Robust Cell Type Identification: BayesTME accurately identifies the correct number of cell types and their expression signatures, even with imperfect or missing scRNA-seq references.
  • Novel Biological Discoveries:
    • In human melanoma, BayesTME identified spatial programs reflecting tumor heterogeneity, stromal reprogramming, and immune cell interactions.
  • In zebrafish melanoma, it captured bilateral symmetry in muscle tissue and identified novel "interface" cell states at the tumor boundary, suggesting pro-inflammatory roles.
  • Scalability: BayesTME scales sub-linearly with the number of spots, making it suitable for future high-resolution ST technologies.

Limitations and Future Work

  • Computational Cost: While BayesTME is designed for efficiency, the full posterior inference can still be computationally intensive, especially for very large datasets. The paper mentions a two-stage approach to mitigate this.
  • Future Directions:
    • Cell-Cell Interactions: The authors plan to incorporate explicit modeling of cell-cell interactions to better understand microenvironment dynamics.
  • Higher Resolution Data: BayesTME is being developed to leverage future single-cell resolution ST data, which will further reduce computational costs and enable more detailed analyses.
  • Global Interactions: Exploring global interactions beyond local neighborhoods is a future goal, potentially enabled by higher resolution data.
  • Prior Information: The possibility of using H&E stained images to provide informative priors on cell counts is mentioned as a way to further speed up inference.

Summary updated

Abstract

Abstract Spatial variation in cellular phenotypes underlies heterogeneity in immune recognition and response to therapy in cancer and many other diseases. Spatial transcriptomics (ST) holds the potential to quantify such variation, but existing analysis methods address only a small part of the analysis challenge, such as spot deconvolution or spatial differential expression. We present BayesTME, an end-to-end Bayesian method for analyzing spatial transcriptomics data. BayesTME unifies several previously distinct analysis goals under a single, holistic generative model. This unified approach enables BayesTME to (i) be entirely reference-free without any need for paired scRNA-seq, (ii) outperform a large suite of methods in quantitative benchmarks, and (iii) uncover a new type of ST signal: spatial differential expression within individual cell types. To achieve the latter, BayesTME models each phenotype as spatially adaptive and discovers statistically significant spatial patterns amongst coordinated subsets of genes within phenotypes, which we term spatial transcriptional programs. On human and zebrafish melanoma tissues, BayesTME identifies spatial transcriptional programs that capture fundamental biological phenomena like bilateral symmetry, differential expression between interior and surface tumor cells, and tumor-associated fibroblast and macrophage reprogramming. Our results demonstrate BayesTME’s power in unlocking a new level of insight from spatial transcriptomics data and fostering a deeper understanding of the spatial architecture of the tumor microenvironment. BayesTME is open source and publicly available ( https://github.com/tansey-lab/bayestme ).
BibTeX
@misc{zhang2022bayestme,
  author = {Haoran Zhang and Miranda V. Hunter and Jacqueline Chou and Jeffrey F. Quinn and Mingyuan Zhou and Richard M. White and Wesley Tansey},
  title = {{BayesTME: A unified statistical framework for spatial transcriptomics}},
  year = {2022},
  doi = {10.1101/2022.07.08.499377},
  howpublished = {bioRxiv},
}
Figure