Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query works with taxize but doesn't work with taxizedb #57

Open
stitam opened this issue Nov 10, 2021 · 5 comments
Open

Query works with taxize but doesn't work with taxizedb #57

stitam opened this issue Nov 10, 2021 · 5 comments

Comments

@stitam
Copy link
Collaborator

stitam commented Nov 10, 2021

Hi,

This function from the taxize package works:

taxize::classification("podoviridae", "ncbi")
#> No ENTREZ API key provided
#>  Get one via taxize::use_entrez()
#> See https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/
#> ══  1 queries  ═══════════════
#> 
#> Retrieving data for taxon 'podoviridae'
#> ✓  Found:  podoviridae
#> ══  Results  ═════════════════
#> 
#> • Total: 1 
#> • Found: 1 
#> • Not Found: 0
#> No ENTREZ API key provided
#>  Get one via taxize::use_entrez()
#> See https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/
#> $podoviridae
#>             name         rank      id
#> 1        Viruses superkingdom   10239
#> 2  Duplodnaviria        clade 2731341
#> 3 Heunggongvirae      kingdom 2731360
#> 4    Uroviricota       phylum 2731618
#> 5 Caudoviricetes        class 2731619
#> 6   Caudovirales        order   28883
#> 7    Podoviridae       family   10744
#> 
#> attr(,"class")
#> [1] "classification"
#> attr(,"db")
#> [1] "ncbi"

The equivalent from taxizedb does not:

taxizedb::classification("podoviridae")
#> Error: Problem with `summarise()` column `taxids`.
#> ℹ `taxids = paste(.data$tax_id, collapse = "|")`.
#> x Column `tax_id` not found in `.data`
#> ℹ The error occurred in group 1: name = "podoviridae".

session_info:

devtools::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value                         
#>  version  R version 4.1.2 (2021-11-01)  
#>  os       Debian GNU/Linux 11 (bullseye)
#>  system   x86_64, linux-gnu             
#>  ui       X11                           
#>  language en_GB:en                      
#>  collate  en_GB.UTF-8                   
#>  ctype    en_GB.UTF-8                   
#>  tz       Europe/Budapest               
#>  date     2021-11-10                    
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version date       lib source        
#>  assertthat    0.2.1   2019-03-21 [3] CRAN (R 4.0.0)
#>  cachem        1.0.3   2021-02-04 [3] CRAN (R 4.0.3)
#>  callr         3.7.0   2021-04-20 [1] CRAN (R 4.1.2)
#>  cli           3.0.1   2021-07-17 [1] CRAN (R 4.1.1)
#>  crayon        1.4.1   2021-02-08 [1] CRAN (R 4.1.1)
#>  desc          1.2.0   2018-05-01 [3] CRAN (R 4.0.0)
#>  devtools      2.3.2   2020-09-18 [3] CRAN (R 4.0.2)
#>  digest        0.6.27  2020-10-24 [3] CRAN (R 4.0.3)
#>  ellipsis      0.3.2   2021-04-29 [1] CRAN (R 4.1.1)
#>  evaluate      0.14    2019-05-28 [3] CRAN (R 4.0.0)
#>  fastmap       1.1.0   2021-01-25 [3] CRAN (R 4.0.3)
#>  fs            1.5.0   2020-07-31 [3] CRAN (R 4.0.2)
#>  glue          1.4.2   2020-08-27 [1] CRAN (R 4.1.1)
#>  highr         0.8     2019-03-20 [3] CRAN (R 4.0.0)
#>  htmltools     0.5.1.1 2021-01-22 [3] CRAN (R 4.0.3)
#>  knitr         1.31    2021-01-27 [3] CRAN (R 4.0.3)
#>  lifecycle     1.0.1   2021-09-24 [1] CRAN (R 4.1.1)
#>  magrittr      2.0.1   2020-11-17 [1] CRAN (R 4.1.1)
#>  memoise       2.0.0   2021-01-26 [3] CRAN (R 4.0.3)
#>  pkgbuild      1.2.0   2020-12-15 [3] CRAN (R 4.0.3)
#>  pkgload       1.1.0   2020-05-29 [3] CRAN (R 4.0.1)
#>  prettyunits   1.1.1   2020-01-24 [3] CRAN (R 4.0.0)
#>  processx      3.5.2   2021-04-30 [1] CRAN (R 4.1.2)
#>  ps            1.5.0   2020-12-05 [3] CRAN (R 4.0.3)
#>  purrr         0.3.4   2020-04-17 [1] CRAN (R 4.1.1)
#>  R6            2.5.1   2021-08-19 [1] CRAN (R 4.1.1)
#>  remotes       2.2.0   2020-07-21 [3] CRAN (R 4.0.2)
#>  reprex        2.0.1   2021-08-05 [1] CRAN (R 4.1.2)
#>  rlang         0.4.11  2021-04-30 [1] CRAN (R 4.1.1)
#>  rmarkdown     2.11    2021-09-14 [1] CRAN (R 4.1.1)
#>  rprojroot     2.0.2   2020-11-15 [3] CRAN (R 4.0.3)
#>  rstudioapi    0.13    2020-11-12 [3] CRAN (R 4.0.3)
#>  sessioninfo   1.1.1   2018-11-05 [3] CRAN (R 4.0.0)
#>  stringi       1.5.3   2020-09-09 [3] CRAN (R 4.0.2)
#>  stringr       1.4.0   2019-02-10 [3] CRAN (R 4.0.0)
#>  testthat      3.0.1   2020-12-17 [3] CRAN (R 4.0.3)
#>  usethis       2.0.0   2020-12-10 [3] CRAN (R 4.0.3)
#>  withr         2.4.1   2021-01-26 [3] CRAN (R 4.0.3)
#>  xfun          0.26    2021-09-14 [1] CRAN (R 4.1.1)
#>  yaml          2.2.1   2020-02-01 [3] CRAN (R 4.0.0)
#> 
#> [1] /home/tamas/R/x86_64-pc-linux-gnu-library/4.1
#> [2] /usr/local/lib/R/site-library
#> [3] /usr/lib/R/site-library
#> [4] /usr/lib/R/library
packageVersion("taxize")
#> [1] '0.9.99'
packageVersion("taxizedb")
#> [1] '0.3.0'

Other taxa seem to be working. Any ideas what may be causing this strange behavior? Many thanks.

@sckott
Copy link
Contributor

sckott commented Nov 10, 2021

unfortunately, taxizedb::classificaiton expects a taxon id, not a taxon name

taxizedb::classification(10744)

@stitam
Copy link
Collaborator Author

stitam commented Nov 12, 2021

Thanks @sckott! I think I got confused because on the other hand, taxizedb::classification("autographiviridae") works.

@sckott
Copy link
Contributor

sckott commented Nov 12, 2021

weird, didn't realize names sometimes work.

on a related note, if you want to take over maintainer role, please do

@maelle
Copy link
Member

maelle commented Sep 9, 2022

This repository is about to be archived.

@maelle maelle closed this as completed Sep 9, 2022
@maelle
Copy link
Member

maelle commented Sep 9, 2022

unarchiving it thanks to @stitam 😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants