plot_select_taxa: A boxplot for user specified list of taxa

View source: R/plot_select_taxa.R

plot_select_taxaR Documentation

A boxplot for user specified list of taxa

Description

User specifed OTUs are plotted.

Usage

plot_select_taxa(
  x,
  select.taxa,
  variableA,
  palette,
  plot.type,
  group.order = NULL
)

Arguments

x

phyloseq-class object.

select.taxa

a character list of taxa to be plotted. eg. select.taxa <- c("OTU-370251", "OTU-311173", "OTU-341024").

variableA

Variable of interested to be checked. This will also be used to color the plot.

palette

Any of the RColorBrewer plettes.

plot.type

Three optons c("stripchart", "boxplot", "violin")

group.order

Default is NULL. a list specifing order of x-axis. E.g. c("H","CRC","nonCRC")

Details

Useful for instances where user is interested only in some OTUs. For example OTUs reported to be significantly diferent.

Value

ggplot object. This can be further modified using ggpubr.

Examples

## Not run: 
# Example data
library(microbiome)
library(microbiomeutilities)
data("zackular2014")
p0 <- zackular2014
p0.f <- format_to_besthit(p0)
select.taxa <- c("OTU-d__denovo31:Dorea", "OTU-d__denovo24:Blautia")
p <- plot_select_taxa(p0.f, select.taxa, "DiseaseState", "Paired", plot.type = "stripchart")
print(p)

## End(Not run)

microsud/microbiomeutilities documentation built on Nov. 29, 2022, 12:18 a.m.