read_tree_greengenes | R Documentation |
In principal, this is a standard newick format, that can be imported
into R using read_tree
,
which in-turn utilizes read.tree
.
However, read.tree
has failed to import
recent (October 2012 and later) releases of the GreenGenes tree,
and this problem has been traced to the additional annotations
added to some internal nodes
that specify taxonomic classification between single-quotes.
To solve this problem and create a clear container
for fixing future problems with the format of GreenGenes-released trees,
this function is available in phyloseq and exported for users.
It is also referenced in the documentation of the import functions
for QIIME legacy and BIOM format importers –
import_qiime
and import_biom
, respectively.
However, since the precise format of the tree is not restricted to GreenGenes trees
by QIIME or for the biom-format, this function is not called
automatically by those aforementioned import functions.
If your tree is formatted like, or is one of, the official GreenGenes
release trees, then you should use this function and provide its output
to your relevant import function.
read_tree_greengenes(treefile)
treefile |
(Required). A character string implying
a file |
A tree, represented as a phylo
object.
# Read the May 2013, 73% similarity official tree, # included as extra data in phyloseq. treefile = system.file("extdata", "gg13-5-73.tree.gz", package="phyloseq") x = read_tree_greengenes(treefile) x class(x) y = read_tree(treefile) y class(y) ## Not run, causes an error: # library("ape") # read.tree(treefile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.