This function identifies the spatial neighborhood Spot IDs around a given center Spot ID within a specified radius.
Find_regional_IDs(
object,
spatial_coord,
centerID,
enhanced = FALSE,
radius,
avern = 5
)A list containing:
The input center Spot_ID.
The Spot_IDs of the neighboring spots within the specified radius.
The unit distance used to determine the neighborhood.
An object that could be either 1. A Seurat object, or 2. A data frame where the columns are Spot_IDs (i.e., the gene*spot expression matrix).
A data frame of the spatial coordinates. The column names should include `c("Spot_ID", "imagerow", "imagecol")`, and the row names must be the Spot_ID, which is the same as the row names in the cell type proportion data frame or the column names of the gene*spot expression data frame.
A vector of length 1, representing a single Spot_ID that serves as the center for the neighborhood.
Logical; if `TRUE`, enhances the Seurat object by marking the neighborhood in a special way. Defaults to `FALSE`.
The radius of the spatial neighborhood, specified as a numeric value.
Numeric; the number of samples to average over when determining the unit distance. Defaults to 5.