Motivation: Analyzing the local microenvironment of tumor cells can provide significant insights into their complex interactions with their cellular surroundings, including immune cells. By quantifying the prevalence and distances of certain immune cells in the vicinity of tumor cells through a neighborhood analysis, patterns may emerge that indicate specific associations between cell populations. Such analyses can reveal important aspects of tumor-immune dynamics, which may inform therapeutic strategies. This method enables an in-depth exploration of spatial interactions among different cell types, which is crucial for research in oncology, immunology, and developmental biology.
Results: We introduce an R Markdown script called SNAQ™ (Single-cell Spatial Neighborhood Analysis and Quantification), which conducts a neighborhood analysis on immunofluorescent images without the need for extensive coding knowledge. As a demonstration, SNAQ™ was used to analyze images of pancreatic ductal adenocarcinoma. Samples stained for DAPI, PanCK, CD68, and PD-L1 were segmented and classified using QuPath. The resulting CSV files were exported into RStudio for further analysis and visualization using SNAQ™. Visualizations include plots revealing the cellular composition of neighborhoods around multiple cell types within a customizable radius. Additionally, the analysis includes measuring the distances between cells of certain types relative to others across multiple regions of interest.
Availability and implementation: The R Markdown files that comprise the SNAQ™ algorithm and the input data from this paper are freely available on the web at https://github.com/AryehSilver1/SNAQ.
Keywords: Neighborhood analysis; geospatial analysis; image analysis; immuno-oncology; immunohistochemistry; immunology; pathology; single cell analysis.