Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Benchmarking niche identification via domain segmentation for spatial transcriptomics data

Overview

Spatial niche identification aims to partition tissue into multicellular microenvironments that are defined by coordinated cell type composition and spatially structured cellular states, using spatially resolved expression measurements. Across tissues, such microenvironments can reflect recurrent cellular neighborhoods, context-dependent state programs, and local cell–cell interactions that are not fully captured by gene expression alone or by coarse anatomical landmarks. Niches may align with anatomy in some settings, but they can also be sharply separated yet internally heterogeneous, appear as non-contiguous islands embedded within larger compartments, or vary continuously along gradients. These properties make it difficult to infer method performance from a single reference setting, motivating a benchmark that jointly probes multiple niche geometries and practical data regimes under a consistent task definition.

This repository contains the benchmarking framework and code for our paper. We evaluate 16 representative algorithms spanning probabilistic models, graph neural networks, deep generative models, and foundation models. The benchmark quantifies performance across complementary axes including agreement with reference niches (accuracy), spatial structure and boundary fidelity (connectivity), biological consistency of inferred niches (composition similarity), quality of learned embeddings (silhouette score), and computational efficiency (runtime and memory).

Paper

If you find this repository or the accompanying benchmark useful for your work, please consider citing our work:

Wang, Y., Chen, Y., Yang, L., Wang, C., Cai, J., and Xin, H. Benchmarking niche identification via domain segmentation for spatial transcriptomics data. bioRxiv (2026). DOI: 10.64898/2026.02.27.708202.

Benchmark Methods

We benchmarked 16 representative algorithms categorized into four methodological families.

Probabilistic & Statistical

GNN & Contrastive

Deep Generative

Foundation Models

Evaluation Metrics

Results are quantified using the following categorical metrics:

  • Ground Truth Accuracy: Measures agreement with reference annotations.
    • ARI (Adjusted Rand Index)
    • AMI (Adjusted Mutual Information)
    • Homogeneity
    • Completeness
    • Macro-F1 Score
  • Biological Consistency: Assesses the biological relevance of inferred niches.
    • Cell Type Cosine Similarity
  • Spatial Structure: Evaluates the spatial coherence of the partition.
    • Spatial Connectivity
  • Embedding Quality: Measures the separation and compactness of the latent representation.
    • Silhouette Score
  • Computational Efficiency: Assesses practical scalability.
    • Runtime
    • Peak Memory

Data and Annotations

The manually curated human lymph node niche annotations are available in two forms:

  • A ready-to-use processed AnnData file, lymph_node_niche_annotated.h5ad, which contains the processed lymph node data with niche annotations.
  • Cell-level annotation tables in annotation/ (lymph_node_annotations.tsv and lymph_node_annotations.csv) for users who want to align the annotations to the original data or to their own reprocessed AnnData object.

See annotation/README.md for the annotation schema and an example of merging the TSV/CSV annotations into an .h5ad file.

Code Structure

  • annotation/: Contains scripts and data for constructing the manually annotated high-resolution human lymph node reference and defining ground truths.
  • benchmark/: Contains the implementation and running scripts (Jupyter Notebooks) for the 16 benchmarked methods.
  • simulation/: Contains code for generating synthetic spatial transcriptomics data using SRTsim with controlled niche parameters.

License

This project is released under the MIT License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages