plot_tree_ranks: plots a tree along with a series of taxonomic ranks

View source: R/plot.R

plot_tree_ranksR Documentation

plots a tree along with a series of taxonomic ranks

Description

plots a tree along with a series of taxonomic ranks

Usage

plot_tree_ranks(
  tree,
  taxonomy,
  main = NULL,
  type = "unrooted",
  ranks = common_ranks,
  size = 2,
  guide_size = NULL,
  legend_cutoff = 25,
  ...
)

Arguments

tree

to be plotted, use layout_tree to layout tree.

taxonomy

A data.frame with an accession field corresponding to the tree tip labels.

main

An optional title for the plot

type

The type of tree to plot, default unrooted.

ranks

The ranks to include, defaults to all common ranks, if null print all ranks.

size

The size of the colored points

guide_size

The size of the length guide. If NULL auto detects a reasonable size.

legend_cutoff

The number of different taxa names after which the names are no longer printed.

...

additional arguments passed to layout_tree_ape

See Also

plot_tree to plot only a single rank or the just the tree layout.

Examples

library(gridExtra)
library(directlabels)
#plot all the common ranks
plot_tree_ranks(mammals_16S$tree, mammals_16S$taxonomy)
#plot specific ranks, with a larger dot size
plot_tree_ranks(mammals_16S$tree, mammals_16S$taxonomy,
  ranks=c('kingdom', 'class', 'family'), size=3)

jimhester/primerTree documentation built on Oct. 15, 2023, 11:06 p.m.