View source: R/phy_betaPlotTaxon.R
phy_betaPlotTaxon | R Documentation |
The function wraps the phyloseq functions "distance", "ordinate", and "plot_ordination". This function is useful to see the gradient of abundance of a taxon in the 2D ordinated dataset
phy_betaPlotTaxon(physeq, dist = "bray", method = "PCoA", axes = 1:2, taxon)
physeq |
A phyloseq object, **CAREFUL**: the function doesn't transform internally, so if you choose to calculate the distance matrix internally with "ordinate", make sure you transform the counts prior to function call (usually relative abundance is accepted) |
dist |
distance object or character vector saying the distance metric to apply |
method |
one of the methods allowed by "ordinate" in the phyloseq object |
axes |
The axes to be plotted, default are the first 2, which should discriminate samples better |
taxon |
the taxon name to color the samples by. The palette is "viridis_c" |
a ggplot2 object
data("enterotype") phy_betaPlotTaxon(physeq = enterotype, dist = "bray", method = "PCoA", axes = 1:2, taxon = "Bacteroides")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.