rPackages: autoset bioconductor ver to match R ver

BioConductor releases are tied to specific R releases.

Updating the package set now automatically selects the
correct version of bioconductor to match the current version of
R.
This commit is contained in:
Phil Dyer 2021-09-15 11:09:17 +10:00
parent 8a2ec31e22
commit 29fdc0ce2d
2 changed files with 9 additions and 1 deletions

View File

@ -1,9 +1,16 @@
#!/usr/bin/env Rscript
library(data.table)
library(parallel)
library(BiocManager)
cl <- makeCluster(10)
biocVersion <- 3.12
biocVersion <- BiocManager:::.version_map()
biocVersion <- biocVersion[biocVersion$R == getRversion()[, 1:2],c("Bioc", "BiocStatus")]
if ("release" %in% biocVersion$BiocStatus) {
biocVersion <- as.numeric(as.character(biocVersion[biocVersion$BiocStatus == "release", "Bioc"]))
} else {
biocVersion <- max(as.numeric(as.character(biocVersion$Bioc)))
}
snapshotDate <- Sys.Date()-1
mirrorUrls <- list( bioc=paste0("http://bioconductor.statistik.tu-dortmund.de/packages/", biocVersion, "/bioc/src/contrib/")

View File

@ -12,6 +12,7 @@ stdenv.mkDerivation {
packages = with rPackages; [
data_table
parallel
BiocManager
];
})
];