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

Unable to install LIANA because of omnipathr dependency #78

Closed
joan-yanqiong opened this issue Jul 14, 2023 · 2 comments
Closed

Unable to install LIANA because of omnipathr dependency #78

joan-yanqiong opened this issue Jul 14, 2023 · 2 comments
Assignees
Labels
question A user question or anything not obviously bug

Comments

@joan-yanqiong
Copy link

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

  • removing ‘/tmp/RtmpAjqUpN/pkg-lib426e5fe821e0/OmnipathR’
    Type .Last.error to see the more details.`

I hope you can help, thanks in advance!

@deeenes deeenes self-assigned this Sep 12, 2023
@deeenes deeenes added the question A user question or anything not obviously bug label Sep 12, 2023
@deeenes
Copy link
Member

deeenes commented Sep 12, 2023

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question A user question or anything not obviously bug
Projects
None yet
Development

No branches or pull requests

2 participants