Description Usage Arguments Details Value Examples
Performs clustering on sampled cells and Post-hoc Cluster Assignment.
1 2 3 |
object |
A SingleCellExperiment object containing normalized expression values in |
use.subsamples |
uses the indices obtained from the sampling method. |
method |
character, one of c("default", "hclust", "kmeans").,
In the default mode, louvain based partition is used.
When |
use.reduced.dims |
optional, when used, the name of the |
k_nn |
integers, specifies number of nearest neighbours, defaults to 10. |
conf |
numeric [0-1], defines the expected confidence of majority for a consensus. Cells remain unassigned when majority is below |
use.previous |
optional, when |
... |
For the |
Clustering is carried out in two alternate approaches on the sampled cells.
For the default setting or quick identification of the existing broad clusters,
a Louvain based partition is employed. Otherwise for fine-tuned clustering with outliers,
hierarchical clustering is used with cutreeDynamic
for dendrogram cut. Also, Assigns cluster membership to unsampled cells by using cluster membership information of the nearest neighbours.
An approximate nearest neighbour graph is constructed out of the samples population using the find_ann()
module.
Some cells are left un-assigned when its neighbour's cluster membership doesn't form a majority as specified by the conf
parameter.
Unassigned cells (NA
) are excluded in the plot or further downstream analysis.
List of:
cluster.ident
vector cluster identifiers ranging from 1 to the number of clusters for respective data points.
nn.ids
matrix, each row corresponds to a cell, whose columns depict cluster membership of its neighbours; as returned by the find_ann()
module.
Unassigned samples are represented byNA
values.
1 2 3 4 5 6 7 8 9 10 | library(SingleCellExperiment)
ncells <- 1000
ngenes <- 2000
x <- matrix(rpois(ncells*ngenes, lambda = 10), ncol=ncells, nrow=ngenes, byrow=TRUE)
rownames(x) <- paste0("Gene", seq_len(ngenes))
colnames(x) <- paste0("Cell", seq_len(ncells))
sce <- SingleCellExperiment(list(counts=x))
sce <- CountNormalize(sce)
sce <- RankGenes(sce)
sce <- Cluster(sce, use.subsamples=FALSE, conf=0.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.