Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Bioc packages #1

Open
Enchufa2 opened this issue Oct 31, 2023 · 4 comments
Open

Add Bioc packages #1

Enchufa2 opened this issue Oct 31, 2023 · 4 comments

Comments

@Enchufa2
Copy link
Member

  • Equivalent to tools::CRAN_package_db for Bioc?
@eddelbuettel
Copy link

eddelbuettel commented Oct 31, 2023

Here is what r2u does:

https://github.com/eddelbuettel/r2u/blob/cae4998b43a4f663ef75f55c18a4839e2cabb237/R/init.R#L193-L219

## also:
##
## db <- available.packages(repos = BiocManager::repositories())
## deps <- tools::package_dependencies("Rgraphviz", db, recursive=TRUE)

## cf  contrib.url(BiocManager::repositories())
##     [1] "https://bioconductor.org/packages/3.14/bioc/src/contrib"
##     [2] "https://bioconductor.org/packages/3.14/data/annotation/src/contrib"
##     [3] "https://bioconductor.org/packages/3.14/data/experiment/src/contrib"
biocrepo <- paste0("https://bioconductor.org/packages/", .getConfig("bioc_version"), "/bioc")
apBIOC <- data.table(ap="Bioc", as.data.frame(available.packages(repos=biocrepo)))
biocdataannrepo <- paste0("https://bioconductor.org/packages/", .getConfig("bioc_version"), "/data/annotation")
apBIOCdataann <- data.table(ap="Bioc", as.data.frame(available.packages(repos=biocdataannrepo)))
apBIOC <- merge(apBIOC, apBIOCdataann, all=TRUE)
biocdataexprepo <- paste0("https://bioconductor.org/packages/", .getConfig("bioc_version"), "/data/experiment")
apBIOCdataexp <- data.table(ap="Bioc", as.data.frame(available.packages(repos=biocdataexprepo)))
apBIOC <- merge(apBIOC, apBIOCdataexp, all=TRUE)

## the returned set is tools::CRAN_package_db() and _not_ dependent on the distribution name
ppmrepo <- paste0("https://packagemanager.posit.co/all/__linux__/jammy/latest")
apPPM <- data.table(ap="CRAN", as.data.frame(available.packages(repos=ppmrepo)))
ap <- merge(apPPM, apBIOC, all=TRUE)

ap[, deb := paste0("r-", tolower(ap), "-", tolower(Package))]

apfile <- .defaultAPFile(TRUE)
saveRDS(ap, apfile)

@Enchufa2
Copy link
Member Author

The issue is that tools::CRAN_package_db returns much more info than utils::available.packages. In particular, I'm after the SystemRequirements field here.

@eddelbuettel
Copy link

Oh I am aware. But maybe other repositories just don't do you the favour of collating that. I grew it organically for the 250 or so BioC packages I built, and I understand the BioC folks looking after the binaries in their containers do the same. They asked about you the other day (as in: "any idea if there is a RH repo") and I sent them your way. Did they come knocking yet? (And yes I know RH != FC but "close".)

@Enchufa2
Copy link
Member Author

Yes, we're in contact. :)

@vjcitn @almahmoud Parsing all the DESCRIPTION files is easy and fast on your side. This could be a nice feature in addition to e.g. a new BiocManager::package_db(). Do you think you could provide this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants