STRINGdb: Error in download.file(urlStr, temp)
0
0
Entering edit mode
qardessio ▴ 10
@ce5eca14
Last seen 7 months ago
Greece

I am experiencing an issue with the STRINGdb R package.

The code I run is:

> library("STRINGdb")
> string_db <- STRINGdb$new( version="11.5", species=9606, score_threshold=200, input_directory="")
> string_proteins <- string_db$get_proteins()

Running the last line of the code returns the following error message:

trying URL 'https://stringdb-static.org/download/protein.info.v11.5/9606.protein.info.v11.5.txt.gz'
Error in download.file(urlStr, temp) : 
  cannot open URL 'https://stringdb-static.org/download/protein.info.v11.5/9606.protein.info.v11.5.txt.gz'
In addition: Warning message:
In download.file(urlStr, temp) :
  URL 'https://stringdb-static.org/download/protein.info.v11.5/9606.protein.info.v11.5.txt.gz': status was 'Peer certificate cannot be authenticated with given CA certificates'

sessionInfo( )

``` R version 4.1.0 (2021-05-18) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Mojave 10.14.6

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.1/Resources/lib/libRlapack.dylib

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

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

other attached packages: [1] STRINGdb_2.6.0

loaded via a namespace (and not attached): [1] igraph_1.2.6 hash_2.2.6.1 Rcpp_1.0.7 magrittr_2.0.1 bit_4.0.4
[6] rlang_0.4.11 fastmap_1.1.0 blob_1.2.1 plyr_1.8.6 caTools_1.18.2
[11] tools_4.1.0 png_0.1-7 plotrix_3.8-1 KernSmooth_2.23-20 DBI_1.1.1
[16] gtools_3.9.2 bit64_4.0.5 BiocManager_1.30.16 RColorBrewer_1.1-2 vctrs_0.3.8
[21] bitops_1.0-7 RCurl_1.98-1.3 cachem_1.0.5 memoise_2.0.0 RSQLite_2.2.7
[26] gsubfn_0.7 compiler_4.1.0 gplots_3.1.1 chron_2.3-56 sqldf_0.4-11
[31] proto_1.0.0 pkgconfig_2.0.3

STRINGdb R • 574 views
ADD COMMENT
1
Entering edit mode

It seems to be an issue with certificates on OSX Mojave

There seem to be no good solution for that, sans updating to Big Sur or newer OSX. I would install STRINGdb package from source and change all occurrences of "https://stringdb-static.org" to "http://stringdb-static.org".

This should work around the certificate issue.

ADD REPLY
1
Entering edit mode

I changed all occurrences of "https://stringdb-static.org" to "http://stringdb-static.org". Then I installed STRINGdb package from source and it WORKED!!!

Thank you so much Damian!!!

ADD REPLY
0
Entering edit mode

Hi, could you please explain how did you change the occurrences after installing the package??

Thanks in advance

ADD REPLY
1
Entering edit mode

If you are still encountering the issue in STRINGdb version >= 2.6.1 you can now add parameter protocol="http" when you create the STRINGdb object:

string_db <- STRINGdb$new( version="11.5", species=9606, score_threshold=200, input_directory="", protocol="http")

This should fix the issue with the certificates.

ADD REPLY

Login before adding your answer.

Traffic: 368 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