Title: | Access the Bioconductor archives and install packages from previous releases |
---|---|
Description: | Install older versions of Bioconductor based on the R version currently installed in the system. The package relies on BiocManager to install packages but makes sure that CRAN package versions are downloaded from P3M snapshots. These snapshots will conincide with the last published built date of the requested Bioconductor version. |
Authors: | Marcel Ramos [aut, cre] |
Maintainer: | Marcel Ramos <[email protected]> |
License: | Artistic-2.0 |
Version: | 1.0.1 |
Built: | 2024-11-20 05:06:00 UTC |
Source: | https://github.com/Bioconductor/BiocArchive |
The function checks the PACKAGES
file with RCurl::url.exists
.
checkBioCmirror( mirror = getOption("BioC_mirror"), version = BiocManager::version(), repoType = c("BioCsoft", "BioCann", "BioCexp", "BioCworkflows", "BioCbooks"), type = getOption("pkgType") )
checkBioCmirror( mirror = getOption("BioC_mirror"), version = BiocManager::version(), repoType = c("BioCsoft", "BioCann", "BioCexp", "BioCworkflows", "BioCbooks"), type = getOption("pkgType") )
mirror |
|
version |
|
repoType |
|
type |
|
A logical value indicating availability of the mirror indicated in the name.
bioc_url <- "https://bioconductor.org" bioc_mirror <- c(`0-Bioconductor (World-wide) [https]` = bioc_url) checkBioCmirror(mirror = bioc_mirror)
bioc_url <- "https://bioconductor.org" bioc_mirror <- c(`0-Bioconductor (World-wide) [https]` = bioc_url) checkBioCmirror(mirror = bioc_mirror)
The function looks through the CRAN archive for each package and finds the
package versions that are compatible with the archived Bioconductor version
using the release date of that Bioconductor version as reported by
lastBuilt
.
CRANinstall( pkgs, version = BiocManager::version(), dry.run = FALSE, ..., last_built = lastBuilt(version = version) )
CRANinstall( pkgs, version = BiocManager::version(), dry.run = FALSE, ..., last_built = lastBuilt(version = version) )
pkgs |
|
version |
|
dry.run |
|
... |
Additional parameters for the |
last_built |
|
Mostly called for its side effect of installing the package from the CRAN archives that corresponds to the given Bioconductor version.
CRANinstall(c("dplyr", "ggplot2"), version = "3.14", dry.run = TRUE)
CRANinstall(c("dplyr", "ggplot2"), version = "3.14", dry.run = TRUE)
This function allows users to install packages from a previously released Bioconductor version.
install( pkgs = character(), version = BiocManager::version(), snapshot = getOption("BiocArchive.snapshot", "P3M"), dry.run = FALSE, ..., last_built = lastBuilt(version = version) )
install( pkgs = character(), version = BiocManager::version(), snapshot = getOption("BiocArchive.snapshot", "P3M"), dry.run = FALSE, ..., last_built = lastBuilt(version = version) )
pkgs |
|
version |
|
snapshot |
|
dry.run |
|
... |
Additional parameters for the |
last_built |
|
CRAN packages for out-of-date Bioconductor installations can be
installed from historical 'snapshots' consistent with the last date
the Bioconductor version was current. This behavior is largely dictated by
the actual R/Bioconductor installation, e.g., Bioconductor 3.11. For example,
Bioconductor version 3.11 was current until October 28, 2020; CRAN packages
are therefore installed from a snapshot created on 2020-10-28. By default,
the snapshots are from 'P3M', the Posit Public Package Manager. Use
options(BiocArchive.snapshot = "CRAN")
to use the current CRAN repository
(i.e., disabling the snapshot feature).
Note that the function will temporarily change the getOption('repos')
setting for CRAN
to allow installation of CRAN packages from either the
P3M time machines. The function will also modify the
BIOCONDUCTOR_USE_CONTAINER_REPOSITORY
environment variable to temporarily
disable binary package installations. This is due to the possibility of CRAN
packages in the Bioconductor binary repositories that are not fixed to a
certain release date. Note that BiocArchive.snapshot
has replaced
BiocManager.snapshot
.
It may be desirable to specify different default repositories, especially
CRAN, for intentionally out-of-date Bioconductor releases (e.g., to support
reproducible research). Our approach automatically provides an alteration to
the repos
option , e.g., 'options(repos = c(CRAN =
"https://packagemanager.posit.co/cran/2022-04-13/")).
Mostly called for the side-effects of copying and modifying the
config.yaml
and .Renviron
files to reproduce an R / Bioconductor
package environment from a previous Bioconductor release.
install("DESeq2", version = "3.14", snapshot = "P3M", dry.run = TRUE)
install("DESeq2", version = "3.14", snapshot = "P3M", dry.run = TRUE)
The function facilitates the discovery of last build dates useful for
selecting a fixed date to be used in conjunction with
options("BiocArchive.snapshot")
. Currently, it looks at
https://bioconductor.org/checkResults/ and parses the dates listed.
lastBuilt(version = "all")
lastBuilt(version = "all")
version |
character(1) Indicates the Bioconductor version for which the last build date is sought. By default, 'all' versions will be returned. |
character(1) The last build date for the specified Bioconductor version.
lastBuilt(version = "3.14")
lastBuilt(version = "3.14")
repositories()
reports the URLs from which to install Bioconductor and
CRAN packages. There repositories are based on the data of the last build
of the archived Bioconductor release.
repositories( site_repository = character(), version = BiocManager::version(), snapshot = getOption("BiocArchive.snapshot", "P3M"), last_built = lastBuilt(version = version) )
repositories( site_repository = character(), version = BiocManager::version(), snapshot = getOption("BiocArchive.snapshot", "P3M"), last_built = lastBuilt(version = version) )
site_repository |
(Optional) |
version |
(Optional) |
snapshot |
|
last_built |
|
The CRAN repository reflects the snapshot
arguments, which can be either
P3M
, or CRAN
. The CRAN
option will default to the established
repository. For installation of archived packages on CRAN, see the
CRANinstall function.
When binary installations are enabled via
BIOCONDUCTOR_USE_CONTAINER_REPOSITORY
, the function will temporarily
disable binary installation of packages. Bioconductor binary repositories may
include CRAN packages that are not fixed to the release date.
A character vector of Bioconductor and CRAN repositories accounting for previous releases
if (interactive()) { # run within the Bioconductor 3.14 Docker container repositories(version = "3.14", snapshot = "P3M") }
if (interactive()) { # run within the Bioconductor 3.14 Docker container repositories(version = "3.14", snapshot = "P3M") }
Check that installed packages are consistent (neither out-of-date nor too new) with the verison of R and Bioconductor in use.
valid( pkgs = utils::installed.packages(lib.loc, priority = priority), lib.loc = NULL, priority = "NA", type = getOption("pkgType"), filters = NULL, ..., checkBuilt = FALSE, site_repository = character(), version = BiocManager::version(), last_built = lastBuilt(version = version), snapshot = getOption("BiocArchive.snapshot", "P3M") )
valid( pkgs = utils::installed.packages(lib.loc, priority = priority), lib.loc = NULL, priority = "NA", type = getOption("pkgType"), filters = NULL, ..., checkBuilt = FALSE, site_repository = character(), version = BiocManager::version(), last_built = lastBuilt(version = version), snapshot = getOption("BiocArchive.snapshot", "P3M") )
pkgs |
A character() vector of package names for checking, or
a matrix as returned by |
lib.loc |
A character() vector of library location(s) of
packages to be validated; see |
priority |
character(1) Check validity of all, "base", or
"recommended" packages; see |
type |
character(1) The type of available package (e.g.,
binary, source) to check validity against; see
|
filters |
character(1) Filter available packages to check
validity against; see |
... |
Additional arguments, passed to
|
checkBuilt |
|
site_repository |
|
version |
|
last_built |
|
snapshot |
|
The function mainly works with the CRAN repositories location given
by the repositories()
function. There is no reliable way to verify
CRANinstall
installations other than by running the function with the
dry.run = TRUE
parameter and manually comparing versions.
biocValid
list object with elements too_new
and out_of_date
containing data.frame
s with packages and their installed locations that
are too new or out-of-date for the archived version of Bioconductor. When
internet access is unavailable, an empty 'biocValid' list is returned. If
all packages ('pkgs') are up to date, then TRUE
is returned.
if (interactive()) { valid() }
if (interactive()) { valid() }