[Bioc-devel] Please, minimize your package dependencies (Was: Re: [BioC] Running R without X11?)

Henrik Bengtsson hb at stat.berkeley.edu
Sat Sep 6 02:22:53 CEST 2008


the PDPU ("Package Dependency Police Unit") here:

On Fri, Sep 5, 2008 at 2:37 PM, Amy Johnson <a7johnson at gmail.com> wrote:
> Hi, I'm trying to run batch R scripts that is triggered online with PHP code:
> exec(R --no-save -q < myscript.r > output.txt 2>&1);
> However, as there are some R libraries, e.g. qvalue, webbioc needs X11
> (tcltk) loaded, I got the following errors:
> Loading Tcl/Tk interface ... Error in dyn.load(file, DLLpath = DLLpath, ...)
> :
>  unable to load shared library
> '/usr/local/lib/R/library/tcltk/libs/tcltk.so':
>  /usr/lib/libXft.so.2: undefined symbol: FT_GlyphSlot_Embolden
> Error : .onLoad failed in 'loadNamespace' for 'tcltk'
> Error: package/namespace load failed for 'tcltk'
> Execution halted
> I have no problem to run the script on the shell when X11 is lauched. How do
> I launch X11 before running R scripts in batch from the web? Is there a way
> to avoid loading tcltk when loading R libraries like qvalue and webbioc? As
> far as I remember, the old versions of qvalue and webbioc do not require
> tcltk.

First, 'webbioc' does not load 'tcltk' itself, but via 'qvalue'.

The qvalue package loads tcltk because it is declared in the
'Depends:' field of qvalue's DESCRIPTION.  However, looking at what
qvalue provides, it does not look as if tcltk is a major component,
but only used in qvalue.gui().  I would recommend the maintainer of
qvalue (BCC:ed) to move 'tcltk' from the Depends: field to the
Suggests: field of DESCRIPTION and add:

  require("tcltk") || stop("Package not loaded: tcltk");

to the top of qvalue.gui().  That way, tcltk will only be loaded if
really needed.

The same approach should be used for package dependencies that are
rarely used.  It also lower the number of packages a user has to
download and installed.

Over and out!


> Thanks
> Amy.
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

More information about the Bioc-devel mailing list