Get organism taxonomy (Open Tree of Life Taxonomy)
Source:R/get_organism_taxonomy_ott.R
get_organism_taxonomy_ott.Rd
This function retrieves taxonomy from the Open Tree of Life taxonomy
Usage
get_organism_taxonomy_ott(
df,
url = "https://api.opentreeoflife.org/v3/taxonomy/about",
retry = TRUE
)
Examples
df <- data.frame("organism" = "Homo sapiens")
get_organism_taxonomy_ott(df)
#> 2024-11-22 11:24:08 Testing if Open Tree of Life API is up
#> 2024-11-22 11:24:08 Success! Submitting request...
#> 2024-11-22 11:24:09 Request finished!
#> 2024-11-22 11:24:09 Getting taxonomy...
#> 2024-11-22 11:24:09 Taxonomy retrieved!
#> 2024-11-22 11:24:09 Got OTTaxonomy!
#> organism_name organism_taxonomy_ottid organism_taxonomy_01domain
#> <char> <int> <char>
#> 1: Homo sapiens 770315 Eukaryota
#> organism_taxonomy_02kingdom organism_taxonomy_03phylum
#> <char> <char>
#> 1: Metazoa Chordata
#> organism_taxonomy_04class organism_taxonomy_06family
#> <char> <char>
#> 1: Mammalia Hominidae
#> organism_taxonomy_08genus organism_taxonomy_09species
#> <char> <char>
#> 1: Homo Homo sapiens
#> organism_taxonomy_05order organism_taxonomy_07tribe
#> <char> <char>
#> 1: <NA> <NA>
#> organism_taxonomy_10varietas
#> <char>
#> 1: <NA>
unlink("data", recursive = TRUE)