Performs Kmeans/PAM clustering on defined method-assays a defined reduction.

perform.reduction.kmeans(
  object,
  assay,
  reduction = NULL,
  dims = NULL,
  k = NULL,
  cluster.df.name.suffix = "",
  method = "kmeans",
  ...
)

Arguments

object

IBRAP S4 class object

assay

Character. String containing indicating which assay to use

reduction

Character. Which reduction(s) within the assay should be supplied. Default = NULL

dims

Numerical. How many dimensions of the reduction should be supplied.Default = NULL

k

Numerical. How many clusters should the algorithm identify, this can be a range. Default = NULL

method

Which algorithm should be used, options: 'kmeans', 'pam'. Default = 'kmeans

...

Arguments to be passed to either base::kmeans or cluster::pam, depending on the defined method

assignment.df.name

Character. What to call the df contained in clusters.

Value

Cluster assignments using the list of resolutions provided contained within cluster_assignments under assignment.df.name