PerformBetaDiversity: Function to plot beta diversity.

View source: R/mdp_utils.R

PerformBetaDiversityR Documentation

Function to plot beta diversity.

Description

This functions creates beta diversity plots.

Usage

PerformBetaDiversity(
  mbSetObj,
  plotNm,
  ordmeth,
  distName,
  colopt,
  metadata,
  showlabel,
  taxrank,
  taxa,
  alphaopt,
  ellopt,
  comp.method,
  format = "png",
  dpi = 72,
  custom_col = "none",
  interactive = FALSE
)

Arguments

mbSetObj

Input the name of the mbSetObj.

plotNm

Character, input the name of the beta-diversity score plot.

ordmeth

Ordination method. Character, input "PCoA" to create a PCoA plot and "NMDS" to create a NMDS plot.

distName

Character, input the name of the distance method. "bray" for Bray-Curtis Index, "jsd" for Jensen-Shannon Divergence, "jaccard" for Jaccard Index, "unifrac" for Unweighted Unifrac Distance and "wunifrac" for Weighted Unifrac Distance.

colopt

Character, input whether the data points should be colored by experimental factor with "expfac", taxon abundance with "taxa" or alpha diversity with "alphadiv".

metadata

Input the name of the preferred experimental factor, only used if colopt is "expfac".

showlabel

Character, input whether or not to label samples in the plot. "none" to label no samples, "samnm" to label samples by their name, and "Class" for their group classification.

taxrank

Character, input the taxonomic level to calculate beta-diversity.

taxa

Character, input the specific taxon used to color the data points. Only used if colopt is set to "taxa".

alphaopt

Character, input the name of the alpha-diversity metric. "Chao1", "Observed", "ACE", "Shannon", "Simpson", or "Fisher".

ellopt

Character, input "yes" to show ellipses and "no" to not.

format

Character, input the preferred format of the plot. By default it is set to "png".

dpi

Numeric, input the dots per inch. By default it is set to 72.

custom_col

Set to "none" to use the default color palette, "viridis" to use the default viridis color palette, "plasma" to use the plasma viridis color palette and "magma" to use the magma color palette.

interactive

Boolean, if set to TRUE, saves the plot as an interactive html plot.

Author(s)

Jeff Xia jeff.xia@mcgill.ca McGill University, Canada License: GNU GPL (>= 2)


xia-lab/MicrobiomeAnalystR documentation built on April 17, 2024, 7:45 p.m.