
Compute SE abundances within spatial neighborhoods (SNs)
Source:R/ComputeSEAbundanceBySN.R
ComputeSEAbundanceBySN.RdCompute SE abundances within spatial neighborhoods (SNs)
Arguments
- df
data.frame, one row per single cell, with at least columns X, Y (spatial coordinates) and SE.
- spot_coords
data.frame of SN centers with columns X, Y (rownames = SN IDs). If NULL, a regular grid of spatial neighborhoods is generated automatically, spaced `grid.size` apart.
- radius
numeric, radius defining the SN (cells within this distance of a SN center are included).
- grid.size
numeric, spacing between adjacent SN centers when `spot_coords` is auto-generated.
- X, Y, SE
column names in `df` for x-coord, y-coord, and SE label.
- min.cells
minimum number of cells required within a SN for it to be kept in the output.