ropensci / taxadb

:package: Taxonomic Database
https://docs.ropensci.org/taxadb
Other
43 stars 13 forks source link

get_names 'could not convert string' error with NCBI #117

Open miistakis opened 1 year ago

miistakis commented 1 year ago

Using ‘taxadb’ version 0.2.1.99 Have no issues with col, or otis, but for NCBI I get the following error when it attempts to do get_names():

i In argument: accepted_name = get_names(id, "ncbi"). Caused by error in collect(): ! Failed to collect lazy table. Caused by error: ! rapi_execute: Failed to run query Error: Conversion Error: Could not convert string 'NCBI:181977' to INT32

Also, when I try to td_create("ott") I get the error: Error: no match found for schema: common provider: ott version: 22.12

cboettig commented 1 year ago

apologies for the slow reply but thanks for reporting these bugs introduced in the recent release, we'll fix these ASAP.

Meanwhile, with ott you can work around by explicitly requesting only the darwin core data, td_create("ott", "dwc")

Looks like NCBI snapshot currently only has accepted IDs, obviously a bug so we'll fix. meanwhile you can filter on those, e.g.

taxadb::taxa_tbl("ncbi") |> dplyr::filter(acceptedNameUsageID == "NCBI:9606")
miistakis commented 1 year ago

Thanks!