Description Usage Arguments Details Value Note Examples
The function runs hierarchical clustering with HGC.dendrogram
on the SNN or KNN calculated by the Seurat
pipeline. The output clustering tree is also packaged in the
Seurat
object.
1 | FindClusteringTree(object, graph.type)
|
object |
The Seurat object containing the graphs built with scRNA-seq data. |
graph.type |
The type of graphs used for the hierarchical clustering, could be "SNN" or "KNN". The default value is "SNN". |
For the KNN graph, we symmetrize it by adding its transposition on
the graph. And for the details of data preprocessing and graph construction
by Seurat
, please check the Seurat
vignettes.
An Seurat
object. The clustering tree is saved under the item
graphs
, i.e. object@graphs$ClusteringTree
.
The function needs the R package Seurat
. We recommend that the
version of Seurat
is higher than version 3.0.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Do not run
# require(Seurat)
## DemoData is a input gene expression matrix.
# DemoData.seuratobj <- CreateSeuratObject(counts = DemoData,
# min.cells = 20)
# DemoData.seuratobj <- NormalizeData(object = DemoData.seuratobj,
# verbose = F)
# DemoData.seuratobj <- ScaleData(object = DemoData.seuratobj,
# features = row.names(DemoData.seuratobj),
# verbose = F)
# DemoData.seuratobj <- FindVariableFeatures(object = DemoData.seuratobj,
# nfeatures = 2000, verbose = F)
# DemoData.seuratobj <- RunPCA(object = DemoData.seuratobj,
# npcs = 100, verbose = F)
# DemoData.seuratobj <- FindNeighbors(object = DemoData.seuratobj,
# nn.eps = 0.5, k.param = 30,
# dims = 1:25, verbose = F)
# DemoData.seuratobj <- FindClusteringTree(object = DemoData.seuratobj,
# graph.type = "SNN")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.