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

Error in generate_homologs #182

Open
PpGrApee opened this issue Nov 22, 2024 · 4 comments
Open

Error in generate_homologs #182

PpGrApee opened this issue Nov 22, 2024 · 4 comments

Comments

@PpGrApee
Copy link

Hello! WThank you for the nice package. I have problems when I use the following code.
ortholog_resource <- generate_homologs(op_resource = op_resource, target_organism =10090, columns = c("source_genesymbol", "target_genesymbol"), max_homologs = 5)
And there is the error:
One-to-many homolog matches:
Error in mutate():
ℹ In argument: across(all_of(columns), ~recode.character2(.x, .missing_fun = .missing_fun)).
Caused by error in across():
! Can't compute column source_genesymbol.
Caused by error in recode.character2():
! No replacements provided.
Run rlang::last_trace() to see where the error occurred.

I have tried install from this PR #174, but not work.

@pushpinder-bu
Copy link

Hi, I am facing the same issue, you found any solution for it?

@deeenes
Copy link
Member

deeenes commented Feb 25, 2025

Hi @PpGrApee & @pushpinder-bu, To make this work, indeed the changes in PR #174 are required. The rest of the thing is a transient download failure, which is surprising bc no risky downloads are involved here. It could happen due to a temporary, maybe partial, downtime of ensembl.org, or a condition related to the local network where you run the script. First I recommend to try the download again with an empty cache, with the latest version of OmnipathR. If you still experience an error, please share the OmnipathR log:

library(remotes)
remotes::install_github(repo = "saezlab/liana", ref = remotes::github_pull(174L))
remotes::install_github("saezlab/OmnipathR@devel")
library(OmnipathR)
library(liana)

omnipath_set_cachedir(tempdir())
options(omnipathr.curl_verbose = TRUE)

h <- homologene_download(10090L, 9606L, "genesymbol")

# try your liana code here, it should do the same call to `homologene_download` as above

# if fails, please share the contents of the OmnipathR log:
omnipath_logfile()

@pushpinder-bu
Copy link

Below is the log file

