RAPI_FindClusteringTree: The HGC algorithm embedded in Seurat pipeline

Description Usage Arguments Details Value Note Examples

Description

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.

Usage

1
FindClusteringTree(object, graph.type)

Arguments

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".

Details

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.

Value

An Seurat object. The clustering tree is saved under the item graphs, i.e. object@graphs$ClusteringTree.

Note

The function needs the R package Seurat. We recommend that the version of Seurat is higher than version 3.0.

Examples

 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")

XuegongLab/HGC documentation built on Dec. 18, 2021, 7:23 p.m.