tax2tree: tax2tree

tax2treeR Documentation

tax2tree

Description

tax2tree

Usage

tax2tree(
  x,
  ranks = c("kingdom", "phylum", "class", "order", "family", "genus", "species"),
  depth = NULL,
  summarise = FALSE,
  output = "phylo",
  replace_bads = FALSE,
  append_sum = TRUE
)

Arguments

x

a DNAbin object or an object coercible to DNAbin

ranks

The taxonomic ranks currently assigned to the names

depth

The depth within the tree to return. Default NULL to return lowest input rank

summarise

Select a taxonomic rank to summarise below. Default is FALSE to return a tree of the same size as input

output

The output to return, options are: "phylo" to return an ape phylo object. If summarise is set to a rank, the number of distinct taxa at that rank numbers are appended to the tip labels if append_sum is TRUE, or returned as an attribute and can be accessed with attr(tree, "sum") "data.tree" to return a data.tree node object "treedf" to return a simplified tree with taxon summaries in a data frame "newick" to return a newick file for visualisation in other software. If summarise is set to a rank, the number of distinct taxa at that rank numbers are returned as an attribute and can be accessed with attr(tree, "sum")

replace_bads

An option to automatically replace invalid newick characters with '-'

append_sum

An option to append the summary number to the output trees tip labels when summarise is a rank and output is 'phylo'. If FALSE, summary numbers are returned as an attribute and can be accessed with attr(tree, "sum")

Value

a phylo, data.tree, newick, or treedf object


alexpiper/taxreturn documentation built on Sept. 14, 2024, 7:56 p.m.