Data simulation for neighbor preference analysis with SpaSim from Feng et al. 2023. This repository provides the scripts for generating the data for Figure 4 in the mansucript "Comparison and Optimization of Cellular Neighbor Preference Methods for Quantitative Tissue Analysis" by Schiller et al.
SpaSim can simulate different cell type clusters with different levels of infiltration from other cell types. For studying directional NEP, we created three different datasets (1) One purple cluster infiltrated by green cells (2) One purple and one green cluster. The purple cluster gets infiltrated by the green cells. (3) One green and one purple cluster. The green cluster gets infiltrated by the purple cells.
The Rpackage "SpaSIM" (Version 1.4.0) was installed with BiocManager::install("spaSim").
Further package specifications for reproducing the results can be found in sessionInfo.txt.
We generated .csv files per sample with x, y and cell type columns. The data can be accessed here.
/scripts
spaSim_simulations.Rmd: Script for generating simualated data and plots.