This function collapses single-cell gene expression data into spots or bins, depending on the desired format.

visiumize(
  data = NULL,
  style = c("spots", "bins"),
  label = NULL,
  bin_res = NULL,
  nb.method = c("Q", "C", "D", "K", "M"),
  k = 20,
  d.max = 40,
  soi = F,
  layers = 1
)

Arguments

data

a Seurat object containing Kandinsky data slot

style

character, define the final data format. Must be one between 'spots' (Visium) and 'bins' (Visium-HD)

label

character string specifying the variable name to be used to defne cell annotation groups

bin_res

numeric, Visium-HD bin resolution when style is set to 'bins'.

nb.method

spatial neighbour method to apply to the collapsed data. See kandinsky_init documentation

k

numeric, number of nearest neighbours to be set when 'nb.method = K'

d.max

numeric, maximum centroid distance threshold to be set when 'nb.method = C | M'

soi

boolean, whether or not filter Delaunay network to keep sphere of influence (SOI) graph. Default is FALSE

layers

numeric, number of concentric contiguous layers to include in spot neighbourhood. Only Applied when 'nb.method = Q'. Default is 1

Value

a new Seurat object containing newly generated Visium/Visium-HD data and associated Kandinsky data