SoftwareX (Sep 2025)
scSpatialSIM: a simulator of spatial single-cell molecular data
Abstract
The increasing use of spatial molecular technologies such as multiplex immunofluorescence (mIF) and spatial transcriptomics (SRT) has driven the need for robust statistical methods to analyze the spatial architecture of tissues. However, a lack of consensus on “gold standard” approaches present challenges for benchmarking and comparison. To address this gap, we developed “scSpatialSIM”, an R package for simulating biologically realistic spatial single-cell molecular data. “scSpatialSIM” enables users to efficiently simulate single-cell spatial patterns without requiring reference datasets, incorporating features such as cell clustering, cell co-localization, tissue compartments, and tissue holes. Additionally, the package supports simulation of both categorical data (e.g., cell phenotypes) and continuous values (e.g., protein expression or gene expression), and integrates with other R packages for downstream spatial analyses. To demonstrate its utility, we applied “scSpatialSIM” to benchmark univariate point pattern summary functions, including Ripley’s K(r), nearest neighbor G(r), and pair correlation g(r), across simulated scenarios. The results showed that Ripley’s K(r) consistently detected clustering across multiple radii, outperforming other methods in sensitivity and robustness. While scSpatialSIM is limited to simulating cell clustering and co-localization rather than broader tissue-level sub-domains, it provides a flexible and scalable framework for generating diverse spatial data. The development of scSpatialSIM facilitates comparative evaluation of spatial statistics and enables researchers to explore hypothetical scenarios at scale, advancing the development of novel methods to characterize the spatial organization of tissues. By providing a platform for spatial simulation, scSpatialSIM supports innovation in spatial molecular research and fosters new insights into tissue architecture and cellular interactions.
Keywords