Bioconductor setup
1
0
Entering edit mode
Dan Swan ▴ 10
@dan-swan-792
Last seen 9.6 years ago
Hi there, We supply Bioconductor as part of the Bio-Linux project (http://bio-linux.net). This is a modified Linux distro for bioinformatics. Often when deployed the machines act as multi-user servers. R has been installed on the system (1.9.0) as a root equivalent user. Bioconductor was installed via getBioC with R running as a root equivalent user. 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 [1] "Attempting to download mgu74av2cdf from http://www.bioconductor.org/data/cd fenvs/repos/" [1] "Download complete." [1] "Installing mgu74av2cdf" mkdir: cannot create directory `/usr/lib/R/library/00LOCK': Permission denied ERROR: failed to lock directory '/usr/lib/R/library' for modifying Error in library("mgu74av2cdf", lib.loc = "/usr/lib/R/library") : There is no package called 'mgu74av2cdf' In addition: Warning messages: 1: Incorrect permissions to edit package database, /usr/lib/R/library/liblisting .Rda in: save.locLib(locLibList, curLib) 2: Installation of package mgu74av2cdf had non-zero exit status in: installPkg(fileName, pkg, pkgVer, type, lib, repEntry, versForce) Now the /usr/lib/R/library subdirectories are owned, grouped and only writable by root hence the errors being spat out. I can't obviously have R installs for every user, but I'm starting to wonder if each user on the system requires their own Bioconductor install in their own workspace? I have thought about chgrping the directory to a new gid and adding Bioconductor users to that group, which may work, but is an ugly kludge. 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 :) many thanks in advance, Dan -- Dr Dan Swan - Bio-Linux Developer | RHCE EGTDC, CEH, Mansfield Road, Oxford, OX1 3SR Tel: 01865 281 658 Fax: 01865 281 696 http://envgen.nox.ac.uk/ | dswan@ceh.ac.uk
cdf cdf • 1.6k views
ADD COMMENT
0
Entering edit mode
Jeff Gentry ★ 3.9k
@jeff-gentry-12
Last seen 9.6 years ago
> 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
ADD COMMENT

Login before adding your answer.

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