PCoA: PCoA

Description Usage Arguments Value

Description

UniFrac is implimented as per Phyloseq, Bray Curtis from Vegan, Jensen-Shannon divergence from Phyloseq, and PCoA from APE. Plotting via ggplot2. Will also carry out ADONIS and return p and r2 in plot title. Distances calculated from proportions.

Usage

1
PCoA(METRIC="braycurtis", METADATA=experiment_metadata, FEATURES=otutable, TREE=ggtree, COLOR="Time", SHAPE="Group", SUBSAMPLE=TRUE, AXIS=c(1,2))

Arguments

METRIC

Desired beta-diversity metric, options are Bray Curtis (braycurtis), Weighted UniFrac (weightedunifrac), UnWeighted UniFrac (unweightedunifrac), Jensen-Shannon diversgence (jsd).

METADATA

Metadata Table with variables to color PCoAs by

FEATURES

Table of feature/OTU/SV counts where Samples are columns, and IDs are row names

TREE

Table of feature/OTU/SV counts where Samples are columns, and IDs are row names, only required for UniFrac Metrics

COLOR

Metadata column to color samples by. Defaults to sample names from metadata row names.

SHAPE

Metadata column to shape samples by. Defaults to none.

SUBSAMPLE

Should table be subsampled? TRUE/FALSE (default: TRUE)

AXIS

Which Axis should be plotted? Expects a numeric vector of length 2. defaults to Pco1 and Pco2 AXIS=c(1,2)

ADONIS

Should ADONIS test be applied ? TRUE/FALSE (default TRUE)

Value

Returns a ggplot


jbisanz/MicrobeR documentation built on June 5, 2019, 7:53 p.m.