11

The current version of the package I would like to use is failing on bioconductor. Yet, the old version used to work.
I am wondering how one can install a specific version of a bioconductor package?
Thanks in advance.

In my case, the package is called biomaRt and the failing version is 2.34.2 while 2.34.0 is successful.

Important Update: The year is 2022, I strongly encourage you to switch to a programming language that is used in the enterprise. Unlike R, the software used in enterprise do have non-functional requirements allowing them to be used in real-life scenarios. Check for example the technologies used in Instagram/Twitter/Dropbox/Reddit's back-end services and what were their motivations in choosing those technologies. This is already a good start.

anilbey
  • 1,817
  • 4
  • 22
  • 38
  • how do you install, what's the error message – Eugène Adell Mar 26 '18 at 08:53
  • There is no error during the installation, the error occurs during certain usages. As you can see, even the build badge status on the bioconductor website is "error" https://bioconductor.org/packages/release/bioc/html/biomaRt.html – anilbey Mar 26 '18 at 08:54
  • 2
    OK, but the question's title is about installing. To install a package use the command R CMD INSTALL yourpackage.tar.gz – Eugène Adell Mar 26 '18 at 09:02
  • 3
    The title is about installing the version of interest. Not always the latest release. As the latest releases are not always the stable releases, right? – anilbey Mar 26 '18 at 09:05
  • 1
    Yet, bioconductor is providing an index for the old versions here: https://bioconductor.org/packages/3.6/bioc/src/contrib/Archive/biomaRt/ The question is how to install them. – anilbey Mar 26 '18 at 09:08
  • They should be stable, but anyway you can install any version you want if dependencies are OK. Download the tar.gz file of your choice, and install it as I said. If you need to remove anything, R CMD REMOVE yourpackage – Eugène Adell Mar 26 '18 at 09:08
  • I do not expect anything from R ecosystem to be stable. – anilbey Jun 01 '22 at 09:43
  • Thanks for the update, I think you aren't alone to face frustration with that technology. – Eugène Adell Jun 03 '22 at 16:36

3 Answers3

7

Bioconductor stores the package archives here: https://bioconductor.org/packages/3.6/bioc/src/contrib/Archive/

1) Locate and download the version you would like to install.
2) Install it using R CMD INSTALL yourpackage_version_x.y.z.tar.gz as suggested by Eugène Adell in the comments.
If you cannot find the specific version on the bioconductor archive, then try to find it on the github repository of the package.

anilbey
  • 1,817
  • 4
  • 22
  • 38
  • Thanks for your help in this subject but I did not find a tar.gz for "rhdf5" in Bioconductor packages archives. The package I want to install is here [rhdf5](http://bioconductor.org/packages/release/bioc/html/rhdf5.html), the 3.6 archives is here [3.6](https://bioconductor.org/packages/3.6/bioc/src/contrib/Archive/) and the [3.7](https://bioconductor.org/packages/3.7/bioc/src/contrib/Archive/). Where I can find a tar.gz for 2.22.0 ? In the github repository, there is nothing [here](https://github.com/grimbough/rhdf5). Can I use biocLite() and a parameter like "version" to install rhdf5_2.22.0? – Maaehj Sep 25 '18 at 10:29
  • If someone else has the same issue, I found an archive of rhdf5 [here](https://bioconductor.org/packages/3.6/bioc/html/rhdf5.html). I think someone can change the package name in the link (or the version of bioc) to get an older version of any Bioconductor packages. Thanks Mike (maintainer of rhdf5) ! – Maaehj Sep 25 '18 at 12:30
7

The version of DESeq2 package I wanted is 1.24 and is located in Bioconductor release version 3.9. The current release version of Bioconductor is 3.10 and DESeq2 version is 1.26.

Doing a BiocManager::install("DESeq2") would thus yield version 1.26. To get my desired version, I had to install packages compatible with Bioconductor release of 3.9 using

BiocManager::install(version = "3.9")

and then

BiocManager::install("DESeq2", version = "3.9")

This is from part of my sessionInfo(). Notice the correct version of DESeq2.

> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 31 (Workstation Edition)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=sl_SI.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=sl_SI.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=sl_SI.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=sl_SI.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] data.table_1.13.2           DESeq2_1.24.0               SummarizedExperiment_1.14.1 DelayedArray_0.10.0        
 [5] BiocParallel_1.18.1         matrixStats_0.57.0          Biobase_2.44.0              GenomicRanges_1.36.1       
 [9] GenomeInfoDb_1.20.0         IRanges_2.18.3              S4Vectors_0.22.1            BiocGenerics_0.30.0
Roman Luštrik
  • 69,533
  • 24
  • 154
  • 197
2

Try adding repos = c("https://bioconductor.org/packages/3.5/bioc", "other CRAN repos that might be needed") option to the install.packages call to install Bioconductor packages from previous releases. Installing specific version from tar.gz archive isn't recommended as you might end up with mutually incompatible packages in your Bioconductor installation.

PSzczesny
  • 373
  • 2
  • 12