saezlab / OmnipathR

R client for the OmniPath web service
https://r.omnipathdb.org/
Other
111 stars 20 forks source link

Unable to install LIANA because of omnipathr dependency #78

Closed joan-yanqiong closed 1 year ago

joan-yanqiong commented 1 year ago

Hello, I'm trying to install LIANA but I keep getting this error:

I'm using R 4.2.1 and tried the following commands to install: `

Installing OmniPathR separately

pak::pkg_install("OmnipathR") pacman::p_load("OmnipathR") pacman::p_load("saezlab/OmnipathR")

pacman::p_load("saezlab/liana")

` I also tried devtools.

`Error: package or namespace load failed for ‘OmnipathR’: .onLoad failed in loadNamespace() for 'OmnipathR', details: call: yaml.load(readLines(con, warn = readLines.warn), error.label = error.label, error: (~/.config/OmnipathR/omnipathr.yml) Parser error: did not find expected at line 2, column 1 Error: loading failed Execution halted ERROR: loading failed

I hope you can help, thanks in advance!

deeenes commented 1 year ago

Hi,

Sorry for the late answer! It looks like an issue with the line endings or encoding of the file ~/.config/OmnipathR/omnipathr.yml. What do you see if you look into this file:

# in bash:
less ~/.config/OmnipathR/omnipathr.yml

Or check it by wc and file:

# in bash:
wc ~/.config/OmnipathR/omnipathr.yml
file ~/.config/OmnipathR/omnipathr.yml

Do you experience the same error when you directly call yaml.load on the file?

library(yaml)
yaml.load(readLines(file('~/.config/OmnipathR/omnipathr.yml')))

What does the readLines return?

readLines(file('~/.config/OmnipathR/omnipathr.yml'))

Is it different if you specify an encoding?

readLines(file('~/.config/OmnipathR/omnipathr.yml', encoding = 'UTF-8'))

Which operating system are you using?

joan-yanqiong commented 1 year ago

Hi, thanks but I was able to solve the problem in the meantime.