Skip to contents

Applies buffering and angle calculations to divide the specified spatial domain within a Seurat object.

Usage

Spatial_expansion(
  st_obj,
  CellTopic,
  meta.col = "CellTopic",
  distance = NULL,
  alpha = NULL,
  type = c("Hexagon", "Square"),
  edge.plot = TRUE,
  image.factor = "lowres"
)

Arguments

st_obj

A Seurat object.

CellTopic

A character string specifying the CellTopic to be chosen.

meta.col

A character string specifying the meta.data column to be used. Defaults to "CellTopic".

distance

A numeric value indicating the distance of expansion. Defaults to NULL, in which case the nearest spot distance will be used.

alpha

A numeric value used for alpha-shape calculation. Defaults to NULL, which uses the nearest spot distance based on data type. See also ashape for more details.

type

A character string specifying the type of spot arrangement. Defaults to "Hexagon" for data with hexagonal spot arrangements. For square spot arrangements, set type = "Square".

edge.plot

Logical indicating whether to display the regional division plot for the specified CellTopic. Defaults to TRUE.

image.factor

A character string specifying the resolution scale factor. Defaults to "lowres".

Value

A Seurat object. The expansion of the data is added to the Seurat@meta.data

and the message is added to Seurat@misc.