getTreeResults {treekoR} | R Documentation

## getTreeResults

### Description

getTreeResults

### Usage

    getTreeResults(testedTree, sort_by = "parent")

### Arguments

`testedTree` | a ggtree object outputed from testTree()
`sort_by` | whether to sort by p-values testing via proportions to parent or p-values testing via absolute proportions. Values can can be c(NA, "parent", "all")

### Value

a dataframe with hierarchical tree nodes, corresponding clusters and corresponding significance testing results

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

    tested_tree <- testTree(clust_tree$clust_tree,
                            clusters=clusters,
                            samples=samples,
                            classes=classes,
                            pos_class_name=NULL)

    res_df <- getTreeResults(tested_tree)

    head(res_df, 10)

[Package treekoR version 1.2.1 Index]