phy_tax_glom: Agglomerate at higher taxonomic rank/level

View source: R/phy_tax_glom.R

phy_tax_glomR Documentation

Agglomerate at higher taxonomic rank/level

Description

Function that wraps speedyseq's tax_glom function and renames taxa based on more readable names as seen in the taxonomy table

Usage

phy_tax_glom(physeq, level, prefix = NULL, make.unique = TRUE)

Arguments

physeq

A phyloseq object

level

The taxonomic rank to aggregate to. Make sure it matches exactly the column name in the taxonomy table (see rank_names(physeq))

make.unique

whether you should make unique the names. Default is TRUE. The standard separation pattern is _.

Value

An aggregated phyloseq object

Examples


library(gautils2)
data("GlobalPatterns")
gp_Family <- phy_tax_glom(GlobalPatterns, "Family", make.unique = FALSE)
# this code shoots a "duplicated names" error. But you can make these names unique artificially:

gp_Family <- phy_tax_glom(GlobalPatterns, "Family", make.unique = TRUE)



g-antonello/gautils2 documentation built on Nov. 28, 2022, 9:39 a.m.