FindClusteringTree {HGC} | R Documentation

## The HGC algorithm embedded in Seurat pipeline

### 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

    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

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

[Package HGC version 1.2.0 Index]