refdb_set_ncbitax: Replace the current taxonomy using the NCBI Taxonomy database

View source: R/refdb_ncbi_taxonomy.R

refdb_set_ncbitaxR Documentation

Replace the current taxonomy using the NCBI Taxonomy database

Description

Replace the current taxonomy using the NCBI Taxonomy database

Usage

refdb_set_ncbitax(
  x,
  min_level = "species",
  force_species_name = TRUE,
  verbose = TRUE
)

Arguments

x

a reference database (tibble) with one or several columns giving the taxonomy of each record and explicitly indicated in the field taxonomy. See refdb_set_fields.

min_level

minimum taxonomic level at which taxonomy should be replaced. Default is the finest level ("species").

force_species_name

if TRUE, species not found in NCBI Taxonomy will keep their original names instead of NAs.

verbose

print information in the console.

Value

The reference database with the NCBI taxonomy for the genus level and higher ranks. (the original taxonomy above the genus level is removed).

Examples

## Not run: 
lib <- read.csv(system.file("extdata", "baetidae_bold.csv", package = "refdb"))
lib <- refdb_set_fields_BOLD(lib)
refdb_set_ncbitax(lib)

## End(Not run)

refdb documentation built on Sept. 22, 2022, 5:07 p.m.