Perform SNN graph clustering on a
SingleCellExperiment object, with graph
construction by buildSNNGraph and graph clustering by
"igraph" package.
runScranSNN(
inSCE,
useAssay = NULL,
useReducedDim = NULL,
useAltExp = NULL,
altExpAssay = "counts",
altExpRedDim = NULL,
clusterName = "scranSNN_cluster",
k = 10,
nComp = 50,
weightType = c("rank", "number", "jaccard"),
algorithm = c("walktrap", "louvain", "infomap", "fastGreedy", "labelProp",
"leadingEigen")
)A SingleCellExperiment
object.
A single character, specifying which
assay to perform the clustering algorithm
on. Default NULL.
A single character, specifying which
low-dimension representation (reducedDim)
to perform the clustering algorithm on. Default NULL.
A single character, specifying the assay which
altExp to perform the clustering
algorithm on. Default NULL.
A single character, specifying which
assay in the chosen
altExp to work on. Only used when
useAltExp is set. Default "counts".
A single character, specifying which
reducedDim within the altExp specified by
useAltExp to use. Only used when useAltExp is set. Default
NULL.
A single character, specifying the name to store
the cluster label in colData. Default
"scranSNN_cluster".
An integer, the number of nearest neighbors used to construct
the graph. Smaller value indicates higher resolution and larger number of
clusters. Default 10.
An integer, the number of components to use when
useAssay or useAltExp is specified. WON'T work with
useReducedDim. Default 50.
A single character, that specifies the edge weighing
scheme when constructing the Shared Nearest-Neighbor (SNN) graph. Choose from
"rank", "number", "jaccard". Default "rank".
A single character, that specifies the community
detection algorithm to work on the SNN graph. Choose from "walktrap",
"louvain", "infomap", "fastGreedy", "labelProp",
"leadingEigen". Default "walktrap".
The input SingleCellExperimentobject with factor cluster labeling updated in
colData(inSCE)[[clusterName]].
Aaron Lun and et. al., 2016
data("mouseBrainSubsetSCE")
mouseBrainSubsetSCE <- runScranSNN(mouseBrainSubsetSCE,
useReducedDim = "PCA_logcounts")
#> Thu Mar 31 12:11:44 2022 ... Running 'scran SNN clustering'