colourTree {treekoR} | R Documentation |
Adding statistical test results onto the tree by using colourful nodes and branches Takes a ggtree object with test results for each node and returns a ggtree graph object
colourTree( tree, point_size = 1.5, high = "#00c434", low = "purple", mid = "ivory2" )
tree |
a tree plot created from the ggtree() function with p$data containing test statisic and p- |
point_size |
size of nodes in the tree |
high |
colour for large values |
low |
colour for low values |
mid |
colour for middle values |
an interactive ggplot graph object, plotting the hierarchical tree of clusters with nodes and branches coloured by the significance testing results.
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, subjects=NULL, paired = FALSE) colourTree(tested_tree)