plot_OTUs: Plot OTUs

Description Usage Arguments

View source: R/microbiome_helpers.R

Description

Makes a box plot from a list of OTUs

Usage

1
2
3
4
plot_OTUs(physeq, otus, xaxis, fill, labeller = "Genus",
  scales = "free_y", palette = "Set1", glom = NULL, dds = NULL,
  justDf = FALSE, y_scale = c("log_counts", "counts", "relative"),
  nrow = NULL, ncol = NULL)

Arguments

physeq

a valid phyloseq object with raw OTU counts that have not been transformed.

otus

a character vector of OTU ids, present in physeq. Can be "all" to plot all OTUs

xaxis

character, the sample column to plot on the x-axis

fill

character, the sample column to use for colouring the boxes

labeller

character, taxonomy rank to label the OTUs with. Can also be "label" which will label with genus if available and family if genus is unassigned. In this case a prefix for the taxonomic rank is addes as well

scales

fixed or free scales, passed to facet_wrap

palette

RColorBrewer palette to use

glom

character, the taxonomic rank to glom at

dds

valid DESeq2 object. If present the normalized count data will be used instead of the raw count value.

justDf

logical, should just the data be returned instead of plotting

y_scale

character, the abundance scale on the y-axis. Counts are just the raw OTU counts unless a DESeq object is provided with the dds argument, in which case the normalized counts will be used. log_counts will transform the counts by log2 using a pseudcount of +0.5. relative will use the relative abundance values instead of counts. @param nrow number of facet rows, passed to facet_wrap @param ncol same as nrow but for columns


mworkentine/mattsUtils documentation built on May 23, 2019, 11:58 a.m.