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 bioconductor packages into R #447

Closed
cramjaco opened this issue Aug 25, 2017 · 3 comments
Closed

unable to install bioconductor packages into R #447

cramjaco opened this issue Aug 25, 2017 · 3 comments
Labels
help wanted An issue we know little about and would appreciate help with from members of the community type:Enhancement A proposed enhancement to the docker images

Comments

@cramjaco
Copy link

I am unable to install the phyloseq, or dada2 package (or possibly any package) from bioconductor into R when using the jupyter/r-notebook docker.

What docker image you are using?

Example: jupyter/r-notebook

What complete docker command do you run to launch the container (omitting sensitive values)?

Example: docker run -it --rm -p 8888:8888 jupyter/r-notebook

What steps do you take once the container is running to reproduce the issue?

Example:

  1. Visit http://localhost:8888 and put in relevant token
  2. Start an R notebook
  3. In the first cell run
    source('http://bioconductor/org/biocLite.R')
    biocLite('phyloseq')

What do you expect to happen?

I expect phyloseq to successfully install into R, as it does in a normal R installation

What actually happens?
I get the following output which contains error messages message

Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Bioconductor version 3.4 (BiocInstaller 1.24.0), ?biocLite for help
A new version of Bioconductor is available after installing the most recent
version of R; see http://bioconductor.org/install
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.4 (BiocInstaller 1.24.0), R 3.3.2 (2016-10-31).
Installing package(s) ‘phyloseq’
also installing the dependencies ‘zlibbioc’, ‘rhdf5’, ‘S4Vectors’, ‘IRanges’, ‘XVector’, ‘irlba’, ‘pkgconfig’, ‘survival’, ‘permute’, ‘BiocGenerics’, ‘ade4’, ‘ape’, ‘biomformat’, ‘Biostrings’, ‘cluster’, ‘data.table’, ‘igraph’, ‘multtest’, ‘vegan’, ‘Biobase’

Warning message in install.packages(pkgs = doing, lib = lib, ...):
“installation of package ‘igraph’ had non-zero exit status”Warning message in install.packages(pkgs = doing, lib = lib, ...):
“installation of package ‘phyloseq’ had non-zero exit status”Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Old packages: 'assertthat', 'backports', 'BH', 'car', 'curl', 'DBI',
'devtools', 'digest', 'dplyr', 'evaluate', 'forecast', 'foreign', 'haven',
'httpuv', 'httr', 'jsonlite', 'knitr', 'lattice', 'MASS', 'Matrix', 'mgcv',
'modelr', 'pbdZMQ', 'psych', 'purrr', 'R6', 'Rcpp', 'RcppArmadillo',
'RcppEigen', 'readr', 'repr', 'rmarkdown', 'RSQLite', 'scales', 'shiny',
'SparseM', 'stringi', 'stringr', 'tibble', 'tidyr', 'tidyverse', 'tseries',
'withr', 'zoo'

Similar process for package dada2. I presume this is universal across bioconductor packages.

@cramjaco
Copy link
Author

Ok. I think I found a work-around for phyloseq, but not dada2. It looks like phyloseq depends on igraph, and the cran version thereof isn't compatible with this version of R. I fond installing igraph from github first got around this issue.

 install.packages("devtools") # we need this to install github packages
 options(unzip = "unzip") # the default is "", we need to to set this option to unzip for installations
 ## Install igraph from github
 devtools::install_github("gaborcsardi/pkgconfig")
 devtools::install_github("igraph/rigraph")
 ## Now I can install phyloseq
 biocLite("phyloseq")

Less luck with the dada2 installation. It appears to depend on package ShortRead, which I can't seem to install from either biocLite, or from github.

biocLite("ShortRead")
returns to the teminal
"configure: error: zlib not found"

This site https://ubuntuforums.org/showthread.php?t=692704 says, that I require zlib1g-dev. I tried running
system("apt-get install zlib1g-dev")
but that returns
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

I'm kind of new at editing docker containers, mabye there is a proper way to install linux packages within them? I'd appreciate any leads.
Thanks

@cramjaco
Copy link
Author

cramjaco commented Aug 28, 2017

Further progress:
I can install packages and get dada2 to install as well. I just need to work in docker containers where I have sudo privileges. I can create one of those with

  docker run -it -p 8888:8888 -e GRANT_SUDO=yes --user root --rm -v /root/portal:/home/jovyan/work jupyter/r-notebook start.sh bash

then, since I am in bash

 sudo apt-get update
 sudo apt-get install zlib1g-dev

then I can launch jupyter notebook

   jupyter notebook

and install ShortRead

 biocLite("ShortRead")

and then phyloseq

 biocLite("phyloseq")

at that point

 library("phyloseq") packageVersion("phyloseq")

[1] '1.19.1'

I'm not closing this issue because I think these bioconductor packages ought to install without this much fuss.

@parente
Copy link
Member

parente commented Sep 4, 2017

I'm guessing the problems here stem from the use of conda and R packages from conda-forge to setup the base images. It's possible that both phyloseq and dada2 from bioconda will install more easily and be compatible with the underlying libs coming from conda-forge (e.g., zlib). Try conda install -c bioconda dada2 phyloseq from a terminal in the container.

If that doesn't work, then I imagine this only gets simpler if and when there are conda-forge packages for bioconductor available.

@parente parente added help wanted An issue we know little about and would appreciate help with from members of the community type:Enhancement A proposed enhancement to the docker images labels Sep 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted An issue we know little about and would appreciate help with from members of the community type:Enhancement A proposed enhancement to the docker images
Projects
None yet
Development

No branches or pull requests

2 participants