Adding Highly Variable Genes to Spatially Variable Genes Can Improve Cell Type Clustering Performance in Spatial Transcriptomics Data

Yijun Li, Stefan Stanojevic, Bing He, Zheng Jing, Qianhui Huang, Jian Kang, Lana X. GarmireResearch Square 2024

Abstract

Spatial transcriptomics has allowed researchers to analyze transcriptome data in its tissue sample's spatial context. Various methods have been developed for detecting spatially variable genes (SV genes), whose gene expression over the tissue space shows strong spatial autocorrelation. Such genes are often used to define clusters in cells or spots downstream. However, highly variable (HV) genes, whose quantitative gene expressions show significant variation from cell to cell, are conventionally used in clustering analyses. In this report, we investigate whether adding highly variable genes to spatially variable genes can improve the cell type clustering performance in spatial transcriptomics data. We tested the clustering performance of HV genes, SV genes, and the union of both gene sets (concatenation) on over 50 real spatial transcriptomics datasets across multiple platforms, using a variety of spatial and non-spatial metrics. Our results show that combining HV genes and SV genes can improve overall cell-type clustering performance.

Introduction

In single-cell analysis, feature selection is the foundational step that determines the quality of downstream clustering and cell-type identification. Traditionally, researchers have relied on Highly Variable Genes (HVGs)—those exhibiting significant expression variance across cells—to distinguish biological states. However, the rise of Spatial Transcriptomics (ST) has introduced a new category: Spatially Variable Genes (SVGs). These genes exhibit strong spatial autocorrelation, defining the physical architecture and "spatial domains" of a tissue.

Currently, there is no consensus on whether HVGs or SVGs are superior for clustering in spatial data. Most pipelines select one or the other, potentially overlooking critical biological information. This study investigates whether a unified approach—using the concatenation (union) of both HVGs and SVGs—provides a more robust framework for cell-type clustering.

Methods and Benchmarking

The researchers developed a systematic benchmarking workflow to evaluate three feature selection strategies: HVGs alone, SVGs alone, and the union of both.

  1. Feature Extraction: Top features were identified using LOESS regression for HVGs and the SPARK algorithm for SVGs.
  2. Clustering Algorithms: While Leiden clustering on a shared nearest neighbor (sNN) network served as the primary method, the results were validated across k-means, Monocle3, cellTree, and SC3 to ensure algorithm-agnostic robustness.
  3. Evaluation Metrics: Performance was measured using standard accuracy scores like Adjusted Mutual Information (AMI) and weighted F1. Additionally, the authors introduced "spatially adjusted" metrics: Spatial Concordance (SC), which weights matches more heavily at complex tissue borders, and Mean Spatial AMI, which assesses local neighborhood consistency.
Benchmarking workflow and performance comparison of HVG, SVG, and combined gene sets across spatial transcriptomics platforms.

Results

Performance Across Diverse Platforms

The study utilized 51 real spatial transcriptomics datasets across four major platforms: 10X Genomics Visium (spot-resolution), Vizgen merFISH (single-cell), 10X Genomics Xenium (single-cell), and Nanostring cosMx (single-cell). Across nearly all datasets, the union of HVGs and SVGs consistently outperformed individual gene sets in both AMI and weighted F1 scores.

The "Goldilocks Zone" of Feature Selection

A key finding was that while the union set improved performance, using the full transcriptome often led to a decrease in accuracy due to technical noise. The combination of HVGs and SVGs appears to hit a "Goldilocks zone," providing enough feature density to capture both cell identity (the "what") and environmental context (the "where") without introducing excessive noise.

Biological Clarity and Rare Cell Identification

The combined approach showed significant advantages in identifying rare cell types and resolving complex tissue architectures. In lung cancer datasets (cosMx), the union method improved the identification of tumor cells and specific immune populations, such as B-cells and neutrophils, compared to using SVGs alone. Furthermore, the Spatial Concordance metric confirmed that the combined gene set produces clusters that align more accurately with the physical architecture of the tissue, particularly at heterogeneous boundaries.

Discussion and Conclusion

The results demonstrate that HVGs and SVGs provide complementary biological information. HVGs are adept at capturing internal cell states, while SVGs capture the influence of the local microenvironment. By combining these sets, researchers can achieve a higher-resolution lens for cellular identity.

While the improvement is consistent, the authors note that the optimal ratio of HVGs to SVGs may vary depending on tissue type and platform resolution. Future work may explore the integration of these combined feature sets with deep learning and graph neural network (GNN) approaches.

In conclusion, for spatial transcriptomics analysis, the evidence suggests that researchers should not choose between highly variable and spatially variable genes; rather, the union of both sets should be adopted as the new standard for feature selection to maximize clustering performance.

Summary updated

BibTeX
@inproceedings{li2024adding,
  author = {Yijun Li and Stefan Stanojevic and Bing He and Zheng Jing and Qianhui Huang and Jian Kang and Lana X. Garmire},
  title = {{Adding Highly Variable Genes to Spatially Variable Genes Can Improve Cell Type Clustering Performance in Spatial Transcriptomics Data}},
  booktitle = {Research Square},
  year = {2024},
  doi = {10.21203/rs.3.rs-5315913/v1},
}
Figure