Skip to contents

Plot tree coefficients from multivariate testing at each node. Only applicable top fixed effect tests

Usage

plotTreeTestBeta(
  tree,
  low = "blue",
  mid = "white",
  high = "red",
  xmax.scale = 1.5
)

Arguments

tree

phylo object storing tree

low

low color on gradient

mid

mid color on gradient

high

high color on gradient

xmax.scale

expand the x-axis by this factor so leaf labels fit in the plot

Examples

library(variancePartition)

# Load cell counts, clustering and metadata
# from Kang, et al. (2018) https://doi.org/10.1038/nbt.4042
data(IFNCellCounts)

# Apply crumblr transformation
cobj <- crumblr(df_cellCounts)

# Use dream workflow to analyze each cell separately
fit <- dream(cobj, ~ StimStatus + ind, info)
fit <- eBayes(fit)

# Perform multivariate test across the hierarchy
res <- treeTest(fit, cobj, hcl, coef = "StimStatusstim")

# Plot hierarchy, no tests are significant 
plotTreeTestBeta(res)