% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tax_circlize.R
\name{tax_circlize}
\alias{tax_circlize}
\title{Plotting circlize of taxonomy for groups or samples}
\usage{
tax_circlize(tax_sum, metadata, topN = 5, groupID = "Group")
}
\arguments{
\item{tax_sum}{composition matrix, like OTU table and rowname is taxonomy, typical output of usearch -sintax_summary;}

\item{metadata}{matrix or dataframe, including sampleID and groupID;}

\item{topN}{Top N taxonomy to show, default 8, alternative 4, 6, 10 ...;}

\item{groupID}{column name for groupID;}

\item{style}{group or sample, default group}

\item{sorted}{Legend sorted type, default abundance, alternative alphabet}
}
\value{
ggplot2 object.
}
\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.
}
\details{
By default, returns top 8 taxonomy and group mean stackplot
The available style include the following:
\itemize{
\item{group: group mean circlize}
\item{sample: each sample 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")
}
\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: \url{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: \url{https://doi.org/10.1038/s41587-019-0104-4}
}
\seealso{
tax_circlize
}
\author{
Contact: Yong-Xin Liu \email{metagenome@126.com}
}
