View source: R/beta_cpcoa_dis.R
beta_cpcoa_dis | R Documentation |
Input distance matrix and metadata, and manual set metadata column names. ggplot2 show CPCoA with color and stat ellipse.
beta_cpcoa_dis(
distance_mat,
metadata,
groupID = "genotype",
ellipse = T,
label = F
)
metadata |
matrix or dataframe, including sampleID and groupID; |
groupID |
column name for groupID. |
ellipse |
stat ellipse, T or F. |
label |
sample name showing, T or F. |
dis |
distance type for caucluate, default "bray_curtis", alternative "unifrac, unifrac_binary, jaccard、manhatten, euclidean". |
By default, returns beta CPCoA coordinate The available diversity indices include the following:
most used indices: bray_curtis, unifrac, unifrac_binary, jaccard
other used indices: manhatten, euclidean
ggplot2 object.
Contact: Yong-Xin Liu metagenome@126.com
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, 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
beta_cpcoa_dis
# example data: OTU table, rownames is OTU_xxx, colnames is SampleID
data(beta_bray_curtis)
# example data: metadata or design, include SampleID, genotype and site
data(metadata)
# Set 2 parameters: otu table, metadata, and distance type and groupID using default "bray_curtis" and "genotype"
beta_cpcoa_dis(beta_bray_curtis, metadata)
# Set 3 parameters: distance matrix, metadata, and groupID as "site"
beta_cpcoa_dis(beta_bray_curtis, metadata, "site")
# Set 5 parameters: distance matrix, metadata, and groupID as using "genotype", open stat elipse and sample label
beta_cpcoa_dis(beta_bray_curtis, metadata, groupID = "genotype", ellipse = T, label = T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.