[BioC] Install details for root level administrators

Dan Tenenbaum dtenenba at fhcrc.org
Wed Jul 18 06:20:42 CEST 2012


On Tue, Jul 17, 2012 at 9:08 PM, Paul Johnson <pauljohn32 at gmail.com> wrote:
> Greetings, BioConductor users.
>
> Can  you share your sysadmin experience with me?
>
> I administer R on a cluster computer system on which we use R with
> about 250 packages from CRAN.  Now users ask me to install some
> BioConductor packages, which I am willing to do.  However, for
> security reasons, I am unwilling to log in as root and run your
> scripts.
>
> You see what I mean, don't you?  Nobody should as root run a script
> from a website.
>
> source("http://bioconductor.org/biocLite.R")
>
> I can't run any script as root unless I understand all of the
> implications, and the chaining together of scripts from biocLite to,
> well, I can't tell exactly what, causes me too much concern.  Even
> after downloading biocLite.R and trying to trace through its
> implications, it is still an unworkable situation. I can't start R as
> root and then run the biocLite program to install packages.
>
> So, what to do?
>
> Option 1. Tell all the users to install their own versions of the
> BioConductor packages.  That would be OK, but maybe it is
> inconsiderate to the ones who are not familiar with trouble in
> compiling software.  If  they are missing the development headers,
> then they will be dismayed & unhappy with me.
>
>
> Option 2. Are installed R packages "relocatable" without danger of
> breakage?  As non-root user, I could run the install using the
> BioConductor scripts.  Then move the install directory into someplace
> under /usr/local.  Would I have a valid, working install for all
> users?
>
> Here's what I mean
>
> source("http://bioconductor.org/biocLite.R")
> biocLite("limma", lib="/tmp/R/bioconductor")
>
> trying URL 'http://www.bioconductor.org/packages/2.10/bioc/src/contrib/limma_3.12.1.tar.gz'
> Content type 'application/x-gzip' length 1025822 bytes (1001 Kb)
> opened URL
> ==================================================
> downloaded 1001 Kb
>
> * installing *source* package ‘limma’ ...
> ** libs
> gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -O3 -pipe
> -g  -c normexp.c -o normexp.o
> normexp.c: In function ‘fit_saddle_nelder_mead’:
> normexp.c:153:3: warning: floating constant exceeds range of ‘double’
> [-Woverflow]
> gcc -std=gnu99 -shared -o limma.so normexp.o -L/usr/lib64/R/lib -lR
> installing to /tmp/R/bioconductor/limma/libs
> ** R
> ** inst
> ** preparing package for lazy loading
> ** help
> *** installing help indices
> ** building package indices
> ** installing vignettes
>    ‘limma.Rnw’
> ** testing if installed package can be loaded
>
> * DONE (limma)
>
> The downloaded source packages are in
>         ‘/tmp/Rtmp3c5pos/downloaded_packages’
> exiting from: install.packages(pkgs = pkgs, lib = lib, repos = repos, ...)
> Old packages: 'irr', 'mirt'
> Update all/some/none? [a/s/n]: n
> Warning message:
> installed directory not writable, cannot update packages 'statnet'
>
> Here's an example of why I can't run the BioConductor scripts as root.
>  Note it asks me for  permission to update "irr" and "mirt", and then
> I say no, and yet it says it can't write in the directory of
> "statnet".  Huh? Luckily for me, statnet is in a place where I don't
> have permission to damage it.

That last message is just a warning and comes out of sequence from
when it occurred. BiocInstaller was not going to install packages
without you agreeing to it.

>
> Nevertheless, I do end up with an install of the BioConductor package
> limma in /tmp/R/bioconductor. Copy that to
> "/usr/local/share/R/bioconductor" and then in the Renviron file do
> something like
>
> R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library:/usr/local/share/R/bioconductor'}
>
>
> But it only does any good if limma (or any other package) will work
> after being relocated from /tmp/R/bioconductor  to
> /usr/local/share/R/bioconductor.  Are there any paths or references
> among package files that will fail after moving whole folders?
>

I don't think so but I'm not sure. Packages with native code (C,
Fortran) are probably especially not likely to work after being moved
in this way.

> Option 3. Figure out the "old fashioned" R instructions to install
> BioConductor packages without using  your scripts.  For example, am I
> correct that the first step is to do this (with R-2.15.1):
>
> install.packages("BiocInstaller", repos =
> "http://www.bioconductor.org/packages/2.10/bioc",
> lib="/usr/local/share/R/bioconductor")
>
> That finishes the work of the biocLite.R script.
>
> Installation of particular packages does not require "biocLite", does
> it? This seems to work:
>
> install.packages("limma", repos =
> "http://www.bioconductor.org/packages/2.10/bioc",
> lib="/usr/local/share/R/bioconductor")
>
>

You have figured out how to get the BiocInstaller package installed
without running
the biocLite.R script, so why not now use BiocInstaller to install
further Bioconductor packages?
This is highly recommended.

> If the install of "limma" or some other package fails because a
> prerequisite is needed, I don't mind installing the prerequisites and
> trying again.
>
> I'll have to stay alert to version changes in BioConductor, and the
> location of your repository.  That's a bad part of this.


Not really. If you use BiocInstaller, it will keep track for you of
which repositories should be downloaded from, based on your version of
R.

Dan


>
> pj
>
> --
> Paul E. Johnson
> Professor, Political Science    Assoc. Director
> 1541 Lilac Lane, Room 504     Center for Research Methods
> University of Kansas               University of Kansas
> http://pj.freefaculty.org            http://quant.ku.edu
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list