[Rd] CRAN package with dependencies on Bioconductor
Duncan Murdoch
murdoch.duncan at gmail.com
Sat Jun 11 15:15:58 CEST 2011
On 11-06-11 1:09 AM, Kornelius Rohmeyer wrote:
> 2011/6/11 Duncan Murdoch<murdoch.duncan at gmail.com>:
>> On 11-06-10 7:04 PM, Kornelius Rohmeyer wrote:
>>> Dear all,
>>>
>>> for a CRAN-package that depends on another Bioconductor-package I find
>>> two things annoying and would like to know whether there are some
>>> workarounds:
>>>
>>> 1) Is there some inevitable problem that install.packages does not
>>> install uninstalled packages (on which the specified package depends)
>>> also from Bioconductor (in the correct version)?
>>>
>>> 2) In my understanding (please correct me if I'm wrong!) CRAN uses
>>> bioconductor packages in another version than biocLite would install.
>>> For example:
>>>
>>> Our package gMCP depends on the package graph that has recently
>>> switched to the bioconductor repositories. But even the following
>>> commands will fail (i.e. install incompatible versions) for R 2.12
>>> under Windows (and most likely MacOS):
>>>
>>> source("http://www.bioconductor.org/biocLite.R")
>>> biocLite("graph")
>>> install.packages("gMCP")
>>>
>>> This results in errors like the following:
>>>
>>>> BonferroniHolmGraph(2)
>>>
>>> Error in validObject(.Object) :
>>> invalid class "graphMCP" object: superclass "graphBase" not defined
>>> in the environment of the object's class
>>>
>>> The superclass graphBase is introduced in graph 1.30. In my
>>> understanding the problem is that our package gMCP is build on CRAN
>>> for R 2.12 with the package graph in version 1.30. Unfortunately
>>> biocLite installs graph_1.28.0.zip for R 2.12.
>>>
>>> Are there ways to make dependencies on Bioconductor less complicated?
>>
>> Users of your package are likely to have issues; make sure you document that
>> they need to include the Bioconductor repository as well as CRAN.
>>
>> You can specify a version in a dependency (or a version range). I don't
>> know if BioC will make old versions available in binary formats, but they
>> will probably make source versions available.
>>
>> Duncan Murdoch
>>
>
> Dear Duncan,
>
> the main problem is not addressed by specifying a certain version (or
> at least I do not see how), since it's not the case that the package
> requires certain versions.
I don't understand. It sounds as though you're saying these two
contradictory things:
- your package works with any version of graph
- CRAN builds a version of graph that is incompatible with your package.
The problem is that the default binary
> packages of the CRAN package and the Bioconductor package it depends
> on are incompatible for R 2.12, since CRAN uses a different version of
> the Bioconductor package for building. (For the source packages of
> course no problem exists.) Btw. is there a way to find out which
> versions of the dependent packages were used for building a certain
> binary package? (I guess in the moment, that CRAN uses always the
> newest available source packages.)
> These kind of incompatibilities are extremely hard to track for the
> package developer. So if there is not a way to install the correct
> corresponding compatible binary packages from CRAN and Bioconductor,
> may I suggest that CRAN uses the same versions of dependent
> Bioconductor packages for the build of binary packages as Bioconductor
> is providing in binary form by default for the respective R versions?
I am not involved with setting CRAN policy, but their current policy
(build the most recent version of a package that declares itself
compatible with the relevant version of R) seems reasonable.
If for whatever reason this doesn't work for your package with R 2.12.x,
I see two possible solutions:
- Declare that your package now depends on R 2.13.0 or better.
- Move your package to Bioconductor, if its policy for binary builds
better matches your needs.
Duncan Murdoch
> Or am totally on the wrong track?
>
> Thank you very much and best regards, Kornelius.
More information about the R-devel
mailing list