[BioC] suggest/depends cleanup

James W. MacDonald jmacdon at uw.edu
Tue Dec 11 21:33:58 CET 2012


Hi Andrew,

On 12/11/2012 3:12 PM, Andrew Pennebaker [guest] wrote:
> Several packages aren't really operational without the suggested packages, resulting in a lot of manual dependency resolution. The rule seems to be "Don't call my really useful functions without manually resolving all my possible dependencies." Can we move all "Suggests" into "Depends" and deprecate the Suggests metadata?

This isn't a question for BioC. Instead it is a question for R-core, who 
are responsible for such things as deciding if the current status of 
package dependency hierarchy is useful or not.

I should note that the general goal for BioC-core has been to keep both 
the number of downloaded packages required for a given package to a 
minimum (so we have advocated putting things into suggests), as well as 
keeping the search path as short as possible. So I guess most of us 
would disagree with your suggestion.

Anyway, there is never any manual dependency resolution required, as 
this is in your hands. Note that

library(BiocInstaller)
?biocLite

will bring up a help page, which gives the argument list as

  biocLite (pkgs=c("Biobase","IRanges","AnnotationDbi"),
        suppressUpdates=FALSE,
        suppressAutoUpdate=FALSE,
        siteRepos=character(),
        ask=TRUE, ...)

Note the final argument is the ellipsis (...).

and there is this statement under the 'Arguments' section.

  ...: Additional arguments.

Which is code for 'arguments that can be passed down to lower level 
functions', one of which is install.packages(), as noted in the 'See 
Also' section.

So if we look at

?install.packages

there is

dependencies: logical indicating to also install uninstalled packages
           which these packages depend on/link to/import/suggest (and so
           on recursively).  Not used if repos = NULL.  Can also be a
           character vector, a subset of c("Depends", "Imports",
           "LinkingTo", "Suggests", "Enhances").

So all you need to do is

biocLite("whateverpackageitisyouwant", dependencies = 
c("Depends","Imports","Suggests"))

and you will get all the suggested packages.

Best,

Jim



>
>   -- output of sessionInfo():
>
> .
>
> --
> Sent via the guest posting facility at bioconductor.org.
>
> _______________________________________________
> 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

-- 
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099



More information about the Bioconductor mailing list