[2025-02-25 10:14:57] [TRACE] [OmnipathR] Reading JSON from /usr2/postdoc/bpushpin/.cache/OmnipathR/cache.json (encoding: UTF-8).
[2025-02-25 10:14:57] [TRACE] [OmnipathR] JSON validation successful: TRUE
[2025-02-25 10:14:57] [INFO] [OmnipathR] Initialized cache: /usr2/postdoc/bpushpin/.cache/OmnipathR.
[2025-02-25 10:14:57] [INFO] [OmnipathR] Package OmnipathR packaged: 2025-02-24 21:44:09 UTC; bpushpin
[2025-02-25 10:14:57] [INFO] [OmnipathR] Package OmnipathR date/publication: NA
[2025-02-25 10:14:57] [INFO] [OmnipathR] Package OmnipathR built: R 4.4.0; ; 2025-02-24 21:44:10 UTC; unix
[2025-02-25 10:14:57] [INFO] [OmnipathR] Package OmnipathR version: 3.15.9
[2025-02-25 10:14:57] [INFO] [OmnipathR] Package OmnipathR repository: NA
[2025-02-25 10:14:58] [INFO] [OmnipathR] Session info: [version=R version 4.4.0 (2024-04-24); os=AlmaLinux 8.10 (Cerulean Leopard); system=x86_64, linux-gnu; ui=RStudio; language=(EN); collate=en_US.UTF-8; ctype=en_US.UTF-8; tz=America/New_York; date=2025-02-25; rstudio=2024.04.2+764 Chocolate Cosmos (server); pandoc=3.1.11 @ /usr/local/ood/rstudio-server-2024.04.2-764/bin/quarto/bin/tools/x86_64/ (via rmarkdown)]
[2025-02-25 10:14:58] [INFO] [OmnipathR] External libraries: [cairo=1.15.12; cairoFT=; pango=1.42.3; png=1.6.34; jpeg=6.2; tiff=LIBTIFF, Version 4.0.9; tcl=8.6.8; curl=7.61.1; zlib=1.2.11; bzlib=1.0.6, 6-Sept-2010; xz=5.2.4; deflate=; PCRE=10.32 2018-09-10; ICU=60.3; TRE=TRE 0.8.0 R_fixes (BSD); iconv=glibc 2.28; readline=7.0; BLAS=FlexiBLAS NETLIB; lapack=FlexiBLAS NETLIB; lapack_version=3.11.0]
[2025-02-25 10:14:58] [INFO] [OmnipathR] CURL: version: 7.61.1; headers: 7.61.1; ssl_version: OpenSSL/1.1.1k; libz_version: 1.2.11; libssh_version: libssh/0.9.6/openssl/zlib; libidn_version: 2.2.0; host: x86_64-redhat-linux-gnu; protocols: dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp; ipv6: TRUE; http2: TRUE; idn: TRUE; url_parser: FALSE
[2025-02-25 10:14:58] [TRACE] [OmnipathR] Reading JSON from /usr2/postdoc/bpushpin/R/x86_64-pc-linux-gnu-library/4.4/OmnipathR/db/db_def.json (encoding: UTF-8).
[2025-02-25 10:14:58] [TRACE] [OmnipathR] JSON validation successful: TRUE
[2025-02-25 10:14:58] [TRACE] [OmnipathR] Reading JSON from /usr2/postdoc/bpushpin/R/x86_64-pc-linux-gnu-library/4.4/OmnipathR/internal/magic_bytes.json (encoding: UTF-8).
[2025-02-25 10:14:58] [TRACE] [OmnipathR] JSON validation successful: TRUE
[2025-02-25 10:14:58] [TRACE] [OmnipathR] Reading JSON from /usr2/postdoc/bpushpin/R/x86_64-pc-linux-gnu-library/4.4/OmnipathR/internal/urls.json (encoding: UTF-8).
[2025-02-25 10:14:58] [TRACE] [OmnipathR] JSON validation successful: TRUE
[2025-02-25 10:14:58] [TRACE] [OmnipathR] Reading JSON from /usr2/postdoc/bpushpin/R/x86_64-pc-linux-gnu-library/4.4/OmnipathR/internal/id_types.json (encoding: UTF-8).
[2025-02-25 10:14:58] [TRACE] [OmnipathR] JSON validation successful: TRUE
[2025-02-25 10:32:04] [INFO] [OmnipathR] Setting up new cache directory /scratch/319949.1.ood/RtmpzHZ0PT.
[2025-02-25 10:32:04] [TRACE] [OmnipathR] Reading JSON from /scratch/319949.1.ood/RtmpzHZ0PT/cache.json (encoding: UTF-8).
[2025-02-25 10:32:04] [TRACE] [OmnipathR] JSON validation successful: TRUE
[2025-02-25 10:32:14] [INFO] [OmnipathR] Loading database Ensembl and OMA organism names.
[2025-02-25 10:32:14] [TRACE] [OmnipathR] Reading JSON from /scratch/319949.1.ood/RtmpzHZ0PT/cache.json (encoding: UTF-8).
[2025-02-25 10:32:14] [TRACE] [OmnipathR] JSON validation successful: TRUE
[2025-02-25 10:32:14] [INFO] [OmnipathR] Looking up in cache https://www.ensembl.org/info/about/species.html: key=7332486db7400730697234bad76ca0c8e4d00799, no version available.
[2025-02-25 10:32:14] [TRACE] [OmnipathR] Reading JSON from /scratch/319949.1.ood/RtmpzHZ0PT/cache.json (encoding: UTF-8).
[2025-02-25 10:32:14] [TRACE] [OmnipathR] JSON validation successful: TRUE
[2025-02-25 10:32:14] [INFO] [OmnipathR] Created new version for cache record 7332486db7400730697234bad76ca0c8e4d00799: version 1.
[2025-02-25 10:32:14] [TRACE] [OmnipathR] Cache file path: /scratch/319949.1.ood/RtmpzHZ0PT/7332486db7400730697234bad76ca0c8e4d00799-1.html
[2025-02-25 10:32:14] [INFO] [OmnipathR] Retrieving URL: https://www.ensembl.org/info/about/species.html
[2025-02-25 10:32:14] [TRACE] [OmnipathR] Downloading by httr2 in download_base.
[2025-02-25 10:32:14] [TRACE] [OmnipathR] Attempt 1/3: https://www.ensembl.org/info/about/species.html
[2025-02-25 10:32:14] [TRACE] [OmnipathR] Preparing httr2 request.
[2025-02-25 10:32:14] [TRACE] [OmnipathR] The following curl options are not available: [tcp_keepcnt,upkeep_interval_ms]
[2025-02-25 10:32:14] [TRACE] [OmnipathR] Curl options: [connecttimeout=10,timeout=300,debugfunction=,verbose=TRUE,tcp_keepalive=TRUE,tcp_keepintvl=10,tcp_keepidle=10,ssl_verifypeer=TRUE,ssl_verifyhost=TRUE]
[2025-02-25 10:32:14] [TRACE] [OmnipathR] Sending HTTP request.
[2025-02-25 10:32:14] [TRACE] [OmnipathR] CURL DEBUG[* ]: CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!
[2025-02-25 10:32:14] [WARN] [OmnipathR] Failed to download https://www.ensembl.org/info/about/species.html (attempt 1/3); error: Invalid or unsupported value when setting curl option 'ssl_verifyhost'
[2025-02-25 10:32:19] [TRACE] [OmnipathR] Attempt 2/3: https://www.ensembl.org/info/about/species.html
[2025-02-25 10:32:19] [TRACE] [OmnipathR] Preparing httr2 request.
[2025-02-25 10:32:19] [TRACE] [OmnipathR] The following curl options are not available: [tcp_keepcnt,upkeep_interval_ms]
[2025-02-25 10:32:19] [TRACE] [OmnipathR] Curl options: [connecttimeout=10,timeout=300,debugfunction=,verbose=TRUE,tcp_keepalive=TRUE,tcp_keepintvl=10,tcp_keepidle=10,ssl_verifypeer=TRUE,ssl_verifyhost=TRUE]
[2025-02-25 10:32:19] [TRACE] [OmnipathR] Sending HTTP request.
[2025-02-25 10:32:19] [TRACE] [OmnipathR] CURL DEBUG[* ]: CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!
[2025-02-25 10:32:19] [WARN] [OmnipathR] Failed to download https://www.ensembl.org/info/about/species.html (attempt 2/3); error: Invalid or unsupported value when setting curl option 'ssl_verifyhost'
[2025-02-25 10:32:24] [TRACE] [OmnipathR] Attempt 3/3: https://www.ensembl.org/info/about/species.html
[2025-02-25 10:32:24] [TRACE] [OmnipathR] Preparing httr2 request.
[2025-02-25 10:32:24] [TRACE] [OmnipathR] The following curl options are not available: [tcp_keepcnt,upkeep_interval_ms]
[2025-02-25 10:32:24] [TRACE] [OmnipathR] Curl options: [connecttimeout=10,timeout=300,debugfunction=,verbose=TRUE,tcp_keepalive=TRUE,tcp_keepintvl=10,tcp_keepidle=10,ssl_verifypeer=TRUE,ssl_verifyhost=TRUE]
[2025-02-25 10:32:24] [TRACE] [OmnipathR] Sending HTTP request.
[2025-02-25 10:32:24] [TRACE] [OmnipathR] CURL DEBUG[* ]: CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!
[2025-02-25 10:32:24] [ERROR] [OmnipathR] Failed to download https://www.ensembl.org/info/about/species.html (attempt 3/3); error: Invalid or unsupported value when setting curl option 'ssl_verifyhost'
[2025-02-25 10:32:24] [INFO] [OmnipathR] Package OmnipathR packaged: 2025-02-25 15:31:27 UTC; bpushpin
[2025-02-25 10:32:24] [INFO] [OmnipathR] Package OmnipathR date/publication: NA
[2025-02-25 10:32:24] [INFO] [OmnipathR] Package OmnipathR built: R 4.4.0; ; 2025-02-25 15:31:28 UTC; unix
[2025-02-25 10:32:24] [INFO] [OmnipathR] Package OmnipathR version: 3.15.9
[2025-02-25 10:32:24] [INFO] [OmnipathR] Package OmnipathR repository: NA
[2025-02-25 10:32:25] [INFO] [OmnipathR] Session info: [version=R version 4.4.0 (2024-04-24); os=AlmaLinux 8.10 (Cerulean Leopard); system=x86_64, linux-gnu; ui=RStudio; language=(EN); collate=en_US.UTF-8; ctype=en_US.UTF-8; tz=America/New_York; date=2025-02-25; rstudio=2024.04.2+764 Chocolate Cosmos (server); pandoc=3.1.11 @ /usr/local/ood/rstudio-server-2024.04.2-764/bin/quarto/bin/tools/x86_64/ (via rmarkdown)]
[2025-02-25 10:32:25] [INFO] [OmnipathR] External libraries: [cairo=1.15.12; cairoFT=; pango=1.42.3; png=1.6.34; jpeg=6.2; tiff=LIBTIFF, Version 4.0.9; tcl=8.6.8; curl=7.61.1; zlib=1.2.11; bzlib=1.0.6, 6-Sept-2010; xz=5.2.4; deflate=; PCRE=10.32 2018-09-10; ICU=60.3; TRE=TRE 0.8.0 R_fixes (BSD); iconv=glibc 2.28; readline=7.0; BLAS=FlexiBLAS NETLIB; lapack=FlexiBLAS NETLIB; lapack_version=3.11.0]
[2025-02-25 10:32:25] [INFO] [OmnipathR] CURL: version: 7.61.1; headers: 7.61.1; ssl_version: OpenSSL/1.1.1k; libz_version: 1.2.11; libssh_version: libssh/0.9.6/openssl/zlib; libidn_version: 2.2.0; host: x86_64-redhat-linux-gnu; protocols: dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp; ipv6: TRUE; http2: TRUE; idn: TRUE; url_parser: FALSE

@deeenes
Copy link
Member

deeenes commented Feb 25, 2025

Thanks @pushpinder-bu, so this makes clear the error happens when curl rejects value 1 for the ssl_verifyhost option. Why you get this error while others don't, the reason is the very old libcurl in your system, it's 7 years old (version 7.61.1). Still, this error can be addressed by passing a correct value (and then maybe you see another error downstream of this one):

library(OmnipathR)

omnipath_set_cachedir(tempdir())
options(omnipathr.curl_verbose = TRUE)
options(omnipathr.ssl_verifyhost = 2L)

h <- homologene_download(10090L, 9606L, "genesymbol")

omnipath_logfile()

To prevent this error in the future, I'll also update the default of this option in OmnipathR to 2L.

deeenes added a commit to saezlab/OmnipathR that referenced this issue Feb 25, 2025
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

3 participants