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, reduction.type = "pca",
dims.use = NULL, k.param = 30, k.scale = 25, plot.SNN = FALSE,
prune.SNN = 1/15, print.output = TRUE, distance.matrix = NULL,
save.SNN = FALSE, reuse.SNN = FALSE, force.recalc = FALSE,
modularity.fxn = 1, resolution = 0.8, algorithm = 1, n.start = 100,
n.iter = 10, random.seed = 0, temp.file.location = NULL)
Seurat object
A vector of gene names to use in construction of SNN graph if building directly based on expression data rather than a dimensionally reduced representation (i.e. PCs).
Name of dimensional reduction technique to use in construction of SNN graph. (e.g. "pca", "ica")
A vector of the dimensions to use in construction of the SNN graph (e.g. To use the first 10 PCs, pass 1:10)
Defines k for the k-nearest neighbor algorithm
Granularity option for k.param
Plot the SNN graph
Sets the cutoff for acceptable Jaccard distances when computing the neighborhood overlap for the SNN construction. Any edges with values less than or equal to this will be set to 0 and removed from the SNN graph. Essentially sets the strigency of pruning (0 --- no pruning, 1 --- prune everything).
Whether or not to print output to the console
Build SNN from distance matrix (experimental)
Saves the SNN matrix associated with the calculation in object@snn
Force utilization of stored SNN. If none store, this will throw an error.
Force recalculation of SNN.
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.
Directory where intermediate files will be written. Specify the ABSOLUTE path.
Returns a Seurat object and optionally the SNN matrix, object@ident has been updated with new cluster info