BiocManager v. 3.9 - where is it?
2
0
Entering edit mode
lejeczek ▴ 10
@lejeczek-7688
Last seen 4.8 years ago
United Kingdom

hi anybody knows where is 3.9 version? It is not in CRAN that's for sure. Many thanks, L.

...
selection: 1
trying URL
'https://cloud.r-project.org/src/contrib/BiocManager_1.30.4.tar.gz'
Content type 'application/x-gzip' length 242304 bytes (236 KB)
==================================================
downloaded 236 KB

* installing *source* package ‘BiocManager’ ...
** package ‘BiocManager’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package ‘BiocManager’
    finding HTML links ... done
    BiocManager-pkg                         html  
    available                               html  
    install                                 html  
    repositories                            html  
    valid                                   html  
    version                                 html  
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation
path
* DONE (BiocManager)
Making 'packages.html' ... done

The downloaded source packages are in
    ‘/tmp/RtmpDHZeQE/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
> library(BiocManager)
Bioconductor version 3.8 (BiocManager 1.30.4), ?BiocManager::install for
help
Bioconductor version '3.8' is out-of-date; the current release version
'3.9' is
  available with R version '3.6'; see https://bioconductor.org/install
Warning message:
Bioconductor version '3.8' requires R version '3.5'; see
  https://bioconductor.org/install 
biocmanager • 2.7k views
ADD COMMENT
2
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 3 hours ago
EMBL Heidelberg

I think you're getting confused between package versions and Bioconductor releases (which occur every 6 months and also have version numbers). All packages within a specific release are expected to work with each other and a specific version of R, but not this is not necessarily true between releases. In this case the '3.9' refers to the current version of Bioconductor. The BiocManager package available on CRAN will let you specify the Bioconductor release you want to work with, but will warn you if it's incompatible with the R you're using.

It seems likely that you've updated to a new R version, but are using the same library location to install packages and BiocManager is picking up the version 3.8 from your previous installation.

Try running the following to update everything to the newer version of Bioconductor:

BiocManager::install(version = "3.9")
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States

Note that the message says

...the current release version '3.9' is  available with R version '3.6'

You're using a version of R (3.5.x) that does not support Bioconductor version 3.9 -- update your R to version 3.6, and then BiocManager::install() will in stall Bioc 3.9.

ADD COMMENT
0
Entering edit mode

I'm not. Do you people really presume that everybody else is a dummy of some sort and unable to do 2 + 2 ??

$ /usr/bin/R 

R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)
> library(BiocManager)
Bioconductor version 3.8 (BiocManager 1.30.4), ?BiocManager::install for help
Bioconductor version '3.8' is out-of-date; the current release version '3.9' is
  available with R version '3.6'; see https://bioconductor.org/install
Warning message:
Bioconductor version '3.8' requires R version '3.5'; see
  https://bioconductor.org/install 
> BiocManager::install()
Error: Bioconductor version '3.8' requires R version '3.5'; see
  https://bioconductor.org/install

What I originally pasted is all from R 3.6

ADD REPLY
0
Entering edit mode

OK; likely you have a stale version of the BiocVersion package, probably because you re-used the libraries from R-3.5 in R-3.6. Remove BiocVersion

remove.packages("BiocVersion") ## repeat until no more installations

and start again. (Better practice: don't re-use libraries across R versions).

Not making any presumptions, just working through what I see in your report, which did not include any information about R version actually in use.

ADD REPLY
0
Entering edit mode

Okey, it's BiocVersion which messes the whole thing up. Manually "BiocVersion" must be removed first and then BiocManager 3.9 will install properly.

Any @devel, cares to explain, anybody knows - why?

ADD REPLY
0
Entering edit mode

Glad that worked. What would you like explained?

ADD REPLY
0
Entering edit mode

What BiocVersion had to do with that? Why was it the cause of the problem?

ADD REPLY
2
Entering edit mode

The basic issue is that R has an annual release cycle, whereas Bioconductor has a twice-yearly release cycle. Also, Bioconductor has a 'devel' branch where new packages and features are introduced, and a 'release' branch where bug fixes and relative stability are important.

Previously, one would install a Bioconductor package by running source(".../biocLite.R") to read a file from the web. The file contained an installation script that was smart enough to figure out what version of R and Bioconductor were in use / appropriate for the person invoking the script. Sourcing an executable script from the web is an obvious security problem.

Our solution was to use a CRAN package BiocManager, so that users would start the ball rolling with an installation from CRAN, rather than sourcing from the web.

But how does a CRAN package know what version of Bioconductor is in use? Can we use BiocManager? No, because we don't have enough control of the version of BiocManager available on CRAN, e.g., everyone using the same version of R would get the same version of BiocManager and hence of Bioconductor. But there are two Bioconductor versions per R version, so that's not going to work!

BiocManager could write information to a cache on the user disk, but this is not a robust solution for a number of reasons. Is there any other way that R could keep track of version information? Yes, by installing a Bioconductor package (BiocVersion) whose sole purpose is to indicate the version of Bioconductor in use. You see this when you run BiocManager for the first time

/tmp$ mkdir eglib
/tmp$ R_LIBS_USER=eglib ~/bin/R-3-6-branch/bin/R --vanilla
> library("BiocManager")
Error in library("BiocManager") :
  there is no package called 'BiocManager'
> install.packages("BiocManager")
Installing package into '/private/tmp/eglib'
(as 'lib' is unspecified)
...
> BiocManager::install()
Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6.0 Patched (2019-04-26
  r76431)
Installing package(s) 'BiocVersion'
trying URL 'https://bioconductor.org/packages/3.9/bioc/src/contrib/BiocVersion_3.9.0.tar.gz'
Content type 'application/x-gzip' length 984 bytes
==================================================
downloaded 984 bytes

* installing *source* package 'BiocVersion' ...
** using staged installation
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (BiocVersion)

The downloaded source packages are in
    '/private/var/folders/yn/gmsh_22s2c55v816r6d51fx1tnyl61/T/RtmpxaCwDL/downloaded_packages'

You were re-using your BiocVersion from a previous installation, and BiocManager was responding to the request to install a version of Bioconductor that required a different version of R.

One weakness in the current approach is that the BiocManager does not actually load BiocVersion, it just determines the package version (the scenario below continues from above, but is not quite the same as your scenario)

/tmp$ R_LIBS_USER=eglib ~/bin/R-3-5-branch/bin/R --quiet  # new library, old R
> packageVersion("BiocVersion")
[1] '3.9.0'

If BiocManager actually tried to load the package, R would have objected

> library("BiocVersion")
Error: This is R 3.5.3, package 'BiocVersion' needs >= 3.6.0

We will certainly make this process more robust, with a clearer indication to the user of what the underlying problem is.

ADD REPLY
0
Entering edit mode

Great explanation Martin, thanks. Perhaps a similar explanation should be included in the BiocVersion package itself, to provide a reference for similar questions in the future.

Out of interest, does the version argument to BiocManager::install() affect the BiocVersion package? I'm wondering because this answer to a similar symptom (https://support.bioconductor.org/p/120724/#120726) seems to get a lot of votes, but it doesn't suggest removing BiocVersion first.

ADD REPLY

Login before adding your answer.

Traffic: 698 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