KosukeHamazaki / RAINBOWR

Reliable Association INference By Optimizing Weights with R (R package for SNP-set GWAS and multi-kernel mixed model)
https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1007663
Other
22 stars 6 forks source link

rgl dependency library issue #3

Open mgalland opened 3 years ago

mgalland commented 3 years ago

Dear Kosuke, This might not be the place to post such an issue but I ran out of options....Hope you can help.

I am trying to install RAINBOWR in the cloud to get more CPU and RAM for my GWAS analyses. Locally, on my machine, it works just fine. But somehow, the rgl dependency bumps into a right problem. Do you have any ideas/suggestions? Thank you in advance Marc


# adding a custom library path where I have full rights
.libPaths( c( "/home/rstudio/" , .libPaths()))

# trying to install RAINBOWR from CRAN
install.packages("RAINBOWR")
Installing package into ‘/home/rstudio’
(as ‘lib’ is unspecified)
trying URL 'https://packagemanager.rstudio.com/all/__linux__/focal/291/src/contrib/RAINBOWR_0.1.17.tar.gz'
Content type 'binary/octet-stream' length 7309404 bytes (7.0 MB)
==================================================
downloaded 7.0 MB

* installing *binary* package ‘RAINBOWR’ ...
* DONE (RAINBOWR)

# everything seems to have run fine but...
library("RAINBOWR")
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/usr/local/lib/R/site-library/rgl/libs/rgl.so':
  libGLU.so.1: cannot open shared object file: No such file or directory
Error: package or namespace load failed for ‘RAINBOWR’:
 .onLoad failed in loadNamespace() for 'rgl', details:
  call: NULL
  error:    Loading rgl's DLL failed. 

[sessionInfo.txt](https://github.com/KosukeHamazaki/RAINBOWR/files/5196348/sessionInfo.txt)
KosukeHamazaki commented 3 years ago

Dear Marc,

Thank you for your question.

Maybe you failed to install/load the rgl package. From the sessionInfo.txt file you attached, I understand you're using Ubuntu 20.04 LTS OS. When using Ubuntu, the error like this for the installation/loading of rgl often happens.

Please retry installing and loading the rgl package, and see the errors. You should install some modules mentioned in those errors by using sudo apt install command in your terminal.

If the troubles are not resolved after doing the above operations, please attach the errors you get to the reply.

Best regards, Kosuke

mgalland commented 3 years ago

Dear Kosuke Thank you for your answer. Eventually, I'd like to build a Docker image that I can use from a CLI to run RAINBOWR. This is the script I've made: https://github.com/SilkeAllmannLab/gwas/blob/master/rainbowr_gwas.R

I am busy teaching at the time but will resume GWAS activities mid-October. Will try your solution then and see how it helps to build the Docker image.
Thank you for your answer.

mgalland commented 3 years ago

Dear Kosuke, Since this morning, I am back to GWAS matters. I have made a new Docker image with rgl installed using apt-get and within R. Please find the related Dockerfile here

As i'd like to run the RAINBOWR-based pipeline in the cloud, I'd like to run a Docker container with this command: docker run --rm allmann/gwas:0.1.0 --help

It seems to work now as I get "only" warning messages regarding the X11 display:

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl.init' failed, running with 'rgl.useNULL = TRUE'. 
3: no DISPLAY variable so Tk is not available 
Usage: /home/rainbowr_gwas.R [options]

 A program to perform a GWAS analysis based on the RAINBOWR package for R

Options:
    -v FILENAME, --vcf=FILENAME
        Path to VCF file. Can be gzipped (.gz)

    -p FILENAME, --phenotype=FILENAME
        Path to the phenotype file. One column with line identifier and one with phenotypic value. Tab-separated.

    -o CHARACTER, --outdir=CHARACTER
        output directory where to store results [default= gwas_results]

    -h, --help
        Show this help message and exit

What do you think? Does it seem ok from your point of view?