summaryPlotOTU: Wrapper function for ggplot2 to make bar and line graphs of...

Description Usage Arguments Details Value Author(s) References

View source: R/summaryPlotOTU.R

Description

This function is called automatically by OTUsummary() and also can be used separately to plot the results produced by OTUsummary() with more plotting options

Usage

1
2
summaryPlotOTU(data, xgroup, facet = NA, type = "bar", 
x.order = NA, whiskers = "ci", otus = NA,log.base=10)

Arguments

data

A summary table generated by HPDplot(), it is the first element in the returned list.

xgroup

Which factor will be used to form the x axis (for 2-way designs).

facet

The factor by which the plot will be split into facets (for 2-way designs).

type

Two types are supported: "bar" and "line" ("line" also has points). "bar" is more useful to plot fold-changes returned when OTUsummary() is run with the option 'relative=TRUE'. "line" is better for plotting actual inferred OTU abundances across factor levels; it is particularly good for time courses and other cases when multiple factor levels must be compared to each other. "bar" is good to plot log(fold-changes) relative to global control.

x.order

A vector giving the order of factor levels on the x-axis. If unspecified, alphanumeric order will be used.

whiskers

The interval indicated by the whiskers. Default is "ci", the 95% credible interval; another option is "sd" - standard deviation of the posterior.

otus

Vector of OTU names to plot. By default, all OTUs in the summary will be plotted.

log.base

Base of the logarithm to indicate on the y-axis label.

Details

The function invokes ggplot() functon from the ggplot2 package to plot the results either as a single panel (one-way designs) or a multi-panel (2-way designs, one panel per level of the factor specified by 'facet' argument).

Value

A ggplot object. See http://docs.ggplot2.org/0.9.2.1/theme.html for ways to modify it, such as add text, rotate labels, change fonts, etc.

Author(s)

Mikhail V. Matz, University of Texas at Austin <matz@utexas.edu>

References

Elizabeth A. Green, Sarah W. Davies, Mikhail V. Matz, Monica Medina Next-generation sequencing reveals cryptic Symbiodinium diversity within Orbicella faveolata and Orbicella franksi at the Flower Garden Banks, Gulf of Mexico. PeerJ 2014 https://peerj.com/preprints/246/


MCMC.OTU documentation built on May 1, 2019, 10:55 p.m.