[R-pkg-devel] How to declare Bioconductor Dependencies in the Description File of my R Package
I was wondering how CRAN will handle Limma when running the automatic check. I am worried that my package will be rejected if Limma won?t install from Bioconductor on a clean version of R. Leading to an Error and Note during the check. I am using Limma only for an example in my functions description, not inside my actual function. How would CRAN?s System handle that when checking my package for submission? with regards, Sergej
Von: Martin Morgan <mtmorgan.bioc at gmail.com>
Gesendet: Donnerstag, 16. M?rz 2023 20:12:51
An: Ivan Krylov; Ruff, Sergej
Cc: r-package-devel at r-project.org
Betreff: Re: [R-pkg-devel] How to declare Bioconductor Dependencies in the Description File of my R Package
I would not follow the instructions in RTIGER?s README for installing Bioconductor packages.
BiocManager::install(?RTIGER?) would install both CRAN and Bioconductor dependencies of RTIGER, and would be my preferred instruction in a README or INSTALL file. A complete instruction might be to install your package as if it were on Bioconductor ?
If (!requireNamepace(?BiocManager?, quietly = TRUE))
install.packages(?BiocManager?)
BiocManager::install(?<your package>?)
It does not make sense to me to have instructions in .onAttach / .onLoad or in each function for the user to install a ?Suggests:? package, when actually the package is required for use and belongs in Imports: or perhaps Depends:.
The instruction to use ?version = ?3.14?? of Bioconductor in the RTIGER document is not universally correct, since different Bioconductor versions are tied to specific R versions (see https://bioconductor.org/about/release-announcements/ ). On one version of R I am currently using, I get
> BiocManager::install(version = "3.14")
Error: Bioconductor version '3.14' requires R version '4.1'; use
`BiocManager::install(version = '3.17')` with R version 4.3; see
https://bioconductor.org/install
The instruction to install a vector of Bioconductor packages is also unnecessary for Bioconductor packages in the Imports: or Depends: field of <your package>, or if one were to pass the argument `dependencies = TRUE` to either BiocManager::install() or install.packages() (to get the Suggests: packages of <your package> to be installed, as well as Depends:, Imports: and LinkingTo:).
Briefly, installation requires R to know the correct repositories. The command
BiocManager::repositories()
Returns a vector of Bioconductor and CRAN repositories relevant to your version of R. If one is averse to using BiocManager::install(?RTIGER?), a reasonable alternative, though still requiring that the BiocManager package is installed, is
install.packages(?RTIGER?, repos = BiocManager::repositories())
Base R also provides a mechanism for specifying Bioconductor repositories, via `setRepositories()` called before install.packages(). However, this is not recommended because, as can be seen on the web page mentioned above, there are two versions of Bioconductor for each version of R ? one always gets the ?old? Bioconductor version, even when a newer version is available.
From: R-package-devel <r-package-devel-bounces at r-project.org> on behalf of Ivan Krylov <krylov.r00t at gmail.com>
Date: Thursday, March 16, 2023 at 2:15 PM
To: Ruff, Sergej <Sergej.Ruff at tiho-hannover.de>
Cc: r-package-devel at r-project.org <r-package-devel at r-project.org>
Subject: Re: [R-pkg-devel] How to declare Bioconductor Dependencies in the Description File of my R Package
On Thu, 16 Mar 2023 17:01:55 +0000
"Ruff, Sergej" <Sergej.Ruff at tiho-hannover.de> wrote:
> Last question: How does CRAN work with Bioconductor Dependencies?
> Will CRAN accept limma as a dependency or will my submission be
> rejected?
It's not explicitly spelled out in the CRAN policy
<https://cran.r-project.org/web/packages/policies.html>, but
Bioconductor and CRAN are the "mainstream repositories" for the
purposes of the following rule:
>> Packages on which a CRAN package depends should be available from a
>> mainstream repository
(Even non-mainstream repositories are allowed for optional dependencies
if you follow a few additional rules.)
Here's an example of a CRAN package with a strong dependency on a
Bioconductor package: <https://CRAN.R-project.org/package=RTIGER>. You
can see the extra instructions for installing the Bioconductor
dependencies in its README.
--
Best regards,
Ivan
______________________________________________
R-package-devel at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel