Skip to contents

GPU counterpart of bixverse::find_clusters_sc(). Runs Leiden or Louvain via leiden_clustering_gpu() on the neighbour graph and adds a column to the obs table. Only the level-0 local moving runs on the GPU, and only on graphs of at least 50,000 cells; smaller graphs run on the CPU. 0 is the largest cluster.

Usage

find_clusters_gpu_sc(
  object,
  cluster_algorithm = c("leiden", "louvain"),
  res = 1,
  name = NULL,
  modality = c("rna", "adt", "atac", "wnn"),
  seed = 42L,
  .verbose = TRUE,
  ...
)

Arguments

object

SingleCells or SingleCellsSubset class from bixverse.

cluster_algorithm

String. One of c("leiden", "louvain").

res

Numeric. The modularity resolution parameter, see leiden_clustering_gpu().

name

Optional string. The name to add to the obs table. If NULL, "<cluster_algorithm>_clustering".

modality

String. Which modality's neighbour graph to use. One of c("rna", "adt", "atac", "wnn"). "adt" and "wnn" need a SingleCellsMultiModal, "atac" a SingleCellsMultiModal or a SingleCellsAtac.

seed

Integer. For reproducibility.

.verbose

Boolean or integer. Controls verbosity.

...

Further parameters for leiden_clustering_gpu(): n_iterations, beta, min_gain, local_moving and node_order.

Value

The object with the added clustering in the obs table.