[Bioc-devel] Minimal update of relevant packages only

Martin Morgan mtmorgan at fhcrc.org
Wed Nov 13 23:57:43 CET 2013

On 11/13/2013 01:29 PM, Luo Weijun wrote:
> I noticed that under R 3.0, I frequently get prompt to update other packages after package installation like:

invoking biocLite with biocLite(suppressUpdates=TRUE) gives you a quieter version.

> Using Bioconductor version 2.13 (BiocInstaller 1.12.0), R version 3.0.x.
> Old packages: (long list of packages) …
>>> Update all/some/none? [a/s/n]:
> I am reluctant to update all my bioc packages. It takes a long time to download/update all outdated ones in a Linux machine. And I just did this a little time ago. And packages update frequently, I don’t want to keep updating for unessential/irrelavant changes (to me).
> Here is a question, is there a way to mark or check the essential updates (stopper/conflict fixes)

There is no way to distinguish between trivial and non-trivial changes.

 > so that the update of one package will automatically trigger only NECESSARY 
UPDATES of its dependencies? I understand we can now update bioc package using 
'biocLite()' now based on 
http://www.bioconductor.org/install/#update-bioconductor-package. Another 
related question, I think it would be nice if we can update specific package and 
its dependencies like:
> biocLite("pathview", dependencies=T)
> I tried it, it doesn’t work as I expected. Dependencies (depends/imports) for pathview, including Rgraphviz, graph, org.Hs.eg.db, etc are not updated this way, even though they are outdated based on the “Update all/some/none” list. A few other dependencies get updated this way indeed, including 'AnnotationDbi', 'KEGGREST', 'org.Mm.eg.db'. A little curious, why dependencies are treated differently.

biocLite("pathview", dependencies=TRUE) uses install.packages(), and 
'dependencies=TRUE' checks that the dependecies are installed, not that they are 
current. The R-devel mailing list would be the place to argue for a different 
behavior (of install.packages).

I don't think that there is a simple invocation of old.packages / etc that would 
behave the way you'd like. Maybe something along the lines of

biocUpdatePackages <-
     function(pkgs, lib, dependencies = NA, ...)
     if (is.logical(dependencies) && is.na(dependencies))
         dependencies <- if (!missing(lib) && length(lib) > 1L)
         else c("Depends", "Imports", "LinkingTo")
     avail <- available.packages(contriburl=contrib.url(biocinstallRepos()))
     deps <- avail[pkgs, depends, drop=FALSE]
     deps <- unique(unlist(apply(deps, 1, utils:::.clean_up_dependencies)))
     deps <- deps[deps %in% rownames(avail)]
     update.packages(oldPkgs=deps, repos=biocinstallRepos(), ...)

Then biocUpdatePackages("pathview") (perhaps with ask=FALSE to just do it).


> Adding these features would make BioC users/developers life much easiers. Just my 2 cents.
> Weijun
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel

Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793

More information about the Bioc-devel mailing list