clusterCells: Cluster cells into a specified number of groups based on .

Description Usage Arguments Value References

View source: R/clustering.R

Description

Unsupervised clustering of cells is a common step in many single-cell expression workflows. In an experiment containing a mixture of cell types, each cluster might correspond to a different cell type. This method takes a CellDataSet as input along with a requested number of clusters, clusters them with an unsupervised algorithm, and then returns the CellDataSet with the cluster assignments stored in the pData table. When number of clusters is set to NULL (num_clusters = NULL), the decision plot as introduced in the above citation will be plotted and the users are required to click on the decision plot to select the rho and delta to determine the number of clusters to cluster.

Usage

1
2
3
4
5
6
clusterCells(cds, skip_rho_sigma = F, num_clusters = NULL,
  inspect_rho_sigma = F, rho_threshold = NULL, delta_threshold = NULL,
  peaks = NULL, gaussian = T, cell_type_hierarchy = NULL,
  frequency_thresh = NULL, enrichment_thresh = NULL,
  clustering_genes = NULL, method = c("densityPeak", "DDRTree"),
  verbose = F, ...)

Arguments

cds

the CellDataSet upon which to perform this operation

skip_rho_sigma

A logic flag to determine whether or not you want to skip the calculation of rho / sigma

num_clusters

Number of clusters. The algorithm use 0.5 of the rho as the threshold of rho and the delta corresponding to the number_clusters sample with the highest delta as the density peaks and for assigning clusters

inspect_rho_sigma

A logical flag to determine whether or not you want to interactively select the rho and sigma for assigning up clusters

rho_threshold

The threshold of local density (rho) used to select the density peaks

delta_threshold

The threshold of local distance (delta) used to select the density peaks

peaks

A numeric vector indicates the index of density peaks used for clustering. This vector should be retrieved from the decision plot with caution. No checking involved. will automatically calculated based on the top num_cluster product of rho and sigma.

gaussian

A logic flag passed to densityClust function in desnityClust package to determine whether or not Gaussian kernel will be used for calculating the local density

cell_type_hierarchy

A data structure used for organizing functions that can be used for organizing cells

frequency_thresh

When a CellTypeHierarchy is provided, cluster cells will impute cell types in clusters that are composed of at least this much of exactly one cell type.

enrichment_thresh

includeDescrip

clustering_genes

a vector of feature ids (from the CellDataSet's featureData) used for ordering cells

method

method for clustering cells. By default, we use density peak clustering algorithm for clustering. The other method is based on DDRTree.

verbose

Verbose parameter for DDRTree

...

Additional arguments passed to densityClust()

Value

an updated CellDataSet object, in which phenoData contains values for Cluster for each cell

References

Rodriguez, A., & Laio, A. (2014). Clustering by fast search and find of density peaks. Science, 344(6191), 1492-1496. doi:10.1126/science.1242072


Bioconductor-mirror/monocle documentation built on Aug. 10, 2017, 10:49 a.m.