View source: R/microbiome_helpers.R
Makes a box plot from a list of OTUs
1 2 3 4 |
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 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.