abundance_lines: Create a lineplot ggplot object of the abundance table from a...

View source: R/abundance_lines.R

abundance_linesR Documentation

Create a lineplot ggplot object of the abundance table from a phyloseq object. Function from the phylosmith-package.

Description

Inputs a phyloseq-class object and creates line graphs with points across samples.

Usage

abundance_lines(phyloseq_obj, treatment, subset = NULL,
classification = NULL, relative_abundance = FALSE, points = TRUE,
colors = 'default', 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.

relative_abundance

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

points

if FALSE, will not display the data-points.

colors

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

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

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

schuyler-smith/phyloschuyler documentation built on Aug. 16, 2024, 5:36 a.m.