BetaDiv: Beta diversity plotting and statistics

View source: R/BetaDiv.R

BetaDivR Documentation

Beta diversity plotting and statistics

Description

Input otutab, metadata and tree or phyloseq object; support 47 distance types (bray, unifrac, wunifrac ...), 8 ordination method (PCoA, NMDS, ...); output ggplot2 figure, data and statistical test result.

Usage

BetaDiv(
  otu = otutab,
  map = metadata,
  tree = tree,
  ps = NULL,
  group = "Group",
  dist = "bray",
  method = "NMDS",
  Micromet = "adonis",
  pvalue.cutoff = 0.05
)

Arguments

otu

OTU/ASV table;

map

Sample metadata;

tree

tree/nwk file;

group

group ID;

dist

distance type, including "unifrac" "wunifrac" "dpcoa" "jsd" "manhattan" "euclidean" "canberra" "bray" "kulczynski" "jaccard" "gower" "altGower" "morisita" "horn" "mountford" "raup" "binomial" "chao" "cao" "w" "-1" "c" "wb" "r" "I" "e" "t" "me" "j" "sor" "m" "-2" "co";

method

DCA, CCA, RDA, NMDS, MDS, PCoA, PCA, LDA;

Micromet

statistics by adonis/anosim/MRPP;

pvalue.cutoff

Pvalue threshold;

Details

By default, input phyloseq object include metadata, otutab and tree The available diversity indices include the following:

  • most used indices: bray, unifrac, wunifrac

  • other used indices: manhattan, euclidean, jaccard ...

Value

list object including plot, stat table

Author(s)

Contact: Tao Wen 2018203048@njau.edu.cn, Yong-Xin Liu yxliu@genetics.ac.cn

References

Yong-Xin Liu, Yuan Qin, Tong Chen, Meiping Lu, Xubo Qian, Xiaoxuan Guo & Yang Bai. A practical guide to amplicon and metagenomic analysis of microbiome data. Protein Cell, 2020(41), 1-16, DOI: https://doi.org/10.1007/s13238-020-00724-8

Jingying Zhang, Yong-Xin Liu, Na Zhang, Bin Hu, Tao Jin, Haoran Xu, Yuan Qin, Pengxu Yan, Xiaoning Zhang, Xiaoxuan Guo, Jing Hui, Shouyun Cao, Xin Wang, Chao Wang, Hui Wang, Baoyuan Qu, Guangyi Fan, Lixing Yuan, Ruben Garrido-Oter, Chengcai Chu & Yang Bai. NRT1.1B is associated with root microbiota composition and nitrogen use in field-grown rice. Nature Biotechnology, 2019(37), 6:676-684, DOI: https://doi.org/10.1038/s41587-019-0104-4

See Also

beta_pcoa beta_cpcoa

Examples


BetaDiv(otu=otutab_rare, map=metadata, tree=tree, group="Group", dist="bray", method="NMDS", Micromet="adonis", pvalue.cutoff=0.05)


microbiota/amplicon documentation built on April 30, 2023, 1:48 p.m.