Learn R Programming

Seurat (version 5.2.0)

RunLeiden: Run Leiden clustering algorithm

Description

Returns a vector of partition indices.

Usage

RunLeiden(
  object,
  method = deprecated(),
  partition.type = c("RBConfigurationVertexPartition", "ModularityVertexPartition",
    "RBERVertexPartition", "CPMVertexPartition", "MutableVertexPartition",
    "SignificanceVertexPartition", "SurpriseVertexPartition"),
  initial.membership = NULL,
  node.sizes = NULL,
  resolution.parameter = 1,
  random.seed = 1,
  n.iter = 10
)

Arguments

object

An adjacency matrix or adjacency list.

method

DEPRECATED.

partition.type

Type of partition to use for Leiden algorithm. Defaults to "RBConfigurationVertexPartition", see https://cran.rstudio.com/web/packages/leidenbase/leidenbase.pdf for more options.

initial.membership

Passed to the `initial_membership` parameter of `leidenbase::leiden_find_partition`.

node.sizes

Passed to the `node_sizes` parameter of `leidenbase::leiden_find_partition`.

resolution.parameter

A parameter controlling the coarseness of the clusters for Leiden algorithm. Higher values lead to more clusters. (defaults to 1.0 for partition types that accept a resolution parameter)

random.seed

Seed of the random number generator, must be greater than 0.

n.iter

Maximal number of iterations per random start