Sainsc: a computational tool for segmentation-free analysis of in-situ capture

Niklas Müller‐Bötticher, Sebastian Tiesmeyer, Roland Eils, Naveed IshaquebioRxiv 2024

TL;DR

Sainsc is a new open-source computational tool designed to analyze high-resolution spatial transcriptomics data. It overcomes previous limitations by offering a segmentation-free approach that is both computationally efficient and accurate, enabling detailed cell-type mapping at the subcellular level.

What Problem Does This Paper Address?

Spatial transcriptomics (ST) technologies are revolutionizing biology by allowing us to map gene expression within the spatial context of tissues, offering unprecedented insights into cellular heterogeneity and tissue organization. However, recent advancements in ST, particularly those offering subcellular resolution and whole-transcriptome coverage (like Stereo-seq, Nova-ST), generate massive datasets. Analyzing this data is challenging due to:

  • High Computational Cost: Processing such large volumes of data requires significant computational resources.
  • Data Sparsity: Low capture efficiency can lead to sparse measurements.
  • Cell Segmentation Difficulties: Accurately identifying individual cell boundaries in high-resolution data is complex and often error-prone, hindering precise cell-type assignment.

Existing methods often struggle with these challenges, limiting the widespread adoption and effective utilization of these powerful new ST technologies.

Methods

Sainsc tackles these problems with a novel, segmentation-free approach that leverages Kernel Density Estimation (KDE). Here's a breakdown of its key methods:

  • Segmentation-Free Analysis: Instead of relying on precise cell segmentation (which is difficult at high resolutions), Sainsc models gene expression as a continuous density distribution across the tissue. This bypasses the need for accurate cell border identification.
  • Kernel Density Estimation (KDE): Sainsc uses KDE to estimate the probability density of gene expression at each point (pixel) in the tissue. This helps to smooth out data sparsity and create a more robust representation of gene expression.
  • Efficient Data Processing: The core computational tasks are offloaded to the Rust programming language, known for its speed and efficiency, while the user-friendly interface is provided through Python (and a Julia implementation is also available). This hybrid approach balances performance with accessibility.
  • Cell-Type Assignment: Sainsc uses cosine similarity to match the estimated gene expression profiles at each pixel to known cell-type signatures (either provided by the user or generated de novo).
  • Assignment Score: A key innovation is the assignment score, which quantifies the confidence of each cell-type assignment. This score can be visualized spatially, allowing researchers to assess the reliability of the cell-type map and identify regions where assignments might be less certain.

Datasets

Sainsc was evaluated on several publicly available datasets, including:

  • Synthetic dataset: Used to assess accuracy and the utility of the assignment score.
  • Stereo-seq data: From a mouse embryo and a mouse brain coronal section, representing high-resolution, whole-transcriptome data.
  • Xenium dataset: A mouse brain coronal section from a different imaging-based ST technology.
  • Nova-ST data: Another full-transcriptome, sub-micron resolution ST dataset.

The paper also references and utilizes cell-type signatures derived from single-cell RNA sequencing (scRNAseq) data from various studies (e.g., Yao et al.) for supervised analysis.

Key Insights and Ideas

  • Segmentation is not always necessary: The paper demonstrates that accurate cell-type mapping can be achieved without the need for precise cell segmentation, a significant bottleneck in high-resolution ST analysis.
  • KDE smooths out sparsity: By modeling gene expression as a density, Sainsc effectively handles the sparse nature of ST data, leading to more robust assignments.
  • Assignment score as a confidence metric: The spatial visualization of the assignment score is a powerful tool for interpreting the quality and reliability of the cell-type map, allowing users to identify potentially ambiguous assignments.
  • Cross-platform compatibility: Sainsc's ability to work with data from different ST technologies (e.g., Stereo-seq, Xenium, Nova-ST) highlights its versatility.
  • Efficiency is key for exploration: The tool's low computational requirements enable interactive data exploration, allowing researchers to quickly test different parameters and gain insights.

Key Results

  • High Accuracy: Sainsc achieved comparable or superior accuracy to existing methods like TopACT and outperformed RCTD in cell-type classification on simulated data.
  • Improved Sensitivity: Sainsc identified more erythrocytes in the mouse embryo dataset compared to previous segmentation-based analyses, demonstrating its ability to detect cell types that might be missed by traditional methods.
  • Computational Efficiency: Sainsc is significantly faster and requires less memory than other tools like TopACT. For example, analyzing a large Stereo-seq dataset took approximately 1 hour of CPU time and ~5 GB of memory, enabling interactive analysis.
  • Scalability: The tool scales well with increasing numbers of genes and cell types, making it suitable for analyzing extremely large datasets.
  • Transferable Signatures: Sainsc can effectively use cell-type signatures derived from different technologies (e.g., scRNAseq) to annotate ST data.

Limitations and Future Work

  • Gene Panel Optimization: The paper notes that for certain datasets (like the Xenium brain data), the combination of the cell-type signature matrix and the specific gene panel might not be optimal for annotating all regions, leading to lower assignment scores. This suggests that careful selection or generation of gene panels is important.
  • Exploratory Nature: While Sainsc is designed for exploratory analysis, the authors emphasize that the "one size fits all" approach is not ideal, and analysis often needs to be iterative and interactive to optimize parameters and interpret results.
  • Future Development: The authors suggest that Sainsc is well-suited for further development to handle even higher computational demands, such as those arising from 3D atlases, multi-omics integration, and whole-organ analysis. The Julia implementation also opens doors for integration with a growing bioinformatics ecosystem.

Summary updated

Abstract

Abstract Spatially resolved transcriptomics has become the method of choice to characterise the complexity of biomedical tissue samples. Until recently, scientists have been restricted to profiling methods with high spatial resolution but for a limited set of genes or methods that can profile transcriptome-wide but at low spatial resolution. Through recent developments, there are now methods which offer subcellular spatial resolution and full transcriptome coverage. However, utilizing the high spatial and gene resolution of these new methods remains elusive due to several factors including low detection efficiency, high computational cost and difficulties in delineating cell borders. Here we present Sainsc (Segmentation-free analysis of in-situ capture data), which combines a cell-segmentation free approach with efficient data processing of transcriptome-wide nanometer resolution spatial data. Sainsc can generate cell-type maps with accurate cell-type assignment at a subcellular level, together with corresponding maps of the assignment scores that facilitate the interpretation in the local confidence of cell-type assignment. We demonstrate its utility and accuracy across different tissues and profiling methods. Compared to other methods, Sainsc requires lower computational resources and has scalable performance, enabling interactive data exploration. Sainsc is compatible with common data analysis frameworks and is available as open-source software in multiple programming languages.
BibTeX
@misc{mullerbotticher2024sainsc,
  author = {Niklas Müller‐Bötticher and Sebastian Tiesmeyer and Roland Eils and Naveed Ishaque},
  title = {{Sainsc: a computational tool for segmentation-free analysis of <i>in-situ</i> capture}},
  year = {2024},
  doi = {10.1101/2024.08.02.603879},
  howpublished = {bioRxiv},
}
Figure