tax_circlize: Plotting circlize of taxonomy for groups or samples

View source: R/tax_circlize.R

tax_circlizeR Documentation

Plotting circlize of taxonomy for groups or samples

Description

Input taxonomy composition, and metadata (SampleID and groupID). Then select top N high abundance taxonomy and group other low abundance. When Select samples can draw sample composition by facet groups. If used group can show mean of each group. Finally, return a ggplot2 object.

Usage

tax_circlize(tax_sum, metadata, topN = 5, groupID = "Group")

Arguments

tax_sum

composition matrix, like OTU table and rowname is taxonomy, typical output of usearch -sintax_summary;

metadata

matrix or dataframe, including sampleID and groupID;

topN

Top N taxonomy to show, default 8, alternative 4, 6, 10 ...;

groupID

column name for groupID;

style

group or sample, default group

sorted

Legend sorted type, default abundance, alternative alphabet

Details

By default, returns top 8 taxonomy and group mean stackplot The available style include the following:

  • group: group mean circlize

  • sample: each sample circlize

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, 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

tax_circlize

Examples

# Taxonomy table in phylum level, rownames is Phylum, colnames is SampleID
data(tax_phylum)
# metadata, include SampleID, Group and Site
data(metadata)
# Set 4 parameters: set top 5 taxonomy, group by "Group"
tax_circlize(tax_sum = tax_phylum, metadata, topN = 5, groupID = "Group")

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