StringDB: Cannot finish their tutorial because of an error
0
0
Entering edit mode
Pavel • 0
@d1f2cba6
Last seen 5 weeks ago
Czechia

Hello I am trying to go through tutorial for STRINGdb since I believe I could use this a lot for my work but I keep getting the same error over and over again

library(STRINGdb) string_db <- STRINGdb$new( version="11.5", species=9606, score_threshold=200, network_type="full", input_directory="")

data(diff_exp_example1)

example1_mapped <- string_db$map( diff_exp_example1, "gene", removeUnmappedRows = TRUE )

hits <- example1_mapped$STRING_id[1:200]

All these steps work fine for me and it goes exactly as I want looking at their tutorial but the next step does not work for me

string_db$plot_network( hits )

Error in function (type, msg, asError = TRUE) : schannel: CertGetCertificateChain trust error CERT_TRUST_IS_NOT_TIME_VALID

Even if I continue with their tutorial where the next line works fine

example1_mapped_pval05 <- string_db$add_diff_exp_color( subset(example1_mapped, pvalue<0.05), logFcColStr="logFC" )

But the next line of code does not. It seems like I cant interact with their server

post payload information to the STRING server

payload_id <- string_db$post_payload( example1_mapped_pval05$STRING_id, colors=example1_mapped_pval05$color )

Error in function (type, msg, asError = TRUE) : schannel: CertGetCertificateChain trust error CERT_TRUST_IS_NOT_TIME_VALID

sessionInfo() R version 4.3.2 (2023-10-31 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 11 x64 (build 22631)

Matrix products: default

locale: [1] LC_COLLATE=Czech_Czechia.utf8 LC_CTYPE=Czech_Czechia.utf8 LC_MONETARY=Czech_Czechia.utf8 [4] LC_NUMERIC=C LC_TIME=Czech_Czechia.utf8

time zone: Europe/Prague tzcode source: internal

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

other attached packages: [1] STRINGdb_2.14.0 httr_1.4.7 curl_5.2.0

loaded via a namespace (and not attached): [1] vctrs_0.6.5 gplots_3.1.3.1 cli_3.6.2 rlang_1.1.3 DBI_1.2.2
[6] KernSmooth_2.23-22 png_0.1-8 proto_1.0.0 sqldf_0.4-11 gtools_3.9.5
[11] bit_4.0.5 RCurl_1.98-1.14 plyr_1.8.9 hash_2.2.6.3 chron_2.3-61
[16] caTools_1.18.2 fastmap_1.1.1 bitops_1.0-7 lifecycle_1.0.4 memoise_2.0.1
[21] compiler_4.3.2 igraph_2.0.2 RSQLite_2.3.5 blob_1.2.4 RColorBrewer_1.1-3 [26] Rcpp_1.0.12 pkgconfig_2.0.3 rstudioapi_0.15.0 R6_2.5.1 magrittr_2.0.3
[31] gsubfn_0.7 tools_4.3.2 bit64_4.0.5 plotrix_3.8-4 cachem_1.0.8

STRINGdb • 653 views
ADD COMMENT
0
Entering edit mode

It seems that you have outdated certificates on your machine. When creating a network specify the protocol parameter: protocol='http'

string_db <- STRINGdb$new( version="12", species=9606, score_threshold=200, network_type="full", input_directory="", protocol='http')

This should fix the issue.

ADD REPLY
0
Entering edit mode
> string_db <- STRINGdb$new( version="12", species=9606, score_threshold=200, network_type="full", input_directory="", protocol='http')
> data(diff_exp_example1)
> example1_mapped <- string_db$map( diff_exp_example1, "gene", removeUnmappedRows = TRUE )

Warning:  we couldn't map to STRING 15% of your identifiers> 
> hits <- example1_mapped$STRING_id[1:200]
> string_db$plot_network( hits )
Error in function (type, msg, asError = TRUE)  : 
  schannel: CertGetCertificateChain trust error CERT_TRUST_IS_NOT_TIME_VALID
ADD REPLY
0
Entering edit mode

The issue is related to the R cURL library on Windows, which failed to recognize valid certificates. This isn't the first time this package is misbehaving. Starting from version 12.4.1, STRINGdb now uses the httr library to handle web requests, which resolves the certificate validation problem.

The 12.4.1 bugfix is pushed to bionc and should be available in the next few days. Please update your STRINGdb package in the next few days if you are experiencing the issue.

ADD REPLY
0
Entering edit mode

For now what worked for me was downloading the latest ca-bundle.crt certificate from https://curl.se/docs/caextract.html I had to rename the cacert.pem file and copy it into my user/AppData/Local/R/win-library/4.3/RCurl/etc That fixed the issue for me.

ADD REPLY
0
Entering edit mode

Thanks for the update Pavel!

Sorry for the slow response. I don't have a Windows machine, and could not reproduce the issue.

As I said it's not the first time this library caused an issue, but usually it was contained to a specific user having outdated certificates. Now it seems all STRINGdb stopped working on many (all?) Windows machines, so it needs to be fixed at the root.

ADD REPLY
0
Entering edit mode

Thanks Pavel! I had the same issue, and this worked for me.

ADD REPLY

Login before adding your answer.

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