Search code examples
rlocalbioconductor

Bioconductor, R versions and local installs


I need to install Bioconductor. I'm trying to get this on one of two systems; I'm under a real time crunch and every single workaround has failed.

System 1: Centos 7 server, R v3.4.2 (can't get R v3.5.0 because the server doesn't have the libreadline-dev package; a separate issue)

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

    • Problem: I cannot install this as root. I can't find a way to install it locally. Adding lib="/my/local/dirpath" to source() function is not correct syntax, and from reading the manpage on source() I can't figure it out.

System 2: My personal machine, running Win10 and I also have the Linux subsystem. I updated R v3.3.1 to 3.5.0 using "installr" package.

    1. Run source() command as above.

      • Latest error: lib = "C:/Program Files/R/R-3.5.0/library is not writeable. Want to use a personal library? Yes I do. I have one I already created. I added it to .libPaths. I don't know how to add it to source() function.
    1. Previous error: BiocInstaller version is too old ...
      • For that error, I tried following the instructions on the Bioconductor install page. remove.packages("BiocInstaller", lib=.libPaths()) and then run source(...) again. Then I got the error "BiocInstaller" package doesn't exist. install.packages("BiocInstaller", lib="my/local/dirpath") told me package 'BiocInstaller' is not available (for R version 3.5.0).

I have gotten that same error when I try to install BiocInstaller the same way on my Centos system (package not available for R version 3.4.2).

For the love of all that is good and holy, would some kind and knowledgeable person please give me some advice here? It's been two days, the clock is ticking, and I'm at my wit's end. I feel like I've tried everything. I'd be grateful for your help.


Solution

  • System 1. Ensure .libPaths()[1] is a writable location.

    System 2. Part 1. Is your writable location in the first position of .libPaths()? Is there an existing version of BiocInstaller in a non-writable location? Part 2. 'BiocInstaller' is from the Bioconductor repository, not CRAN; you would need to know the correct location of the Bioconductor repository for the version you are trying to use. The best way to find that is to get the source() command to work. biocLite() is a wrapper around install.packages(), and the key line in the documentation ?install.packages() is

    lib: character vector giving the library directories where to
          install the packages.  Recycled as needed.  If missing,
          defaults to the first element of '.libPaths()'.
    

    Ask instead on https://support.bioconductor.org (here's the cross-post, I think https://support.bioconductor.org/p/109184/)