Skip to contents

Cluster similar cells based on their expression profiles.

Usage

cluster(
  x,
  method = c("leiden"),
  resolution = 1,
  n_neighbors = 50,
  out_dir = NULL
)

Arguments

x

A SpatialExperiment object.

method

Clustering method (only leiden is implemented currently).

resolution

Value of the parameter controlling the coarseness of the clusters (higher resolution yields more clusters).

n_neighbors

The maximum number of nearest neighbors to compute.

out_dir

Name of the output analysis directory. If specified, the object and the corresponding plots will be saved there.

Value

A SpatialExperiment object.