Provides summary information of the representation of a taxonomic levels within each sample.

summarize_taxa(ps, level = rank_names(ps)[1], absolute = TRUE, sep = "|")

Arguments

ps

a phyloseq-class object.

level

taxonomic level to summarize, default the top level rank of the ps.

absolute

logical, whether return the absolute abundance or relative abundance, default FALSE.

sep

a character string to separate the taxonomic levels.

Value

a phyloseq::phyloseq object, where each row represents a taxa, and each col represents the taxa abundance of each sample.

Examples

data(enterotypes_arumugam)
summarize_taxa(enterotypes_arumugam)
#> phyloseq-class experiment-level object
#> otu_table()   OTU Table:         [ 244 taxa and 39 samples ]
#> sample_data() Sample Data:       [ 39 samples by 9 sample variables ]
#> tax_table()   Taxonomy Table:    [ 244 taxa by 1 taxonomic ranks ]