Learn R Programming

RAM (version 1.2.1.3)

phylog_taxonomy: Plot Hierarchical Taxonomic Tree

Description

This function plots hierarchical taxonomic tree, the leaves are taxa at a give rank, nonsplitting nodes are not collapsed as ape::plot.phylo does.

Usage

phylog_taxonomy(otu, rank="order", rank.sep="; ", meta, factors=NULL, sel.taxon=NULL, sel.rank=NULL, root="root", cleaves=1, cnodes=1, clabel.leaves = 0.5, clabel.nodes = 0.5, f.phylog = 0.5, sub = TRUE, csub = 1.25, possub = "bottomleft", draw.box = TRUE)

Arguments

otu
an otu table.
rank
optional. If no rank was provided, the data will be used as it is, if rank is provided, if data is an OTU table, it will be converted to taxonomic abundance matrix at the given rank, no change will be made for a data that has already been a taxonomic abundance matrix. See also tax.abund and data.revamp
rank.sep
the delimiter that separate the taxonomic ranks in the otu table; default is "; " (semi colon and a white space)
meta
the metadata table associated with otu table, samples must be in the same order in both otu table and metadata.
factors
the metadata variables, must be categories
sel.taxon
optional, a selected taxon at higher taxonomic rank (i.e. at phylum level). If given, only descendents of this taxa will be plotted.
sel.rank
the rank of sel.taxon
root
optional, the name of the root of the tree. If not given, will use "root"
cleaves
see ?ade4::plot.phylog
cnodes
see ?ade4::plot.phylog
clabel.leaves
see ?ade4::plot.phylog
clabel.nodes
see ?ade4::plot.phylog
f.phylog
see ?ade4::plot.phylog
sub
see ?ade4::plot.phylog
csub
see ?ade4::plot.phylog
possub
see ?ade4::plot.phylog
draw.box
see ?ade4::plot.phylog

Examples

Run this code
data(ITS1, meta)
## Not run: 
# ITS1.1<-filter.OTU(data=list(ITS1=ITS1), percent=0.01)[[1]]
# factors=c("Crop", "City")
# phylog_taxonomy(otu=ITS1.1, rank="family", rank.sep="; ",
#                 meta=meta, factors=NULL, sel.taxon=NULL,
#                 sel.rank=NULL, cleaves=1, cnodes=.5, 
#                 root="k__Fungi", clabel.leaves = 0.5, 
#                 clabel.nodes = 0.5,
#                 f.phylog = 0.8, sub = TRUE, csub = 1.25,
#                 possub = "bottomleft", draw.box = TRUE)
# phylog_taxonomy(otu=ITS1.1, rank="family", rank.sep="; ",
#                 meta=meta, factors=c("Crop", "City", "Plots"),
#                 sel.taxon=NULL, sel.rank=NULL, cleaves=1,
#                 cnodes=.5, clabel.leaves = 0.5, 
#                 clabel.nodes = 0.5,
#                 f.phylog = 0.8, sub = TRUE, csub = 1.25,
#                 possub = "bottomleft", draw.box = TRUE)
# ## End(Not run)

Run the code above in your browser using DataLab