beta_pcoa_stat: Calculate beta diversity p-value by Adonis

View source: R/beta_pcoa_stat.R

beta_pcoa_statR Documentation

Calculate beta diversity p-value by Adonis

Description

Input distance matrix and metadata, and manual set metadata column names. Save a table with P-value by Adonis.

Usage

beta_pcoa_stat(
  dis_mat,
  metadata,
  groupID = "Group",
  result = "beta_pcoa_stat.txt",
  pairwise = T,
  pairwise_list = "vignettes/compare.txt"
)

Arguments

dis_mat

distance matrix, typical output of usearch -beta_div,

metadata

matrix or dataframe, including sampleID and groupID;

groupID

column name for groupID.

pairwise

group pairwise compare, only groups less than 5, T or F.

pairwise_list

a file include pairwise list.

Value

ggplot2 object.

Author(s)

Contact: Yong-Xin Liu metagenome@126.com

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

Examples

# Set essential 3 parameters: distance matrix, metadata and groupID
beta_pcoa_stat(beta_bray_curtis, metadata, "Group", "beta_pcoa_stat.txt")
# Set 5 parameters: dis_mat, metadata, and groupID, pairwise FLASE, can set pairwise_list in file
beta_pcoa_stat(dis_mat, metadata, groupID="Group", pairwise=F, pairwise_list="vignettes/compare.txt")

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