aggregate_taxa {microbiome}R Documentation

Aggregate Taxa

Description

Summarize phyloseq data into a higher phylogenetic level.

Usage

aggregate_taxa(x, level, top = NULL)

Arguments

x

phyloseq-class object

level

Summarization level (from rank_names(pseq))

top

Keep the top-n taxa, and merge the rest under the category 'Other'. Instead of top-n numeric this can also be a character vector listing the groups to combine.

Details

This provides a convenient way to aggregate phyloseq OTUs (or other taxa) when the phylogenetic tree is missing. Calculates the sum of OTU abundances over all OTUs that map to the same higher-level group. Removes ambiguous levels from the taxonomy table. Returns a phyloseq object with the summarized abundances.

Value

Summarized phyloseq object

Author(s)

Contact: Leo Lahti microbiome-admin@googlegroups.com

References

See citation('microbiome')

Examples

  data(dietswap)
  s <- aggregate_taxa(dietswap, 'Phylum')

[Package microbiome version 1.2.1 Index]