This function will construct a new assay where each feature is a cell label The values represents the sum of a particular cell label neighboring a given cell.
BuildNicheAssay(
object,
fov,
group.by,
assay = "niche",
neighbors.k = 20,
niches.k = 4
)
Seurat object containing a new assay
A Seurat object
FOV object to gather cell positions from
Cell classifications to count in spatial neighborhood
Name for spatial neighborhoods assay
Number of neighbors to consider for each cell
Number of clusters to return based on the niche assay