funguild_assign: Assign Guilds to Organisms Based on Taxonomic Classification

View source: R/funguildr.R

funguild_assignR Documentation

Assign Guilds to Organisms Based on Taxonomic Classification

Description

These functions have identical behavior if supplied with a database; however they download the database corresponding to their name by default.

Usage

funguild_assign(otu_table, db = get_funguild_db(), tax_col = "Taxonomy")

nemaguild_assign(otu_table, db = get_nemaguild_db(), tax_col = "Taxonomy")

Arguments

otu_table

A data.frame with a character column named "Taxonomy" (or another name as specified in tax_col), as well as any other columns. Each entry in "otu_table$Taxonomy" should be a comma-, colon-, underscore-, or semicolon-delimited classification of an organism. Rank indicators as given by Sintax ("⁠k:⁠", "⁠p:⁠"...) or Unite ("k__, "p__", ...) are also allowed. See sample_fungi and sample_nema for examples. A character vector, representing only the taxonomic classification, is also accepted.

db

A data.frame representing the FUNGuild or NEMAGuild database, as returned by get_funguild_db() or get_nemaguild_db(). If not supplied, the default database will be downloaded.

tax_col

A character string, optionally giving an alternate column name in otu_table to use instead of otu_table$Taxonomy.

Details

Taxa present in the database are matched to the taxa present in the supplied otu_table by exact name. In the case of multiple matches, the lowest (most specific) rank is chosen. No attempt is made to check or correct the classification in otu_table$Taxonomy.

Value

A tibble::tibble containing all columns of otu_table, plus relevant columns of information from the FUNGuild or NEMAGuild database.

References

Nguyen NH, Song Z, Bates ST, Branco S, Tedersoo L, Menke J, Schilling JS, Kennedy PG. 2016. FUNGuild: An open annotation tool for parsing fungal community datasets by ecological guild. Fungal Ecology 20:241–248.

Examples

# sample input for nematodes
sample_nema

# nemaguild_testdb is a very small subset of the full database, use only
# in this example!
nemaguild_assign(sample_nema, db = nemaguild_testdb)

# sample input for fungi
sample_fungi

# fungi_testdb is a very small subset of the full database,
# use only in this example!
funguild_assign(sample_fungi, db = funguild_testdb)

brendanf/FUNGuildR documentation built on Oct. 18, 2023, 4:26 p.m.