[R-pkg-devel] How to declare Bioconductor Dependencies in the Description File of my R Package

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Fri Mar 17 12:31:23 CET 2023


В Fri, 17 Mar 2023 11:02:18 +0000
"Ruff, Sergej" <Sergej.Ruff using tiho-hannover.de> пишет:

> I would like to ask, if I need to add something to the
> DESCRIPTION-file when declaring Bioconductor dependencies for CRAn
> Submission.

Strictly speaking, no. Once you list limma under Suggests, it's
possible and proper to install your package using
BiocManager::install('YOUR_PACKAGE', dependencies = TRUE) and have
limma installed too, as Martin Morgan said above in the thread.

> Some recommend adding biocViews:

This field is required on Bioconductor, not CRAN:
https://contributions.bioconductor.org/description.html?q=biocViews#description-biocviews

> some recommend adding Remotes: bioc::limma

Not a standard R/CRAN field, only used by the remotes package:
https://remotes.r-lib.org/articles/dependencies.html

> Others add Biocmanager to the suggests file

I suppose it could help a user who doesn't initially know to use
BiocManager in order to install your package, and could also be used to
install limma on behalf of your users (with their permission!), but
it's additional work, may be hard to get right (see the CRAN policy
about installing packages and touching user files), and is not required
at all.

> What should I add to my Description File to make sure that limma gets
> installed from Bioconductor when needed?

See Martin Morgan's e-mail above in the thread. In short, tell your
users to install your package using BiocManager::install(...,
dependencies = TRUE) if they want limma to work. They are still free to
install.packages() if they don't want limma or can set things up
themselves.

Move limma to Imports (better) or Depends (may be worse)
if you want limma to be always available, at the cost of always
requiring Bioconductor to be set up to have your package installed.
There are other ways besides BiocManager::install(), but they all
depend on the user having set up Bioconductor repos in their R session
somehow, be it BiocManager::repositories() or setRepositories().

-- 
Best regards,
Ivan



More information about the R-package-devel mailing list