Annotate a tree

Easy way to plot a phylogenetic tree

ann_tree(f_tax, otutab = NULL, level = ncol(f_tax))

easy_tree(
  tree,
  highlight = "Phylum",
  colorfill = "color",
  topN = NULL,
  pal = NULL,
  name_prefix = FALSE,
  basic_params = NULL,
  add_abundance = TRUE,
  color_name = "abundance",
  add_tiplab = TRUE,
  fontsize = NULL
)

Arguments

f_tax

taxonomy dataframe

otutab

otutab, rowname==rowname(taxonomy)

level

1~7

tree

result from ann_tree

highlight

highlight which level, one of tree$level

colorfill

"color" or "fill"

topN

topN to show

pal

color pal

name_prefix

keep the prefix like "k__" or "p__" in the label? Default: FALSE

basic_params

parameters parse to ggtree

add_abundance

logical

color_name

color name

add_tiplab

logical

fontsize

tip label fontsize

Value

a treedata

a ggplot

Examples

if (interactive()) {
  data(otutab, package = "pcutils")
  ann_tree(taxonomy, otutab) -> tree
  # run yourself
  easy_tree(tree, add_abundance = FALSE) -> p
  p
}