group.abund.Taxa: Barplot Of Distribution Of Taxa In Groups

Description Usage Arguments Value Note Author(s) Examples

Description

This function do a barplot to show the distribution of selected taxa in each level of a given metadata variable

Usage

1
2
3
4
5
group.abund.Taxa(data, is.OTU=TRUE, rank="g", taxa,
                 drop.unclassified=FALSE, bar.width=NULL,
                 meta, meta.factor="", RAM.theme=NULL,
                 col.pal=NULL, main="",
                 file=NULL, ext=NULL, height=8, width=16)

Arguments

data

a list of otu tables or taxonomic abundance matrices. See also RAM.input.formatting.

is.OTU

logical. If an OTU table was provided, is.OTU should be set as TRUE; otherwise, it should be set as FALSE.

rank

a single taxonomic rank. See also RAM.rank.formatting

taxa

a vector containing taxa names for plotting.

drop.unclassified

logical. Whether or not drop the unclassified taxon groups.

bar.width

width of bars

meta

the metadata table to be used (must have same samples as data.

meta.factor

a character string. Must be one of the metadata variables.

RAM.theme

customized ggplot_theme in RAM. See also ?theme_ggplot.

col.pal

color palettes to be used.

main

a character string. The title of the plot, default is an empty string.

file

filename to save the plot.

ext

filename extension, the type of image to be saved to.

width

an integer, width of the plot.

height

an integer, height of the plot.

Value

This function returns a Barplot of the distribution of seleted taxa within each level of a given metadata variable.

Note

This funtion provide an alternative view of taxa distribution as group.Taxa.bar.

Author(s)

Wen Chen.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(ITS1, ITS2, meta)
taxa <- c("Fusarium", "Alternaria", "Cladosporium")
#otu tables
data <- list(ITS1=ITS1, ITS2=ITS2)
group.abund.Taxa(data=data, taxa=taxa, meta=meta,
                 meta.factor="Crop", drop.unclassified=TRUE)
#abundance tables
ITS1ab <- tax.abund(ITS1, rank="g")
ITS2ab <- tax.abund(ITS2, rank="g")
group.abund.Taxa(data=list(ITS1ab=ITS1ab, ITS2ab=ITS2ab), 
                 is.OTU=FALSE, taxa=taxa,
                 meta=meta, meta.factor="Crop", 
                 drop.unclassified=TRUE)

Example output

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-3
Loading required package: ggplot2
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied

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