Cluster: Clustering cells

scClusterR Documentation

Clustering cells

Description

In RISC, two different methods are provided to cluster cells, all of them are widely used in single cells. The first method is "louvain" based on cell eigenvectors, and the other is "density" which calculates cell clusters using low dimensional space.

Usage

scCluster(
  object,
  slot = "cell.pca",
  neighbor = 10,
  algorithm = "kd_tree",
  method = "louvain",
  npc = 20,
  k = 10,
  res = 0.5,
  dc = NULL,
  redo = TRUE,
  random.seed = 123
)

Arguments

object

RISC object: a framework dataset.

slot

The dimension_reduction slot for cell clustering. The default is "cell.umap" under RISC object "DimReduction" item for UMAP method, but the customer can add new dimension_reduction method under DimReduction and use it.

neighbor

The neighbor cells for "igraph" method.

algorithm

The algorithm for knn, the default is "kd_tree", all options: "kd_tree", "cover_tree", "CR", "brute".

method

The methods for clustering cells, density and louvain. The "density" is based on the slot "cell.umap" or other low dimensional space; while "louvain" based on "cell.pca" (individual data) or "cell.pls" (for integration data).

npc

The number of PCA or PLS used for cell clustering.

k

The number of cluster searched for, works in "density" method.

res

The resolution of cluster searched for, works in "louvain" method.

dc

The distance used to generate random center points which affect clusters. If have no idea about this, do not input anything. Keep it as the default value for most users. Work for "density" method.

redo

Whether re-cluster the cells.

random.seed

The random seed, the default is 123.

Value

RISC single cell dataset, the cluster slot.

References

Blondel et al., JSTAT (2008)

Rodriguez et al., Sicence (2014)

Examples

# RISC object
obj0 = raw.mat[[3]]
obj0 = scPCA(obj0, npc = 10)
obj0 = scUMAP(obj0, npc = 3)
obj0 = scCluster(obj0, slot = "cell.umap", k = 3, method = 'density')
DimPlot(obj0, slot = "cell.umap", colFactor = 'Cluster', size = 2)

bioinfoDZ/RISC documentation built on March 30, 2024, 9:19 p.m.