phy_barplotTaxa: Barplot taxa (beta)

View source: R/phy_barplotTaxa.R

phy_barplotTaxaR Documentation

Barplot taxa (beta)

Description

A not-fully-finished but "MVP" (minimum viable product) function that plots phyloseq data preferrably in relative abundance.

Usage

phy_barplotTaxa(
  physeq,
  x = "Sample",
  tax_fill = NULL,
  title = NULL,
  facet = NULL,
  transform = "compositional"
)

Arguments

physeq

A phyloseq object

x

The x axis variable, default is "Sample", which will plot one column for each sample

tax_fill

The taxonomic level to fill bars by

title

A character vector to entitle the plot with

facet

A character vector of a metadata variable's name

transform

A character vector of the transformation method to apply

Value

A ggplot2 plot, ready to be printed

Examples


data("GlobalPatterns")

testplotSample <- phy_barplotTaxa(physeq = GlobalPatterns,
                                 x = "Sample",
                                 tax_fill = "Genus",
                                 title = "By Sample",
                                 facet = "SampleType",
                                 transform = "compositional")

testplotSample <- phy_barplotTaxa(physeq = GlobalPatterns,
                                 x = "SampleType",
                               tax_fill = "Genus",
                               title = "By Sample",
                               transform = "compositional")


g-antonello/gautils2 documentation built on Nov. 28, 2022, 9:39 a.m.