Bioconductor local installation, R versions
1
1
Entering edit mode
jrowell1 ▴ 10
@jrowell1-15873
Last seen 3.4 years ago

Hello all,

I need to do a local installation of Bioconductor in my home directory on a CentOS 7 system running R 3.4.2.  When I use source("https://bioconductor.org/biocLite.R"), I am asked if I want to use a personal library.  I have set up a lib in my ../home/R directory, but I don't know how to point to that with the source() function.  I read the manual, but it's not clear to me how to edit to function to install Bioconductor locally.

Just as background,  I have also tried to install a local copy of R 3.5.0, but that fails because libreadline-dev package is not installed on the server.  I could compile it locally, but I'm unsure whether this would create more problems, with some of the dependencies on root and some dependencies installed locally.  So I abandoned the plan in favor of just trying to get an older copy of Bioconductor to run.  I suspect that when I get source() to work, it's going to tell me to upgrade R.  So if someone could give me a workaround for that as well, that would be awesome.

I have spoken with the admins about installing the latest R, but the issue is that I'm under a time crunch for an analysis.  I need a normalization package, edgeR, that is a bioconductor package.  I've been working on a fix for two days and I'm at my wit's end...I'm about to abandon ship and try using Python. 

There are more details about everything I have tried, and all my errors, in my Stack Overflow post here, but I think I have included the germane detail above.

I'd really appreciate some guidance.  I'm at sea here.

Thank you!

~Jessica

 

 

R bioconductor local local installation centos7 • 1.5k views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 4 hours ago
United States

Try

.libPaths("~/home/R directory")
biocLite("edgeR")

Assuming that you were literal about the local dir you set up. Alternatively you can just delete that dir and let R create one for you.

 

ADD COMMENT
0
Entering edit mode

Hi James,

Thanks so much.  Just so I understand, if I run .libPaths("~/R-3.4.2/lib"), am I over-writing my old paths?  I had previously concatenated this new directory like so: `.libPaths( c(.libPaths(), "~/R-3.4.2/lib")`.  Ah, I also had an idea - please let me know if this is a good/bad idea, or not necessary: setting my .libPaths to just the local one, then running source(...), then restoring my original .libPaths.  (I don't want to lose access to the 30 packages that are installed under the root folders, which are /usr/lib64/R/library and /usr/share/R/library).  I suppose that's a more complex alternative to letting R create the personal library for me...maybe I should stop being so controlling...

ADD REPLY
0
Entering edit mode

Your first step should always be to check the help page for the relevant function. The R help pages take some getting used to, as the most notable feature of the help pages is their terseness. But they do tend to be pretty complete; you just have to realize that there isn't much extra cruft there, so every word counts. So, from ?.libPaths we have

Details:

     '.Library' is a character string giving the location of the
     default library, the 'library' subdirectory of 'R_HOME'.

     '.Library.site' is a (possibly empty) character vector giving the
     locations of the site libraries, by default the 'site-library'
     subdirectory of 'R_HOME' (which may not exist).

     '.libPaths' is used for getting or setting the library trees that
     R knows about (and hence uses when looking for packages).  If
     called with argument 'new', the library search path is set to the
     existing directories in 'unique(c(new, .Library.site, .Library))'
     and this is returned.  If given no argument, a character vector
     with the currently active library trees is returned.

With the relevant section being the last paragraph. You almost always want your local library dir to be higher on the search path. This allows you to do things like install an updated package version if your sysadmin can't get it done for you in a reasonable amount of time.

ADD REPLY

Login before adding your answer.

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