View source: R/alpha_boxplot.R
alpha_boxplot | R Documentation |
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.
alpha_boxplot(alpha_div, metadata, index = "richness", groupID = "Group")
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. |
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
ggplot2 object.
Contact: Yong-Xin Liu yxliu@genetics.ac.cn
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
alpha_barplot
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.