Classify taxa in a SQL table to a specific level based on the classification table in the Vault database, or a user-supplied override table.
When to is not "original", a cli warning is emitted to alert the
user that the automatic classification workflow may contain errors, and
to recommend calling get_classification_table() to inspect it.
Usage
classify_taxa(
data_source = NULL,
sel_con = NULL,
to = c("original", "species", "genus", "family"),
classification_data = NULL
)Arguments
- data_source
A SQL table that contains
taxon_idcolumn.- sel_con
A connection to the Vault database. Required when
classification_dataisNULL.- to
A character vector that specifies the classification level to classify the taxa. The options are
original,species,genus, andfamily.- classification_data
An optional
data.frame(ortibble) to use instead of theTaxonClassificationtable from the database. Must contain ataxon_idcolumn and the column corresponding toto(i.e.taxon_species,taxon_genus, ortaxon_family). IfNULL(default), the classification is read from the database. Obtain a valid table viaget_classification_table(con, return_raw_data = TRUE).