bartax | R Documentation |
The bartax()
function will create taxonomic composition barcharts. If desired,
low-abundant taxonomic groups will be clustered into a single low abundant group.
bartax(
x,
xvar = "Sample",
lowabun = 0.01,
yvar = "Abundance",
taxrank = "Genus",
cols = NULL
)
x |
is a |
xvar |
is a categorical variable selected from the metadata. |
lowabun |
is the cut off value for a low-abundant group. Set to |
yvar |
is the relative abundance of reads. |
taxrank |
is the specified taxonomic rank. |
cols |
is a vector containing specified colour values (sufficient number for number of taxonomic groups). |
A ggplot
object.
library(mirlyn)
data(example)
cols <- c("black","darkgoldenrod1","dodgerblue","deeppink4","chartreuse3",
"burlywood4","navy","blueviolet", "tan2","lavenderblush3","cyan4")
bartax(example, "Sample", lowabun = 0.01, yvar = "Abundance", taxrank = "Phylum", cols)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.