Install Bioconductor 3.7
1
1
Entering edit mode
@mjsteinbaugh
Last seen 12 months ago
Cambridge, MA

I'm interested in creating versioned Docker images of Bioconductor releases back to 3.6 for unit testing against my package code. I'm stuck getting Bioconductor 3.7 to install instead of 3.8 on R 3.5 using a rocker/r-ver base image (e.g. R 3.5.3). What's the correct approach for this? Both BioC 3.7 and 3.8 are pinned against R >= 3.5.0. Otherwise, I'm good to go creating images for BioC 3.6, 3.8, and 3.9.

For reference, BiocManager::install(version = "3.7") doesn't work.

docker BiocManager BiocVersion • 2.7k views
ADD COMMENT
0
Entering edit mode

What does 'doesn't work' mean?

ADD REPLY
0
Entering edit mode

I copied the error from my Docker build, see below

ADD REPLY
2
Entering edit mode
shepherl 4.1k
@lshep
Last seen 1 hour ago
United States

For the older versions of R/Bioconductor we used BiocInstaller - You do realize that we do have docker containers for these past versions already? Core dockers You can just pull the different tags we have for the R/Bioc Versions.

ADD COMMENT
0
Entering edit mode

Thanks @shepherl, yeah I might just end up using the versioned release_core2 images as the base instead. I was just wondering on a clean R 3.5 installation, what's the right way to install BioC 3.7 specifically -- I can only get it to install 3.8 at the moment.

ADD REPLY
1
Entering edit mode

This link could also be helpful http://bioconductor.org/install/#Legacy

ADD REPLY
0
Entering edit mode

Thanks, Lori and Martin, I figured it out. For reference, on R 3.5, here's how to install Bioconductor 3.7 or 3.8.

Install Bioconductor 3.7:

source("https://bioconductor.org/biocLite.R")
BiocInstaller::biocLite()

Install Bioconductor 3.8:

install.packages("BiocManager")
BiocManager::install()

Martin, where I got confused was trying this approach, which doesn't work on R 3.5:

BiocManager::install(version = "3.7")

This is the error that returns:

> BiocManager::install(version = "3.7")
Error: Bioconductor version not changed
Execution halted

Maybe we should improve the error handling in BiocManager to suggest to users to use BiocInstaller instead in this case, because I forgot.

Best, Mike

ADD REPLY
1
Entering edit mode

This is a new R installation, edited for brevity:

> install.packages("BiocManager", repos="https://cran.R-project.org")
Installing package into ‘/private/tmp/lib’
(as ‘lib’ is unspecified)
trying URL 'https://cran.R-project.org/src/contrib/BiocManager_1.30.4.tar.gz'
Content type 'application/x-gzip' length 242304 bytes (236 KB)
==================================================
downloaded 236 KB
...
* DONE (BiocManager)

The downloaded source packages are in
    ‘/private/var/folders/yn/gmsh_22s2c55v816r6d51fx1tnyl61/T/RtmpvRo8aZ/downloaded_packages’
> BiocManager::install(version="3.7")
Downgrade 1 packages to Bioconductor version '3.7'? [y/n]: y
Bioconductor version 3.7 (BiocManager 1.30.4), R 3.5.3 Patched (2019-03-11
  r76325)
Installing package(s) 'BiocVersion'
trying URL 'https://bioconductor.org/packages/3.7/bioc/src/contrib/BiocVersion_3.7.4.tar.gz'
Content type 'application/x-gzip' length 905 bytes
==================================================
downloaded 905 bytes
...
* DONE (BiocVersion)

The downloaded source packages are in
    ‘/private/var/folders/yn/gmsh_22s2c55v816r6d51fx1tnyl61/T/RtmpvRo8aZ/downloaded_packages’
> BiocManager::version()
[1] ‘3.7’

Even if I start again with

install.packages("BiocManager", repos="https://cran.R-project.org")
BiocManager::install()      # default for R 3.5 is Bioc 3.8

and then 'downgrade' I get

> BiocManager::install(version="3.7")
Downgrade 2 packages to Bioconductor version '3.7'? [y/n]: y
Bioconductor version 3.7 (BiocManager 1.30.4), R 3.5.3 Patched (2019-03-11
  r76325)
Installing package(s) 'BiocVersion'
trying URL 'https://bioconductor.org/packages/3.7/bioc/src/contrib/BiocVersion_3.7.4.tar.gz'
Content type 'application/x-gzip' length 905 bytes
==================================================
downloaded 905 bytes
...
The downloaded source packages are in
    ‘/private/var/folders/yn/gmsh_22s2c55v816r6d51fx1tnyl61/T/RtmpSbpLHl/downloaded_packages’
> BiocManager::version()
[1] ‘3.7’

So I'm still not sure what the issue is? Is it the rocker image? I don't really think they do anything to accommodate (or confuse!) Bioconductor...

ADD REPLY
0
Entering edit mode

It could be an issue specific to rocker/r-ver. Here's a minimal reproducible example.

Dockerfile:

FROM rocker/r-ver:3.5.3

WORKDIR /tmp
ADD install.R .
RUN R -f install.R
WORKDIR /

Corresponding install.R file:

install.packages("BiocManager")
BiocManager::install(version = "3.7")
ADD REPLY
1
Entering edit mode

Thanks, it wasn't clear to me that you were building this from a Dockerfile (i.e., non-interactively). The correct commands for install.R are

install.packages("BiocManager")
BiocManager::install(version = "3.7", ask = FALSE)

I opened an issue at https://github.com/Bioconductor/BiocManager/issues/47

ADD REPLY

Login before adding your answer.

Traffic: 846 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6