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

Mac-related issue - empty data.frame #29

Open
toobiwankenobi opened this issue Jan 7, 2025 · 3 comments
Open

Mac-related issue - empty data.frame #29

toobiwankenobi opened this issue Jan 7, 2025 · 3 comments

Comments

@toobiwankenobi
Copy link

toobiwankenobi commented Jan 7, 2025

Sorry, I can't reproduce the error on my end (I don't have access to a Mac).
I've tested the code on both Windows and Ubuntu. It seems to an issue with
the library on Mac which I can't help you debug.
Perhaps the maintainer of httr can provide some help if you have a minimally reproducible example, e.g.:

httr::GET("https://rest.uniprot.org/uniprotkb/search?query=organism_id%3A9606%20OR%20gene_exact%3AA2M&fields=id%2Caccession%2Cgene_primary%2Corganism_name%2Cprotein_name%2Creviewed&format=tsv&size=25")

So this means a dependency of UniProt.ws is not working properly?

Essentially, yes. Please file an issue with httr and they may help you further.

Update: I've asked a colleague to run the code for me and they are also seeing an empty data.frame on Mac.
The issue is present with both httr and httr2.

Best regards,
Marcel

Originally posted by @LiNk-NY in #28 (comment)

@toobiwankenobi
Copy link
Author

I contacted the dev's of httr2. The problem is unrelated to httr2 as the following command successfully returns data.

result <- request("https://rest.uniprot.org/uniprotkb/search?query=organism_id%3A9606%20OR%20gene_exact%3AA2M&fields=id%2Caccession%2Cgene_primary%2Corganism_name%2Cprotein_name%2Creviewed&format=tsv&size=25") |>
+     req_perform()

The problem persists and I can't neither use mapUniProt() nor queryUniProt() as originally described in this issue.

sessionInfo()
R version 4.4.2 (2024-10-31)
Platform: aarch64-apple-darwin20
Running under: macOS Sequoia 15.0.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0

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

time zone: Europe/Zurich
tzcode source: internal

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

other attached packages:
 [1] httr2_1.0.7            data.table_1.16.4      queryup_1.0.5          lubridate_1.9.4        stringr_1.5.1          purrr_1.0.2            readr_2.1.5            tibble_3.2.1          
 [9] tidyverse_2.0.0        EnhancedVolcano_1.24.0 RColorBrewer_1.1-3     forcats_1.0.0          dplyr_1.1.4            MetBrewer_0.2.0        ggrepel_0.9.6          ggbeeswarm_0.7.2      
[17] ggplot2_3.5.1          tidyr_1.3.1            UniProt.ws_2.46.1      RSQLite_2.3.9          BiocGenerics_0.52.0   

loaded via a namespace (and not attached):
 [1] tidyselect_1.2.1        vipor_0.4.7             farver_2.1.2            blob_1.2.4              filelock_1.0.3          Biostrings_2.74.1       fastmap_1.2.0          
 [8] BiocFileCache_2.14.0    digest_0.6.37           timechange_0.3.0        lifecycle_1.0.4         KEGGREST_1.46.0         httpcache_1.2.0         magrittr_2.0.3         
[15] compiler_4.4.2          rlang_1.1.4             progress_1.2.3          tools_4.4.2             yaml_2.3.10             knitr_1.49              prettyunits_1.2.0      
[22] labeling_0.4.3          bit_4.5.0.1             curl_6.1.0              withr_3.0.2             grid_4.4.2              stats4_4.4.2            colorspace_2.1-1       
[29] scales_1.3.0            cli_3.6.3               rmarkdown_2.29          crayon_1.5.3            generics_0.1.3          rstudioapi_0.17.1       httr_1.4.7             
[36] tzdb_0.4.0              BiocBaseUtils_1.8.0     DBI_1.2.3               cachem_1.1.0            zlibbioc_1.52.0         AnnotationDbi_1.68.0    BiocManager_1.30.25    
[43] XVector_0.46.0          vctrs_0.6.5             jsonlite_1.8.9          IRanges_2.40.1          hms_1.1.3               S4Vectors_0.44.0        bit64_4.5.2            
[50] beeswarm_0.4.0          glue_1.8.0              stringi_1.8.4           gtable_0.3.6            GenomeInfoDb_1.42.1     UCSC.utils_1.2.0        munsell_0.5.1          
[57] pillar_1.10.0           rappdirs_0.3.3          htmltools_0.5.8.1       GenomeInfoDbData_1.2.13 R6_2.5.1                dbplyr_2.5.0            evaluate_1.0.1         
[64] Biobase_2.66.0          png_0.1-8               memoise_2.0.1           rjsoncons_1.3.1         Rcpp_1.0.13-1           xfun_0.49               pkgconfig_2.0.3 

@LiNk-NY
Copy link
Contributor

LiNk-NY commented Jan 7, 2025

Please link the issue you opened next time.
r-lib/httr2#624
It looks like the gzip content is not automatically decompressed and I am not sure why that is.
It is a Mac-only issue because both Linux and Windows run the code without a problem.
I will wait for the httr2 maintainer's response.

@toobiwankenobi
Copy link
Author

Hi @LiNk-NY
Ok, thank you for your support!

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

2 participants