nanxstats / liftr

🐳 Containerize R Markdown documents for continuous reproducibility
https://nanx.me/liftr/
GNU General Public License v3.0
170 stars 20 forks source link

Previous Bioconductor package versions #28

Closed jasonserviss closed 6 years ago

jasonserviss commented 6 years ago

Hello,

It would appear as though liftr is having difficulty with previous versions of Bioconductor and Bioconductor packages. Running the following .Rmd:

`

title: "Untitled" output: html_document liftr: maintainer: "Maintainer Name" email: "name@example.com" from: "bioconductor/release_core2:R3.4.0_Bioc3.5" pandoc: false texlive: false bioc:

library(topGO)

`

results in the following once the initial installation of bioconductor/release_core2:R3.4.0_Bioc3.5 completes:

Step 5/7 : RUN Rscript -e "source('http://bioconductor.org/biocLite.R');biocLite(c('topGO/2.28.0'))" ---> Running in 043d8fee39fe Bioconductor version 3.5 (BiocInstaller 1.26.0), ?biocLite for help A newer version of Bioconductor is available for this version of R, ?BiocUpgrade for help Bioconductor version 3.5 (BiocInstaller 1.26.0), ?biocLite for help A newer version of Bioconductor is available for this version of R, ?BiocUpgrade for help trying URL 'https://bioconductor.org/packages/3.5/bioc/src/contrib/BiocInstaller_1.26.1.tar.gz' Content type 'application/x-gzip' length 18347 bytes (17 KB) ================================================== downloaded 17 KB

Bioconductor version 3.5 (BiocInstaller 1.26.0), ?biocLite for help A newer version of Bioconductor is available for this version of R, ?BiocUpgrade for help  installing source* package ‘BiocInstaller’ ...  R  inst  preparing package for lazy loading  help * installing help indices  building package indices * testing if installed package can be loaded Bioconductor version 3.5 (BiocInstaller 1.26.1), ?biocLite for help A newer version of Bioconductor is available for this version of R, ?BiocUpgrade for help  DONE (BiocInstaller)  The downloaded source packages are in ‘/tmp/RtmpDHoPBn/downloaded_packages’ Bioconductor version 3.5 (BiocInstaller 1.26.1), ?biocLite for help A newer version of Bioconductor is available for this version of R, ?BiocUpgrade for help 'BiocInstaller' updated to version 1.26.1 BioC_mirror: https://bioconductor.org Using Bioconductor 3.5 (BiocInstaller 1.26.1), R 3.4.0 (2017-04-21). Installing github package(s) ‘topGO/2.28.0’ Downloading GitHub repo topGO/2.28.0@master from URL https://api.github.com/repos/topGO/2.28.0/zipball/master Installation failed: Not Found (404)

[0mOld packages: 'AnnotationDbi', 'AnnotationHub', 'backports', 'BH', 'Biobase', 'BiocGenerics', 'BiocParallel', 'BiocStyle', 'biomaRt', 'Biostrings', 'bookdown', 'BSgenome', 'checkmate', 'curl', 'data.table', 'DBI', 'DelayedArray', 'ensembldb', 'evaluate', 'foreign', 'Formula', 'GenomeInfoDb', 'GenomicAlignments', 'GenomicFeatures', 'GenomicRanges', 'gridExtra', 'GSEABase', 'htmlwidgets', 'httr', 'IRanges', 'jsonlite', 'lambda.r', 'lazyeval', 'Matrix', 'mgcv', 'openssl', 'OrganismDbi', 'R6', 'Rcpp', 'RSQLite', 'rtracklayer', 'S4Vectors', 'scales', 'ShortRead', 'stringi', 'SummarizedExperiment', 'tibble', 'VariantAnnotation', 'XML'  ---> e64f91a7d127 Removing intermediate container 043d8fee39fe Step 6/7 : RUN mkdir /liftrroot/ ---> Running in 9c95cb7d4eca ---> 1dcb9ac6c7b3 Removing intermediate container 9c95cb7d4eca Step 7/7 : WORKDIR /liftrroot/ ---> f22056789c44 Removing intermediate container 7028e5fd2dc5 Successfully built f22056789c44 Successfully tagged test:latest $container_name [1] "liftr_container_a71c6c41_81a1_47eb_a525_1aedad258a80"

$image_name [1] "test"

$docker_build_cmd [1] "docker build --no-cache=true --rm=true -t=\"test\" /Users/jasonserviss/Desktop/test"

$docker_run_cmd [1] "docker run --rm --name \"liftr_container_a71c6c41_81a1_47eb_a525_1aedad258a80\" -u id -u $USER -v \"/Users/jasonserviss/Desktop/test:/liftrroot/\" test Rscript -e \"library('knitr');library('rmarkdown');library('shiny');setwd('/liftrroot/');render(input = 'test.Rmd')\""Loading required package: methods |.................................................................| 100% label: unnamed-chunk-1

processing file: test.Rmd Quitting from lines 15-16 (test.Rmd) Error in library(topGO) : there is no package called 'topGO' Calls: render ... withCallingHandlers -> withVisible -> eval -> eval -> library Execution halted

The topGO version corresponds with the Bioconductor image version (can be seen here: https://bioconductor.org/packages/3.5/bioc/html/topGO.html) although it would appear that liftr is looking for the package version in an invalid place (i.e. https://api.github.com/repos/topGO/2.28.0/zipball/master).

I had originally thought that this is due to the relatively recent Bioconductor switch to Github (from SVN) and noticed that the earliest version of topGO on GitHub is 3.0... although both https://api.github.com/repos/topGO/3.0/zipball/master and https://api.github.com/repos/topGO/release-3.0/zipball/master are also invalid urls which probably indicates that liftr would fail with that version as well.

jasonserviss commented 6 years ago

I managed to resolve this myself... Apparently, Bioconductor automagically installs the package version associated with a specific version of R, so the solution was to remove the specific version after topGO so that the yml has only:

bioc: - topGO

instead of:

bioc: - topGO/2.280

nanxstats commented 6 years ago

@jasonserviss - thanks for reporting. That's exactly the type of package versioning solution I want to see for liftr -- a simple one without specifying an explicit number. 👍