View source: R/alpha_barplot.R
alpha_barplot | R Documentation |
Input alpha index and metadata, and manual set alpha index and metadata column names. ANOVA or agricolae::LSD.test calculate p-value, and dplyr summary each group max for p-value groups position. ggplot2 show barplot, error bar and stat groups.
alpha_barplot(alpha_div, metadata, index = "richness", groupID = "genotype")
alpha_div |
alpha diversity matrix, typical output of usearch -alpha_div or vegan estimateR/diversity(), rowname is sampleID, colname is index of alpha diversity; |
metadata |
matrix or dataframe, including sampleID and groupID; |
index |
index types of alpha diversity; |
groupID |
column name for groupID. |
By default, input alpha diversity and metatdata, and output plot The available diversity indices include the following:
most used indices: chao1, richness, shannon_e
other used indices: berger_parker, buzas_gibson, dominance, equitability, jost, jost1, reads, robbins, simpson, shannon_2, shannon_10
ggplot2 object.
Contact: Tao Wen 2018203048@njau.edu.cn, Yong-Xin Liu yxliu@genetics.ac.cn
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
alpha_rare alpha_boxplot
# Set four parameters: alpha_div, metadata, index and groupID
alpha_barplot(alpha_div, metadata, "richness", "genotype")
# Set two parameters: alpha_div, metadata, and index and groupID as using chao1 and site
alpha_barplot(alpha_div, metadata, "chao1", "site")
# Set four parameters: alpha_div, metadata, index and groupID with full parameters
alpha_barplot(alpha_div = alpha_div, metadata = metadata, index = "richness", groupID = "genotype")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.