TESSA: A unified model to detect trajectory-preserved and spatially-variable genes in spatial transcriptomics

Yuesong Wu, Haohao Su, Nina G. Steele, Yuying Xie, Yuehua CuibioRxiv 2025

TL;DR

This paper introduces TESSA, a novel statistical framework that unifies the detection of genes exhibiting both spatial and temporal expression patterns in spatial transcriptomics data. By addressing the "double-dipping" issue and integrating developmental trajectories, TESSA offers a more comprehensive understanding of biological processes within tissues, leading to improved domain detection and biological insights.

What Problem Does This Paper Address?

Spatial transcriptomics (ST) allows us to study gene expression within the context of tissue architecture. A key task in ST is identifying spatially variable genes (SVGs) – genes with expression patterns that vary across different regions of a tissue. However, many biological processes, like development or disease progression, are not only spatially structured but also involve dynamic changes over time or developmental stages. These temporal dynamics are often captured by "pseudotime" in single-cell RNA sequencing (scRNA-seq) data, but integrating this temporal information with spatial data has been challenging. Existing methods often focus solely on spatial variation, missing genes that change along developmental trajectories. Furthermore, a common statistical pitfall called "double-dipping" can lead to inflated false positives when genes used to infer temporal order are also used to test for temporal effects. This paper aims to bridge this gap by developing a unified model that can simultaneously identify spatially variable genes and genes that change along developmental trajectories, while also providing a robust solution to the double-dipping problem.

Methods

TESSA employs a two-stage statistical framework:

  • Stage 1: Unified Test for uTSVGs: This stage identifies "unified temporally and spatially variable genes" (uTSVGs). It uses a linear mixed-effects model to decompose gene expression variance into spatial and temporal components. By considering both spatial kernel matrices (based on tissue coordinates) and temporal kernel matrices (based on inferred pseudotime), TESSA can detect genes exhibiting either or both types of variation.
  • Stage 2: Individual Tests for TVGs and SVGs: Genes identified as uTSVGs are then further dissected. Individual tests are performed to determine if a uTSVG is primarily a temporally variable gene (TVG) or a spatially variable gene (SVG).
  • Leave-One-Out (LOO) Double Dipping Correction: A key innovation is the proposed LOO strategy to address the double-dipping issue. Instead of using all genes to infer pseudotime and then testing them, LOO temporarily removes each gene from the pseudotime estimation when testing that specific gene. This ensures that the pseudotime used for testing is not influenced by the gene being tested, thus controlling for false positives.

Datasets

The authors evaluated TESSA using several publicly available spatial transcriptomics datasets:

  • Human Pancreatic Ductal Adenocarcinoma (PDAC) ST dataset: A 10x Visium dataset used to demonstrate TESSA's ability to capture biologically meaningful insights into tumor progression and enhance domain detection.
  • Human Lung Adenocarcinoma (LUAD) ST dataset: Another 10x Visium dataset used to showcase TESSA's capability in identifying tumor subclones and fine-grained TME features.
  • Mouse Primary Visual Cortex (STARmap) dataset: A single-cell resolution ST dataset used to demonstrate TESSA's multi-sample integration capabilities and its improvement in domain detection accuracy.
  • Human Dorsolateral Prefrontal Cortex (10x Visium) dataset: Used to further validate TESSA's multi-sample integration and its impact on domain detection accuracy.

Key Insights and Ideas

  • Unifying Spatial and Temporal Signals: The core idea is that many biological processes are driven by both where cells are located and their developmental stage. TESSA's ability to capture both simultaneously provides a more holistic view than methods focusing on only one aspect.
  • The Double-Dipping Problem is Real and Solvable: The paper clearly demonstrates how using genes for both pseudotime estimation and testing leads to inflated false positives. The LOO strategy offers an elegant and effective solution that maintains statistical rigor.
  • Pseudotime is Informative in Spatial Data: Even when inferred from gene expression alone, pseudotime often aligns with spatial structures, suggesting that developmental trajectories are physically organized within tissues.
  • TESSA Enhances Downstream Analysis: By identifying more biologically relevant genes (uTSVGs, TVGs, SVGs), TESSA leads to improved spatial domain detection and richer functional enrichment analysis, providing deeper insights into complex biological systems.

Key Results

  • Type I Error Control: TESSA, particularly with the LOO strategy, effectively controls false positive rates in simulations across various dispersion parameters, outperforming methods that don't address double-dipping.
  • Detection Power: TESSA demonstrates competitive or superior power in detecting both unified TSVGs and individual TVGs/SVGs compared to existing methods, especially when temporal dynamics are present.
  • Improved Domain Detection: In real data applications (PDAC, LUAD, mouse cortex, human cortex), TESSA's uTSVGs consistently led to more accurate and biologically meaningful spatial domain detection compared to SVGs identified by SPARK. For instance, TESSA identified finer structures like lymphoid aggregation regions that SPARK missed.
  • Biological Insights: Functional enrichment analysis of TESSA-identified genes revealed distinct biological pathways associated with different lineages and spatial domains, offering a deeper understanding of tumor progression and immune responses.

Limitations and Future Work

  • Kernel Selection: The current implementation uses Gaussian kernels with bandwidths selected by a rule-of-thumb criterion. The authors suggest exploring multiple bandwidths and Cauchy p-value combination tests to potentially increase detection power.
  • Single Lineage Focus: TESSA is currently designed for single lineages. Extending it to model multiple lineages simultaneously is a promising future direction, though it may increase computational complexity.
  • Computational Cost: Kernel matrix decomposition and inversion can be computationally intensive for large datasets. Future work will explore kernel approximation techniques to improve scalability.
  • Pseudotime Estimation: While TESSA is flexible regarding pseudotime estimation methods, the authors note that spatial pseudotime methods can sometimes over-smooth anatomical structures, and they opted for scRNA-seq-based methods like Slingshot for their analyses.

Summary updated

Abstract

Abstract Identifying spatially variable genes (SVGs) has been an essential task in spatial transcriptomics. In addition to SVGs detection, there are genes exhibiting expression patterns that are associated with cellular developmental stages or lineage fates across a tissue section. Identifying such genes could provide novel insights into tumor metastasis. Here, we introduce a unified statistical model, termed TrajEctory-preServed and SpAtially-variable gene detection (TESSA), to detect both types of genes. Moreover, we propose a novel strategy to address the inherent double-dipping issue commonly encountered when assessing temporal gene effects in transcriptomics analysis. We demonstrate the testing performance through extensive simulation studies and real applications to several publicly available datasets. Downstream analyses further highlight the potential of our method in identifying genes associated with tumor progression and enhancing spatial domain detection.
BibTeX
@misc{wu2025tessa,
  author = {Yuesong Wu and Haohao Su and Nina G. Steele and Yuying Xie and Yuehua Cui},
  title = {{TESSA: A unified model to detect trajectory-preserved and spatially-variable genes in spatial transcriptomics}},
  year = {2025},
  doi = {10.1101/2025.09.06.674654},
  howpublished = {bioRxiv},
}
Figure