biocLite() fails to update packages when main library not writable
1
1
Entering edit mode
Jenny Drnevich ★ 2.0k
@jenny-drnevich-2812
Last seen 24 days ago
United States

Hello,

I just noticed that biocLite() does not have all the default functionality of update.packages(). I'm switching over to mainly using a personal library instead of the R home library because of the recent changes in Windows Security Control and the wisdom of not letting software run as administrator on my own machine. Using biocLite() to install packages works smoothly - when it can't write to the R home library it asks me if I want to use a personal library instead and if one doesn't exist yet it will make it for me in the default location. However, biocLite() fails when trying to update packages in the main library - it just ends with a warning message about "installed directory not writable, cannot update packages" (full code & output below). However, update.packages() will ask me if I want to use a personal library instead and will install the newer package versions there (which appears to get checked first before the main library so the new packages will be used). I know that biocLite() uses install.packages() internally for installing new packages, but apparently not update.packages()? Can you add this seamless functionality to a future version? 

Thanks,

Jenny

R version 3.1.3 (2015-03-09) -- "Smooth Sidewalk"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> source("http://bioconductor.org/biocLite.R")
Warning in install.packages("BiocInstaller", repos = a["BioCsoft", "URL"]) :
  'lib = "C:/Program Files/R/R-3.1.3/library"' is not writable
trying URL 'http://www.bioconductor.org/packages/3.0/bioc/bin/windows/contrib/3.1/BiocInstaller_1.16.1.zip'
Content type 'application/zip' length 109541 bytes (106 KB)
opened URL
downloaded 106 KB

package ‘BiocInstaller’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\users\igb\appdata\local\Temp\Rtmp8gxzww\downloaded_packages
Bioconductor version 3.0 (BiocInstaller 1.16.1), ?biocLite for help

> biocLite()
BioC_mirror: http://bioconductor.org
Using Bioconductor version 3.0 (BiocInstaller 1.16.1), R version 3.1.3.
Installing package(s) 'Biobase' 'IRanges' 'AnnotationDbi'
also installing the dependencies ‘BiocGenerics’, ‘S4Vectors’, ‘GenomeInfoDb’, ‘DBI’, ‘RSQLite’

trying URL 'http://bioconductor.org/packages/3.0/bioc/bin/windows/contrib/3.1/BiocGenerics_0.12.1.zip'
Content type 'application/zip' length 855784 bytes (835 KB)
opened URL
downloaded 835 KB

#other "trying URL" removed to save space

package ‘BiocGenerics’ successfully unpacked and MD5 sums checked
package ‘S4Vectors’ successfully unpacked and MD5 sums checked
package ‘GenomeInfoDb’ successfully unpacked and MD5 sums checked
package ‘DBI’ successfully unpacked and MD5 sums checked
package ‘RSQLite’ successfully unpacked and MD5 sums checked
package ‘Biobase’ successfully unpacked and MD5 sums checked
package ‘IRanges’ successfully unpacked and MD5 sums checked
package ‘AnnotationDbi’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\users\igb\appdata\local\Temp\Rtmp8gxzww\downloaded_packages
Warning message:
installed directory not writable, cannot update packages 'codetools', 'mgcv' 

> biocLite()
BioC_mirror: http://bioconductor.org
Using Bioconductor version 3.0 (BiocInstaller 1.16.1), R version 3.1.3.
Warning message:
installed directory not writable, cannot update packages 'codetools', 'mgcv' 

> update.packages()
--- Please select a CRAN mirror for use in this session ---
codetools :
 Version 0.2-10 installed in C:/Program Files/R/R-3.1.3/library 
 Version 0.2-11 available at http://cran.wustl.edu
Update (y/N/c)?  y
mgcv :
 Version 1.8-4 installed in C:/Program Files/R/R-3.1.3/library 
 Version 1.8-5 available at http://cran.wustl.edu
Update (y/N/c)?  y
Warning in install.packages(update[instlib == l, "Package"], l, contriburl = contriburl,  :
  'lib = "C:/Program Files/R/R-3.1.3/library"' is not writable
trying URL 'http://cran.wustl.edu/bin/windows/contrib/3.1/codetools_0.2-11.zip'
Content type 'application/zip' length 46174 bytes (45 KB)
opened URL
downloaded 45 KB

trying URL 'http://cran.wustl.edu/bin/windows/contrib/3.1/mgcv_1.8-5.zip'
Content type 'application/zip' length 2011901 bytes (1.9 MB)
opened URL
downloaded 1.9 MB

package ‘codetools’ successfully unpacked and MD5 sums checked
package ‘mgcv’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\users\igb\appdata\local\Temp\Rtmp8gxzww\downloaded_packages

> .libPaths()
[1] "C:/users/igb/Documents/R/win-library/3.1"
[2] "C:/Program Files/R/R-3.1.3/library"      

> library(codetools)
> sessionInfo()
R version 3.1.3 (2015-03-09)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] codetools_0.2-11     BiocInstaller_1.16.1

loaded via a namespace (and not attached):
[1] tools_3.1.3
> 
bioclite package updates • 8.1k views
ADD COMMENT
1
Entering edit mode
Dan Tenenbaum ★ 8.2k
@dan-tenenbaum-4256
Last seen 3.2 years ago
United States

Thanks for reporting this. It appears that update.packages() has gotten smarter, so we don't need to check whether packages are writable before calling it.

This is fixed in BiocInstaller 1.16.2 in release and 1.17.6 in devel. These will be available via biocLite (should auto-update when BiocInstaller is loaded) tomorrow in the late morning (Seattle time) or now via svn.

Dan

ADD COMMENT
0
Entering edit mode

Thanks Dan! The timing was perfect - I just finished teaching a workshop on Intro to R & Bioconductor, and showed them this morning about the update.packages/biocLite discrepancies and said I had reported it to the support site and that it would likely get fixed soon. Then just now I showed the support site to them and saw that you had fixed it - a great example of how responsive the Bioconductor group can be!!

ADD REPLY

Login before adding your answer.

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