Error when trying to run uniport.ws ?
2
0
Entering edit mode
Mohamed ▴ 30
@aa1ae679
Last seen 13 months ago
United Kingdom

I wanted to run Uniport.ws to get the protein subcellular location for some of my gene. When I try to run the code provided by the bioconductor, I got an error

Error in file(con, "r") : cannot open the connection In addition: Warning message: In file(con, "r") : cannot open URL 'https://www.uniprot.org/uniprot/?query=organism:9606&format=tab&columns=id': HTTP status was '400 Bad Request'

Actually this occures specifically when I run the initial part of the pipeline, which is :

    suppressPackageStartupMessages({
    library(UniProt.ws)
     })
     up <- UniProt.ws(taxId=9606)

I could not understand what the authors of the package means with (suppressPackageStartupMessages) ? why to use it. I tried to get through the guidelines from the packages, and no information is given in this regard.

This is my session info

    R version 4.1.3 (2022-03-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

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

other attached packages:
[1] UniProt.ws_2.34.0   BiocGenerics_0.40.0 RCurl_1.98-1.8      RSQLite_2.2.16     
[5] BiocManager_1.30.16

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9             pillar_1.8.1           compiler_4.1.3        
 [4] dbplyr_2.2.1           GenomeInfoDb_1.30.1    XVector_0.34.0        
 [7] bitops_1.0-7           tools_4.1.3            zlibbioc_1.40.0       
[10] bit_4.0.4              tibble_3.1.8           memoise_2.0.1         
[13] BiocFileCache_2.2.1    lifecycle_1.0.1        pkgconfig_2.0.3       
[16] png_0.1-7              rlang_1.0.4            DBI_1.1.3             
[19] cli_3.3.0              rstudioapi_0.13        filelock_1.0.2        
[22] curl_4.3.2             fastmap_1.1.0          GenomeInfoDbData_1.2.7
[25] httr_1.4.4             dplyr_1.0.9            rappdirs_0.3.3        
[28] Biostrings_2.62.0      generics_0.1.3         S4Vectors_0.32.4      
[31] vctrs_0.4.1            IRanges_2.28.0         tidyselect_1.1.2      
[34] stats4_4.1.3           bit64_4.0.5            glue_1.6.2            
[37] Biobase_2.54.0         R6_2.5.1               fansi_1.0.3           
[40] AnnotationDbi_1.56.2   purrr_0.3.4            magrittr_2.0.3        
[43] blob_1.2.3             ellipsis_0.3.2         KEGGREST_1.34.0       
[46] assertthat_0.2.1       utf8_1.2.2             cachem_1.0.6          
[49] crayon_1.5.1

Thanks a lot

UniProt.ws • 1.1k views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

You need to upgrade to the current version of R/Bioconductor. UniProt.org has changed their API, and old versions of UniProt.ws will no longer work. Plus we don't support old versions anyway, so you should always update when a new release comes out.

The suppressPackageStartupMessages function does exactly what the name of the function says. It suppresses package startup messages, so you don't have to see all the extra messages that are printed to the screen when a package is started up.

ADD COMMENT
1
Entering edit mode
shepherl 4.1k
@lshep
Last seen 8 hours ago
United States

I believe UniProt changed their API which broke the code. If you update your version of R to the latest 4.2 and use the current Bioconductor release this should be resolved.
See Github closed issue.

Past versions of Bioconductor packages are frozen and we are unable to change.

With regard to suppressPackageStartupMessages, many maintainers chose to put this in vignettes and documentation to limit the printed output to make documentation more readable and condense to relevant code. Packages can include start of messages for when a package is loaded to indicate messages to the user (ie. version, licensing, citations, any general message they feel like adding).

Hope this helps.

ADD COMMENT

Login before adding your answer.

Traffic: 798 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6