
Pipeline step: graph-based clustering
step_clusters_sc.RdWraps find_clusters_sc() as an ScStep.
Arguments
- cluster_algorithm
String. One of
c("leiden", "louvain").- res
Numeric. The modularity resolution parameter, see
leiden_clustering().- name
Optional string. The name of the obs column to add.
NULLgives"leiden_clustering"or"louvain_clustering", followingcluster_algorithm.- modality
String. On which modality to cluster. One of
c("rna", "adt", "atac", "wnn"). The two latter options are only available for multi-modal versions with the added data.- seed
Integer. For reproducibility.
- ...
Further parameters for
leiden_clustering():n_iterations,beta,min_gain,local_movingandnode_order.
Examples
# Leiden over the graph the neighbours step wrote
step_neighbours_sc() %>>% step_clusters_sc(res = 0.5)
#> <ScPipeline> 2 steps
#> 1. neighbours embd_to_use = "pca", no_embd_to_use = NULL, modality = c("rna", "adt", "atac"), neighbours_params = <list>, seed = 42L, .verbose = TRUE
#> 2. clusters cluster_algorithm = c("leiden", "louvain"), res = 0.5, name = NULL, modality = c("rna", "adt", "atac", "wnn"), seed = 42L