map_nodes_ott: Add Open Tree of Life Taxonomy to tree nodes.

View source: R/opentree_chronograms.R

map_nodes_ottR Documentation

Add Open Tree of Life Taxonomy to tree nodes.

Description

Add Open Tree of Life Taxonomy to tree nodes.

Usage

map_nodes_ott(tree)

Arguments

tree

A tree either as a newick character string or as a phylo object.

Value

A phylo object with "nodelabels".

Examples

## Not run: 

# Load the Open Tree chronograms database cached in datelife:
utils::data(opentree_chronograms)

# Get the small chronograms (i.e., chronograms with less that ten tips) to generate a pretty plot:
small <- opentree_chronograms$trees[unlist(sapply(opentree_chronograms$trees, ape::Ntip)) < 10]

# Now, map the Open Tree taxonomy to the nodes of the first tree
phy <- map_nodes_ott(tree = small[[1]])
# and plot it:
# plot_phylo_all(phy)
library(ape)
plot(phy)
nodelabels(phy$node.label)


## End(Not run) # end dontrun

OpenTreeChronograms documentation built on June 22, 2022, 9:08 a.m.