Skip to contents

The taxonomy functions are used to define exactly which records will be retrieved by the download functions. More precisely, only records that include the taxid/scientificName, retrieved using the taxonomy functions, as the lowest taxonomic identification will be downloaded.

For more details see the 'Searching taxonomy' vignette: vignette("Searching taxonomy", package = "barcodeMineR")

Usage

get_ncbi_taxonomy(ids, api_rate = NULL, ask = TRUE)

Arguments

ids

`character` A character string of species names or taxid from the NCBI.

api_rate

`integer` The API rate with which to iterate each separate request. Must be a number between 3 and 10 which will translate in a rate of `1 / api_rate` seconds.

ask

`logical` Should the function ask the user whether to filter the final output for taxonomic ranks. Default `TRUE`.

Value

`data.frame` A data.frame object with the searched taxonomic classification.

See also

[get_bold_taxonomy()]

Examples

get_ncbi_taxonomy("Polymastia invaginata")
#>               queryName  taxid    rank        scientificName   phylum
#> 1 Polymastia invaginata 283554 species Polymastia invaginata Porifera
#>          class        order        family      genus               species
#> 1 Demospongiae Polymastiida Polymastiidae Polymastia Polymastia invaginata

get_ncbi_taxonomy("283554")
#>   queryName  taxid    rank        scientificName   phylum        class
#> 1        NA 283554 species Polymastia invaginata Porifera Demospongiae
#>          order        family      genus               species
#> 1 Polymastiida Polymastiidae Polymastia Polymastia invaginata