[BioC] Bioconductor setup

Jeff Gentry jgentry at jimmy.harvard.edu
Thu Jun 3 18:27:19 CEST 2004


> The problem we have is that people who then run Bioconductor from their 
> own unprivledged accounts start to run into permissions issues when 
> routines such as read.affybatch decide they want to start writing to the 
> library directories:
> 
>  > read.affybatch(filenames = listofiles)
> Loading required package: reposTools
> Warning messages:
> 1: Incompatible phenoData object. Created a new one.
>   in: read.affybatch(filenames = listofiles)
> 2: Incorrect permissions to edit package database, 
> /usr/lib/R/library/liblisting
> .Rda in: save.locLib(locLibList, curLib)
> Note: You did not specify a download type.  Using a default value of: Source
> This will be fine for almost all users

I can start to shed some light here.  The actual manifested problem comes
from the reposTools package (which is causing the complaints about
'liblisting' and the failed installations - this package handles the
package management for Bioconductor.  What's happening is that when these
other functions are requesting installation of another package, they're
not specifying a specific installation library directory.

All of the reposTools calls from the 'affy' package (to use your
example) work through an affy function 'getCdfInfo', which in turn calls
'cdfFromBioC'.  It would appear that while 'cdfFromBioC' allows for
alternate libraries to be used, 'getCdfInfo' does not, nor does there seem
to be any mechanism in the functions that call 'getCdfInfo'.  There
probably should be something here, or at least documentation in the
functions on how to go about getting the packages directed to a personal R
library directory.  

The 'cdfFromBioC' function, as I said, does have a 'lib' parameter which
in turn gets sent to the reposTools functions and directs where to install
packages to.  The default is '.libPaths()[1]', which if a user doesn't do
anything special is (always, I think) going to point to
/path/to/R/library - and in a situation like you're describing with a
systemwide R, causes problems, as you've seen.

> I'm not familiar with R or Bioconductor - so if there is a simple
> solution (like specifying a temporary working directory when these
> operations are performed, or setting some kind of environmental variable
> that R understands) I would be delighted to know :)

This is essentially what needs to be done.  Each user does not need their
own installation of every R/Bioconductor package nor their own install of
R, but probably should have their own personal library directory for their
personal package installations (and not just for BioC packages).  All that
is required is a directory that they have write permission to (perhaps
"~/myRlib"), and then direct installs there.

To explain the '.libPaths()[1]' - .libPaths() is a function that lists, in
sequential order, the set of package library directories that the R
session knows about.  The subset '[1]' says to use the first one in the
vector.  On a per-session basis, a user can call:

> .libPaths("~/myRlib") 

(or whatever their directory is), which will put that directory at the
front, and would solve this problem.  For a permanent solution, the
'R_LIBS' environment variable can be set - from the help file for
.libPaths():

     The library search path is initialized at startup from the
     environment variable 'R_LIBS' (which should be a colon-separated
     list of directories at which R library trees are rooted) by
     calling '.libPaths' with the directories specified in 'R_LIBS'.


So if every user had a directory that they could personally access
(e.g. "~/myRlibs") and the R_LIBS set to "~/myRlibs", that should take
care of your problems.  Note that R will manage the tilde expansion from
the environment variable, and also the /path/to/R/library will
automatically be in .libPaths even if not in R_LIBS (it gets appended to
the R_LIBS vector).

Sorry for the long winded response, but hope this helps
-J



More information about the Bioconductor mailing list