make_utax_taxonomy_batch: Prepare taxonomy annotations in SINTAX or UTAX style for...

View source: R/make_utax_taxonomy.R

make_utax_taxonomy_batchR Documentation

Prepare taxonomy annotations in SINTAX or UTAX style for multiple species.

Description

Prepare taxonomy annotations in SINTAX or UTAX style for multiple species.

Usage

make_utax_taxonomy_batch(x, as_vector = T, ...)

Arguments

x

Data frame (columns are ordered taxonomy levels, rows are species or OTUs)

as_vector

Logical, if TRUE (default) result will be returned as vector. Otherwise, result is a data frame

...

Additional arguments may be passed to make_utax_taxonomy

Value

Vector or a data frame with taxonomy strings in USEARCH format.

See Also

http://drive5.com/usearch/manual/tax_annot.html

Examples

# Create dummy data (each row = species)
datt <- data.frame(
  Kingdom = rep(LETTERS[1:3], each = 12),
  Phylum = rep(LETTERS[6:11], each = 6),
  Class = rep(letters[1:12], each = 3),
  Order = do.call(paste0, expand.grid(letters, letters, stringsAsFactors = F))[1:36],
  stringsAsFactors = F
)

head(datt)  # Taxonomy table
head(make_utax_taxonomy_batch(datt))  # Taxonomy strings for USEARCH classifiers


vmikk/metagMisc documentation built on June 20, 2024, 7:20 a.m.