Spatial smoother wrapper for SpatialExperiment and SingleCellExperiment objects

spatialSmoother(
  object,
  assay2smooth = "logcounts",
  smoothedAssay = NULL,
  smoothReducedDim = FALSE,
  reducedDim2smooth = "PhiSpace",
  smoothedReducedDim = NULL,
  x_coord = NULL,
  y_coord = NULL,
  k = 10,
  kernel = "linear",
  sigma = NULL,
  include_self = TRUE,
  verbose = TRUE
)

Arguments

object

SpatialExperiment or SingleCellExperiment object

assay2smooth

Name of assay to smooth (for gene expression smoothing)

smoothedAssay

Name for the new smoothed assay (default: paste0(assay2smooth, "_smoothed"))

smoothReducedDim

Logical, whether to smooth reduced dimensions instead of gene expression

reducedDim2smooth

Name of reduced dimension to smooth (default: "PhiSpace")

smoothedReducedDim

Name for the new smoothed reduced dimension (default: paste0(reducedDim2smooth, "_smoothed"))

x_coord

Column name in colData for x coordinates (required for SCE objects)

y_coord

Column name in colData for y coordinates (required for SCE objects)

k

Number of nearest neighbors (default: 10)

kernel

Kernel function: "gaussian", "uniform", or "linear" (default: "gaussian")

sigma

Bandwidth parameter for Gaussian kernel (default: auto-computed)

include_self

Whether to include the cell itself in smoothing (default: TRUE)

verbose

Show progress bar or not.

Value

Modified object with new smoothed assay or reduced dimension