Returns the per-cell kernel-weighted neighbour abundances: the Gaussian
biological kernel K_bio (used for the proximity coefficients) and the
short-range exponential technical kernel K_tech. Useful for inspecting the
neighbourhood before or independently of a fit.
Usage
buildNeighbourhood(object, ...)
# S4 method for class 'SpatialExperiment'
buildNeighbourhood(
object,
celltype_col,
h_bio = 30,
h_tech = 5,
eps = NULL,
...
)Arguments
Examples
spe <- readRDS(system.file("extdata", "bc_xenium_subset.rds", package = "PACE"))
nb <- buildNeighbourhood(spe, celltype_col = "cellType")
dim(nb$K_bio)
#> [1] 7898 8
