Identify clusters of cells by a shared nearest neighbor (SNN) modularity optimization based clustering algorithm. First calculate k-nearest neighbors and construct the SNN graph. Then optimize the modularity function to determine clusters. For a full description of the algorithms, see Waltman and van Eck (2013) The European Physical Journal B.
FindClusters(object, genes.use = NULL, pc.use = NULL, k.param = 30,
k.scale = 25, plot.SNN = FALSE, prune.SNN = 1/15, save.SNN = FALSE,
reuse.SNN = FALSE, do.sparse = FALSE, modularity.fxn = 1,
resolution = 0.8, algorithm = 1, n.start = 100, n.iter = 10,
random.seed = 0, print.output = TRUE)
Seurat object
Gene expression data
Which PCs to use for construction of the SNN graph
Defines k for the k-nearest neighbor algorithm
granularity option for k.param
Plot the SNN graph
Stringency of pruning for the SNN graph (0 - no pruning, 1 - prune everything)
Whether to save the SNN in an object slot
Force utilization of stored SNN. If none store, this will throw an error.
Option to store and use SNN matrix as a sparse matrix. May be necessary datasets containing a large number of cells.
Modularity function (1 = standard; 2 = alternative).
Value of the resolution parameter, use a value above (below) 1.0 if you want to obtain a larger (smaller) number of communities.
Algorithm for modularity optimization (1 = original Louvain algorithm; 2 = Louvain algorithm with multilevel refinement; 3 = SLM algorithm).
Number of random starts.
Maximal number of iterations per random start.
Seed of the random number generator.
Whether or not to print output to the console
Returns a Seurat object and optionally the SNN matrix, object@ident has been updated with new cluster info