View source: R/plot_ordiplot_core.R
plot_ordiplot_core | R Documentation |
This function will plot the ordaination along with highligthing the core microbes on the species ordination.
plot_ordiplot_core( x, ordiObject, prevalences, detections, min.prevalence, color.opt, shape, Samples = c(TRUE, FALSE) )
x |
|
ordiObject |
Output of ordinate from package phyloseq. Only NMDS and Bray supported. |
prevalences |
Prevalences as supported by microbiome package. |
detections |
Detections as supported by microbiome package. |
min.prevalence |
Minimum prevalence value to plot. |
color.opt |
Variable of interest from metadata. |
shape |
Variable of interest from metadata. |
Samples |
c("TRUE" or "FALSE") |
This function is useful for visualizing core taxa in a 2D ordination plot.
plot
## Not run: library(microbiomeutilities) library(RColorBrewer) data("zackular2014") p0 <- zackular2014 ps1 <- format_to_besthit(p0) ps1 <- subset_samples(ps1, DiseaseState == "H") ps1 <- prune_taxa(taxa_sums(ps1) > 0, ps1) prev.thres <- seq(.05, 1, .05) det.thres <- 10^seq(log10(1e-4), log10(.2), length = 10) pseq.rel <- microbiome::transform(ps1, "compositional") ord.bray <- ordinate(pseq.rel, "NMDS", "bray") p <- plot_ordiplot_core(pseq.rel, ord.bray, prev.thres, det.thres, min.prevalence = 0.9, color.opt = "DiseaseState", shape = NULL, Sample = TRUE ) p ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.