Assign Guilds to Organisms Based on Taxonomic Classification
Source:R/funguild.R
funguild_assign.RdThe original function and documentation was written by Brendan Furneaux in the FUNGuildR package.
These functions have identical behavior if supplied with a database; however they download the database corresponding to their name by default.
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.
Arguments
- otu_table
A
data.framewith acharactercolumn named "Taxonomy" (or another name as specified intax_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. Acharactervector, representing only the taxonomic classification, is also accepted.- db_url
a length 1 character string giving the URL to retrieve the database from
- db_funguild
A
data.framerepresenting the FUNGuild as returned byget_funguild_db()If not supplied, the default database will be downloaded.- tax_col
A
characterstring, optionally giving an alternate column name inotu_tableto use instead ofotu_table$Taxonomy.
Value
A tibble::tibble containing all columns of
otu_table, plus relevant columns of information from the FUNGuild
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.
Author
Brendan Furneaux (orcid: 0000-0003-3522-7363), modified by Adrien Taudière