phylogeny_profile: Create a ggplot object of the phylogenic barplots from a...

View source: R/phylogeny_profile.R

phylogeny_profileR Documentation

Create a ggplot object of the phylogenic barplots from a phyloseq object. Function from the phylosmith-package.

Description

Inputs a phyloseq-class object and creates phylogenic barplots.

Usage

phylogeny_profile(phyloseq_obj, treatment = NULL, subset = NULL,
classification = NULL, merge = TRUE, relative_abundance = FALSE,
colors = 'default', grid = FALSE, treatment_labels = NULL,
sample_labels = NULL, classification_labels= NULL)

Arguments

phyloseq_obj

A phyloseq-class object. It must contain sample_data()) with information about each sample, and it must contain tax_table()) with information about each taxa/gene.

treatment

Column name as a string or number in the sample_data. This can be a vector of multiple columns and they will be combined into a new column.

subset

A factor within the treatment. This will remove any samples that to not contain this factor. This can be a vector of multiple factors to subset on.

classification

Column name as a string or number in the tax_table for the factor to use for node colors.

merge

if FALSE, will show separation of individuals within each classification.

relative_abundance

If TRUE, transforms the abundance data into relative abundance by sample.

colors

Name of a color set from the RColorBrewer package or a vector palette of R-accepted colors.

grid

Wraps the sub-plots into a grid pattern rather than side-by-side.

treatment_labels

a vector of names to be used as labels for treatments/facets.

sample_labels

a vector of names to be used as labels for Samples.

classification_labels

a vector of names to be used as labels for the taxonomic classifications.

Value

ggplot-object

Examples

phylogeny_profile(soil_column, classification = 'Phylum',
treatment = c('Matrix', 'Treatment'), merge = TRUE,
relative_abundance = TRUE)

schuyler-smith/phyloschuyler documentation built on March 27, 2024, 4:29 p.m.