clustering | R Documentation |
clustering
currently implements two methods. The first approach groups
cells into xdim
xydim
clusters using FlowSOM, and then
performs metaclustering with ConsensusClusterPlus into maxK
clusters.
The second approach performs dimention reduction through UMAP, constructs
shared nearest-neighbor graphs using scran, and then performs community
detection using the Leuvein algorithm in igraph. In both cases,
an SingleCellExperiment
object with a 'cluster_id
' column is
returned.
clustering_with_masking
performs a preliminary clustering and prompts
the user to provide the clusters to be masked. The median expression
value heatmap will be generated by plotClusterHeatmap
. Then the function
performs the main clustering only using the non-masked cells. The masked cells
will be assigned to a cluster ID of zero.
clustering( sce, features = rownames(sce), by_exprs_values = "normexprs", method = "FlowSOM", xdim = 20, ydim = 20, maxK = 40, n_components = min(c(10, length(features))), n_neighbors = 10, min_dist = 0.1, seed = 12345 ) clustering_with_masking( sce, features = rownames(sce), features_masking = rownames(sce), by_exprs_values = "normexprs", method = "FlowSOM", xdim = 20, ydim = 20, maxK = 40, n_components = min(c(10, length(features))), n_neighbors = 10, min_dist = 0.1, seed = 12345 )
sce |
A |
features |
A character vector. Specifies which antigens to use for clustering. |
by_exprs_values |
A character string. Specifies which assay data to use for clustering. |
method |
A character string. Specifies which clustering method to use. Currently, either "FlowSOM" or "SNNGraph" is supported. |
xdim, ydim |
Numeric. Specifies the grid size of the self-orginizing map. For example, 20x20 grid will yield 400 clusters. |
maxK |
Numeric. Specifies the maximum number of clusters to evaluate
in the metaclustering. For |
n_components, n_neighbors, min_dist |
Specifies parameters for UMAP and SNN-graph construction. |
seed |
Numeric. Sets a random seed. |
features_masking |
A character vector. Specifies which antigens to use for the preliminary masking. |
A SingleCellExperiment-class
object with a
'cluster_id
' column. Masked cells are assigned to the cluster 0.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.