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

HTTP 400 - Using function tax_name #939

Open
Jotanator opened this issue Oct 20, 2024 · 0 comments
Open

HTTP 400 - Using function tax_name #939

Jotanator opened this issue Oct 20, 2024 · 0 comments

Comments

@Jotanator
Copy link

Hello,

I have an R app that given a list of species-genus can search through different databases. In case there are no results I am using taxize to go up the taxonomic tree (genus, family, order, class, phylum, and domain).

I have a long list of species-genus pairs (692), but the process crashes at random points while iterating through the list. I’ve run the same search multiple times, and the crashes don’t appear to be consistent. In other words, it doesn’t seem to be related to a specific species-genus pair, as far as I can tell. The error I am receiving is HTTP 400, which typically indicates an issue with the query. However, I find it unlikely that the problem is on our end, as the query is quite simple and the error is not reproducible.

The code below is where we encounter an HTTP 400 error. As shown, we are simply calling the tax_name function and providing an organismName, the desired taxonomic ranks, and the database.

match <- tax_name( sci = organismName, get = c("genus", "family", "order", "class", "phylum", "domain"), db = "ncbi", messages = FALSE)

I wrapped this code in a try-catch block and printed the organismName being passed to tax_name, along with the resulting error. I also re-printed the organismName within the error handling section to confirm that it is indeed failing with that specific species.

Screenshot 2024-10-20 at 11 52 38 AM Screenshot 2024-10-20 at 12 11 23 PM

Has this issue been encountered before? Any help would be appreciated. Thank you!

Session Info
R version 4.2.3 (2023-03-15)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS 14.6.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] zip_2.3.1             treemapify_2.5.5      plotly_4.10.2        
 [4] bold_1.3.0            mpoly_1.1.1           ipc_0.1.4            
 [7] promises_1.2.1        future_1.33.0         rlist_0.4.6.2        
[10] RSQLite_2.3.1         taxize_0.9.100        rentrez_1.2.3        
[13] shinyBS_0.61.1        modules_0.12.0        shinyalert_3.0.0     
[16] shinydashboard_0.7.2  vembedr_0.1.5         lubridate_1.9.2      
[19] forcats_1.0.0         stringr_1.5.0         dplyr_1.1.3          
[22] purrr_1.0.2           readr_2.1.4           tidyr_1.3.0          
[25] tibble_3.2.1          ggplot2_3.4.3         tidyverse_2.0.0      
[28] shinyWidgets_0.8.0    shinycssloaders_1.0.0 shinyjs_2.1.0        
[31] shiny_1.7.5          

loaded via a namespace (and not attached):
 [1] colorspace_2.1-0     ellipsis_0.3.2       markdown_1.8         httpcode_0.3.0      
 [5] rstudioapi_0.15.0    listenv_0.9.0        urltools_1.7.3       ggfittext_0.10.1    
 [9] DT_0.29              bit64_4.0.5          fansi_1.0.4          mathjaxr_1.6-0      
[13] xml2_1.3.5           codetools_0.2-19     partitions_1.10-7    cachem_1.0.8        
[17] knitr_1.44           polynom_1.4-1        jsonlite_1.8.7       compiler_4.2.3      
[21] httr_1.4.7           backports_1.4.1      fastmap_1.1.1        lazyeval_0.2.2      
[25] cli_3.6.1            later_1.3.1          htmltools_0.5.6      tools_4.2.3         
[29] gmp_0.7-2            gtable_0.3.4         glue_1.6.2           Rcpp_1.0.11         
[33] jquerylib_0.1.4      vctrs_0.6.3          crul_1.4.0           ape_5.7-1           
[37] nlme_3.1-162         conditionz_0.1.0     iterators_1.0.14     crosstalk_1.2.0     
[41] xfun_0.40            globals_0.16.2       rbibutils_2.2.15     timechange_0.2.0    
[45] mime_0.12            lifecycle_1.0.3      XML_3.99-0.14        zoo_1.8-12          
[49] scales_1.2.1         hms_1.1.3            parallel_4.2.3       yaml_2.3.7          
[53] curl_5.0.2           memoise_2.0.1        sass_0.4.7           triebeard_0.4.1     
[57] stringi_1.7.12       foreach_1.5.2        orthopolynom_1.0-6.1 filelock_1.0.2      
[61] Rdpack_2.5           rlang_1.1.1          pkgconfig_2.0.3      commonmark_1.9.0    
[65] lattice_0.20-45      fontawesome_0.5.2    htmlwidgets_1.6.2    bit_4.0.5           
[69] tidyselect_1.2.0     parallelly_1.36.0    plyr_1.8.8           magrittr_2.0.3      
[73] R6_2.5.1             generics_0.1.3       base64url_1.4        txtq_0.2.4          
[77] DBI_1.1.3            pillar_1.9.0         withr_2.5.0          crayon_1.5.2        
[81] uuid_1.1-1           utf8_1.2.3           tzdb_0.4.0           grid_4.2.3          
[85] data.table_1.14.8    blob_1.2.4           digest_0.6.33        xtable_1.8-4        
[89] httpuv_1.6.11        munsell_0.5.0        viridisLite_0.4.2    bslib_0.5.1 
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

1 participant