phylo_taxonomy: Plot Hierarchical Taxonomic Tree with Relative Abundance

Description Usage Arguments Author(s) Examples

Description

This function plots hierarchical taxonomic tree with relative abundance of all taxa at a give rank if category variables are provided. Nonsplitting nodes are collapsed as ape::plot.phylo does.

Usage

1
2
3
4
5
6
7
phylo_taxonomy(otu, rank="order", rank.sep="; ", meta, factors,
              plot.type="phylogram", edge.width=1, cex=0.7,
              font = 1, x.lim = NULL, tip.offset=0, tip.cex=0.5,
              thermo=FALSE, thermo.horiz=TRUE, thermo.width=0.5,
              thermo.height=1, node.frame="r", node.bg="white",
              node.col="black", node.width=0.5, node.height=0.6,
              node.cex=0.6, node.font=1)

Arguments

otu

an otu table.

rank

taxonomic ranks, see ?RAM.rank.formatting

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

plot.type

tree type, default is phylogram. see ?plot.phylo

edge.width

see ?ape::plot.phylo

cex

size of tip labels.

font

font of tip labels

x.lim

a numeric vector of length one or two giving the limit(s) of the x-axis. see ?ape::plot.phylo

tip.offset

the distance between tips of the phylogeny and their corresponding labels, see ?plot.phylo

tip.cex

size of the pies

thermo

add pies or thermometers to the tips

thermo.horiz

orientiation of the thermometers

thermo.width

width of the thermometers

thermo.height

height of the thermometers

node.frame

type of frame around the nodes

node.bg

background color of text frames of nodes

node.col

color of the nodes

node.width

width of the text frames of nodes

node.height

height of the text frames of nodes

node.cex

size of text of nodes

node.font

font of text of nodes

Author(s)

Wen Chen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(ITS1, meta)
## Not run: 
ITS1.1<-filter.OTU(data=list(ITS1=ITS1), percent=0.01)[1]
factors=c("Crop", "City")
res<-phylo_taxonomy(otu=ITS1, meta=meta, factors=factors,
                    rank="order", rank.sep="; ", tip.offset=0,
                    x.lim=NULL, thermo=FALSE, cex=0.5,
                    tip.cex=0.5)
names(res)
require("plotKML")
par(mfrow=c(1,2))
for (i in 1:length(factors)) {
  display.pal(res[[1]][[i]])
}
par()

## End(Not run)

RAM documentation built on May 2, 2019, 3:04 p.m.