View source: R/scanpyFunctions.R
runScanpyFindClusters | R Documentation |
runScanpyFindClusters Computes the clusters from the input sce object and stores them back in sce object
runScanpyFindClusters(
inSCE,
useAssay = "scanpyScaledData",
useReducedDim = "scanpyPCA",
nNeighbors = 10,
dims = 40,
method = c("leiden", "louvain"),
colDataName = NULL,
resolution = 1,
niterations = -1,
flavor = "vtraag",
use_weights = FALSE,
cor_method = "pearson",
inplace = TRUE,
externalReduction = NULL,
seed = 12345
)
inSCE |
(sce) object from which clusters should be computed and stored in |
useAssay |
Assay containing scaled counts to use for clustering. |
useReducedDim |
Reduction method to use for computing clusters.
Default |
nNeighbors |
The size of local neighborhood (in terms of number of
neighboring data points) used for manifold approximation. Larger values
result in more global views of the manifold, while smaller values result in
more local data being preserved. Default |
dims |
numeric value of how many components to use for computing
clusters. Default |
method |
selected method to compute clusters. One of "louvain",
and "leiden". Default |
colDataName |
Specify the name to give to this clustering result.
Default is |
resolution |
A parameter value controlling the coarseness of the
clustering. Higher values lead to more clusters Default |
niterations |
How many iterations of the Leiden clustering method to
perform. Positive values above 2 define the total number of iterations to
perform, -1 has the method run until it reaches its optimal clustering.
Default |
flavor |
Choose between to packages for computing the clustering.
Default |
use_weights |
Boolean. Use weights from knn graph. Default |
cor_method |
correlation method to use. Options are ‘pearson’,
‘kendall’, and ‘spearman’. Default |
inplace |
If True, adds dendrogram information to annData object,
else this function returns the information. Default |
externalReduction |
Pass DimReduce object if PCA computed through
other libraries. Default |
seed |
Specify numeric value to set as a seed. Default |
Updated sce object which now contains the computed clusters
data(scExample, package = "singleCellTK")
## Not run:
sce <- runScanpyNormalizeData(sce, useAssay = "counts")
sce <- runScanpyFindHVG(sce, useAssay = "scanpyNormData", method = "seurat")
sce <- runScanpyScaleData(sce, useAssay = "scanpyNormData")
sce <- runScanpyPCA(sce, useAssay = "scanpyScaledData")
sce <- runScanpyFindClusters(sce, useReducedDim = "scanpyPCA")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.