alpha_boxplot: Plotting alpha diversity boxplot for each group with ANOVA...

View source: R/alpha_boxplot.R

alpha_boxplotR Documentation

Plotting alpha diversity boxplot for each group with ANOVA statistics

Description

Input alpha index and metadata, and manual set alpha index and metadata column name ANOVA+TukeyHSD/agricolae::LSD.test calculate p-value, and dplyr summary each group max for p-value groups position. ggplot2 show boxplot, jitter and stat groups.

Usage

alpha_boxplot(alpha_div, metadata, index = "richness", groupID = "Group")

Arguments

alpha_div

alpha diversity matrix, typical output of usearch(-alpha_div)/QIIME/vegan rowname is sample ID, colname is index of alpha diversity;

metadata

matrix or data frame, including sample ID and group ID;

index

index type of alpha diversity;

groupID

column name for group ID.

Details

By default, returns richness diversity index The available diversity indices include the following:

  • most used indices: richness, simpson, shannon_2

  • other used indices: berger_parker, buzas_gibson, dominance, equitability, jost, jost1, reads, robbins, simpson, shannon_2, shannon_10

Value

ggplot2 object.

Author(s)

Contact: 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

See Also

alpha_barplot

Examples

# Input alpha index (alpha_div) and metadata, select richness (index type) and Group (catagory)
alpha_boxplot(alpha_div, metadata, "richness", "Group")
# Select shannon_2 (index type) and Site (catagory)
alpha_boxplot(alpha_div = alpha_div, metadata = metadata, index = "shannon_2", groupID = "Site")

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