Skip to content

Commit

Permalink
Get alpackages
Browse files Browse the repository at this point in the history
  • Loading branch information
chainsawriot committed Feb 23, 2023
1 parent 77ea4a0 commit ddba1e6
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions R/memo_misc.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,20 @@ NULL
if (bioc_version != "release" && utils::compareVersion(bioc_version, "2.0") == -1) {
stop("Bioconductor versions < 2.0 are not supported.", call. = FALSE)
}
con <- url(paste0("http://bioconductor.org/packages/", bioc_version, "/bioc/VIEWS"))
pkgs <- read.dcf(con)
close(con)
as.data.frame(pkgs)
suffixes <- c("bioc", "data/annotation", "data/experiment", "workflow")
output <- data.frame()
for (suffix in suffixes) {
tryCatch({
con <- url(paste0("http://bioconductor.org/packages/", bioc_version, "/", suffix, "/VIEWS"))
on.exit(close(con))
raw_bioc_pkgs_metadata <- suppressWarnings(read.dcf(con))
bioc_pkgs_metadata <- as.data.frame(raw_bioc_pkgs_metadata)[, c("Package", "Version", "Depends","LinkingTo","Imports","Suggests","Enhances")]
output <- rbind(output, bioc_pkgs_metadata)
}, error = function(e) {
#pass
})
}
output
}

.memo_search_bioc <- memoise::memoise(.bioc_package_history, cache = cachem::cache_mem(max_age = 60 * 60))
Expand Down

0 comments on commit ddba1e6

Please sign in to comment.