BiocManager::install() gives ERROR
1
0
Entering edit mode
@efratushava-22354
Last seen 5.1 years ago

Hello,

I have a problem. Running R on version 3.6.1, and BiocManager::version() is 3.8. The following command:

    > BiocManager::install()

Gives:

    Error: Bioconductor version '3.8' requires R version '3.5'; see
      https://bioconductor.org/install

What can I do?

Notably, I have 2 versions of R on my linux system, one is general, from the cluser, and one is local. In addition, there are 2 different library paths, the local one and the general. BiocManager is installed for both R versions, in the two different directories. So maybe it's loading the BiocManager from the older R version. How can I make it load BiocManager from the newer R version?

The following variable are set to the local directory of libraries:

  R_LIBS_USER /cs/icore/ekushele/R/lib/R/library
  R_LIBS /cs/icore/ekushele/R/bin/R
version • 3.4k views
ADD COMMENT
0
Entering edit mode
shepherl 4.1k
@lshep
Last seen 56 minutes ago
United States

Firstly, I would check your .libPaths( ) to make sure that you are indeed loading the library from your expected path locations as well as installing packages into the right designation.

Bioconductor Versions are closely associated with R versions. Bioconductor version 3.8 is designed to work with R 3.5. For R 3.6 the expected Bioconductor compatible version is now 3.10 (currently release).

To update your BiocManager version you can use the version argument in the install function as described in the install page that the ERROR references : NOTE Since you said you had multiple versions of R and library paths, before doing this I would as stated above check your .libPaths( ) to makes sure it is for the correct versions/locations:

# updates to version 3.10
BiocManager::install(version="3.10")
# checks for out-of-date packages to update
BiocManager::install( )
ADD COMMENT
0
Entering edit mode

My own setup is similar to yours, with different versions of R installed and with only base & recommended packages in the default library, and with different paths for each version of R + Bioconductor I use. I launch different versions of R / Bioconductor with shell aliases

$ bioc-3.9 -e ".libPaths()"
> .libPaths()
[1] "/Users/ma38727/Library/R/3.6/Bioc/3.9"
[2] "/Users/ma38727/bin/R-3-6-branch/library"
$ bioc-3.10 -e ".libPaths()"
> .libPaths()
[1] "/Users/ma38727/Library/R/3.6/Bioc/3.10"
[2] "/Users/ma38727/bin/R-3-6-branch/library"
$ bioc-3.11 -e ".libPaths()"
> .libPaths()
[1] "/Users/ma38727/Library/R/3.7/Bioc/3.11"
[2] "/Users/ma38727/bin/R-devel/library"

The aliases add the version-specific library path

$ alias bioc-3.10
alias bioc-3.10='R_LIBS_USER=~/Library/R/3.6/Bioc/3.10 ~/bin/R-3-6-branch/bin/R --no-save --quiet'

A similar approach is available on Windows or using visual icons. There is some discussion in the 'Managing multiple versions' section of the BiocManager vignette, browseVignettes("BiocManager").

The vignette section 'How it works – details for advanced trouble-shooting' can also be useful for understanding what's going wrong with your installation -- in an existing installation, when you say

BiocManager::version()

BiocManager looks for a package BiocVersion, and the version of the BiocVersion package is what determines the version of Bioconductor. The rationale for this indirection is explained in the section mentioned above. Suppose one has an installation where BiocManager::version() returns "3.9". Saying

BiocManager::install(version="3.10")

will update the BiocVersion package to the one corresponding to Bioconductor version 3.10. So in your case it's likely that you have a 'surprising' version of the BiocVersion package, rather than of the BiocManager package, in your library.

Of course, if you're using Bioconductor version "3.10" on R-3.6 and try to update to BiocManager::install(version="3.11") R will complain that you can't do that -- you need to be using a different version of R...

ADD REPLY
0
Entering edit mode

Thank you! Working!

ADD REPLY

Login before adding your answer.

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