top.groups.plot: Plot the Top Taxon Groups

Description Usage Arguments Note Author(s) See Also Examples

Description

These functions consume two OTU tables, along with (optionally) a file name and a parameter top. They create a box plot of the top number of OTUs (for plot.top.number), or all OTUs with relative abundance above top percent (for plot.top.percent) at the taxonomic ranks phylum, class, order, family, and genus.

Usage

1
2
3
4
5
6
7
8
group.top.number(data, top=10, ranks=c("p","c","o","f","g"),
                 drop.unclassified=FALSE, cex.x=NULL,
                 main=NULL,file=NULL, ext=NULL, height=8, 
                 width=16, bw=FALSE, ggplot2=TRUE)
group.top.percent(data, top=10, ranks=c("p","c","o","f","g"),
                  drop.unclassified=FALSE, cex.x=NULL,
                  main=NULL, file=NULL, ext=NULL, height=8,
                  width=16, bw=FALSE, ggplot2=TRUE)

Arguments

data

a list of OTU tables.

top

the number of OTUs to select (for top.number), or the minimum relative abundance threshold to use for selecting OTUs (for top.percent).

ranks

a vector of the taxonomic ranks. See also RAM.rank.formatting

drop.unclassified

logical. Should OTUs labelled "unclassified" or missing classification at the given taxonomic rank be excluded?

cex.x

optional. The size of the x axis names.

main

the title of the plot

file

the file path where the image should be created (see ?RAM.plotting).

ext

the file type to be used; one of "pdf", "png", "tiff", "bmp", "jpg", or "svg".

height

the height of the image to be created (in inches).

width

the width of the image to be created (in inches).

bw

logical. Should the image be created in black and white?

ggplot2

logical. Should the ggplot2 package be used to produce the plot, or should the base graphics be used? (see ?RAM.plotting).

Note

Please be aware that the 'whiskers' in the plot may differ depending on the setting of ggplot2. Please see geom_boxplot boxplot, and boxplot.stats for more information on how the whiskers are calculated.

Author(s)

Wen Chen and Joshua Simpson.

See Also

RAM.plotting

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data(ITS1, ITS2)
# plots the top 10 OTUs (by default) at five ranks
group.top.percent(data=list(ITS1=ITS1, ITS2=ITS2), top=10)
# plots all OTUs w/ relative abundance > 10% (as specified) at
# five ranks and saves the result as a .tiff file
# (only using ITS1 data)
group.top.percent(data=list(ITS1=ITS1, ITS2=ITS2), top=10,
                 file="my/file/path", ext="tiff")
## End(Not run)

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