getClusterTree {treekoR} | R Documentation

## getClusterTree This function takes a CATALYST sce with clusters and creates a hierarchical tree

### Description

getClusterTree This function takes a CATALYST sce with clusters and creates a hierarchical tree

### Usage

    getClusterTree(
      exprs,
      clusters,
      hierarchy_method = "hopach",
      hopach_kmax = 5,
      hopach_K = 10,
      scale_exprs = TRUE
    )

### Arguments

`exprs` | a dataframe containing single cell expression data
`clusters` | a vector representing the cell type or cluster of each cell (can be character or numeric). If numeric, cluster names need to be consecutive starting from 1.
`hierarchy_method` | a string indicating the hierarchical tree construction method to be used
`hopach_kmax` | integer between 1 and 9 specifying the maximum number of children at each node in the tree
`hopach_K` | positive integer specifying the maximum number of levels in the tree. Must be 15 or less, due to computational limitations (overflow)
`scale_exprs` | boolean indicating whether to scale median cluster expression data before constructing hierarchical tree

### Value

a list containing the cluster median frequencies and a phylogram of the hierarchical tree

### Examples

    library(SingleCellExperiment)
    data(COVIDSampleData)

    sce <- DeBiasi_COVID_CD8_samp
    exprs <- t(assay(sce, "exprs"))
    clusters <- colData(sce)$cluster_id
    classes <- colData(sce)$condition
    samples <- colData(sce)$sample_id

    clust_tree <- getClusterTree(exprs,
                                 clusters,
                                 hierarchy_method="hopach")

[Package treekoR version 1.2.1 Index]