Skip to content

CRAN package with dependencies on Bioconductor

18 messages · Kornelius Rohmeyer, Martin Morgan, Brian Ripley +2 more

#
I'm sorry for sending a wrongly formated mail before. This is the missing text:

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:
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?

Thanks and best regards, Kornelius
#
On 06/10/2011 04:04 PM, Kornelius Rohmeyer wrote:
I don't understand what you are asking; a previously installed but then 
uninstalled package will not influence the ability of R to reinstall it.
Usually, if you

   setRepositories()

and choose BioCsoft, then you will have chosen the correct (i.e., 'same 
as biocLite') bioc repository for your version of R (this can be 
scripted by inspecting

   read.table(file.path(R.home("etc"), "repositories"),
              header=TRUE, sep="\t")

and using appropriate row indexes as the 'ind' argument to setRepositories).
biocLite is returning the correct package -- graph 1.28.0. graph 1.30 
did not come in to existence until the most recent release, 2011-04-13, 
approximately when R-2.13 became the current release version.

CRAN is building packages with the current release, R-2.13, for which 
biocLite and install.packages both (correctly) return graph 1.30.
Use the current version of R.

FWIW, part of the motivation for hosting graph only on Bioconductor 
(previously it was dual-hosted) is to simplify version problems -- prior 
to the change, the CRAN version was several releases out of date!

Martin

  
    
#
On 11-06-10 7:04 PM, Kornelius Rohmeyer wrote:
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 Martin,

thanks for your response.
I doubt this, i.e. CRAN is also still building packages for R 2.12 -
and is using graph 1.30 for this as far as I understand it (instead of
1.28).
So you agree that it is impossible to give a reasonable instruction to
install such binary packages for older versions of R like the four
month old R 2.12? (Reasonable means without manual installation of
packages in the correct versions - where the correct versions have to
be found out by the maintainer.)

Best regards, Kornelius.
#
On 06/10/2011 05:46 PM, Kornelius Rohmeyer wrote:
I'm not intimately familiar with CRAN's build system, so perhaps I 
mis-spoke; Bioconductor packages are versioned in synchrony with R 
releases. If your package requires graph >= 1.30, specify that in the 
DESCRIPTION. If your users want features introduced when your package 
requires graph >= 1.30, direct them to use R >= 2.13.

Martin

  
    
#
2011/6/11 Martin Morgan <mtmorgan at fhcrc.org>:
I understand this. But my package does not require graph >= 1.30.
(And if I install the source packages everything is always fine.)
The problem is again that R 2.12 installs graph 1.28
but the CRAN packages for R 2.12 are build for graph 1.30.
So the default binary packages are incompatible for R 2.12.

Best regards, Kornelius.
#
2011/6/11 Duncan Murdoch <murdoch.duncan at gmail.com>:
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. 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?

Or am totally on the wrong track?

Thank you very much and best regards, Kornelius.
#
Note that until May 8 graph was a CRAN packge and the current version 
was 1.30.0.  So of course CRAN binary packages built between April 26 
and May 8 were built against the current CRAN version of graph, for 
any version of R.
On Fri, 10 Jun 2011, Martin Morgan wrote:

            

  
    
#
2011/6/11 Prof Brian Ripley <ripley at stats.ox.ac.uk>:
Thanks for the notice! But if I am not wrong, a version of my package
that was published on May 26 and build therefore after the time period
specified by you still suffers from these version incompatibilities.
(Nevertheless it is of course possible that the problem is only caused
by the migration to Bioconductor and in this case less problematic and
only unfortunate in this one case). Perhaps the version downgrade of
the graph package caused problems?

So you say that the versions of Bioconductor packages on CRAN for
binary builds are already normally the same as you would get by
installing them as binaries from Bioconductor? (And btw. is there a
way to find out which versions of the dependent packages were used for
building a certain binary package?)

Thanks and best regards, Kornelius.
#
On Sat, 11 Jun 2011, Kornelius Rohmeyer wrote:

            
No, I did not say that.

[...]
#
2011/6/11 Prof Brian Ripley <ripley at stats.ox.ac.uk>:
That means that for a binary package that depends on Bioconductor
packages you sometimes need a bit of luck to select the correct
versions of binary Bioconductor packages? Or is there a way to tell
which (and an easy way to install them)?

Thanks and best regards, Kornelius.
#
Actually I do not understand what is so hard to understand with CRAN policy.

This is:
Any source package on CRAN is build in binary form with 
R-release/patched and R-oldrelease. This does not happen if you tell 
your package it requires a particular R version - such as the 
declaration R (>= 2.13.0) in the Depends field will cause the package 
not to be build as a binary. Anotehr exception would be if the package 
does not longer pass the checks and gives an ERROR, in that case we also 
keep the old version in the binary repository.

On CRAN we assume that R-2.12.x users may want to get a bugfix release 
of a package without the requirement to upgrade R, hence we distribute 
new or updates packages for the oldrelease version (which is current 
R-2.12.x). And if BioC has a different policy, that is fine with us.


Uwe Ligges
On 11.06.2011 10:20, Kornelius Rohmeyer wrote:
#
On 11-06-11 1:09 AM, Kornelius Rohmeyer wrote:
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
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
3 days later
#
2011/6/11 Duncan Murdoch <murdoch.duncan at gmail.com>:
[...]
No, the first statement is correct but not the second:

- Installed from source my package works with any version of graph and also:
  - A binary of my package built with graph 1.28 will work with graph 1.28.
  - A binary of my package built with graph 1.30 will work with graph 1.30.

- But a binary of my package built with graph 1.30 will not work with
graph 1.28.
  (If it is surprising for anyone, that this can happen, we can go
into detail here.
   I doubt that this is the place to fix things, but maybe I am wrong?)

I personally found it unfortunate, that due to different policies of
CRAN and Bioconductor for R 2.12 there are (up to my knowledge) no
more any binary packages of gMCP and graph available for R 2.12 that
are compatible. (In this case the problem can be solved manually by
installing the graph package binary from Bioconductor for R 2.13 that
works also for R 2.12.)
Personally I find it more reasonable to apply the Bioconductor policy
to Bioconductor packages that are installed on CRAN for building
packages that depend on those. But you and Uwe seem to disagree. Since
this is (IMHO) a matter of taste and where one assigns priorities and
these seem to differ, there is not much to discuss?

Thanks for the clear advise and also thanks to all CRAN maintainers
for the great services nevertheless!

Best regards, Kornelius.
#
On 15.06.2011 01:21, Kornelius Rohmeyer wrote:
Sure, this can happen, particularly with compiled code or S4 stuff in 
the packages.
Your package has been recompiled against graph 1.28.

Triggering an install.packages(yourpackage) will install a version that 
works, even for R-2.12.x
No no no! graph was a CRAN package up to few weeks ago. AAnd as a CRAN 
package the CRAN policy applied. Now that it was removed, it is fine and 
handled as a BioC package anayway. It was just the case that graph 1.30 
was a CRAN package once and hence your package was built against that 
one. Now that you told us we rebuilt your package after graph 1.30 was 
removed from CRAN and it should be fine. But it looks like you have not 
even tested!

Uwe
#
Am 15. Juni 2011 09:19 schrieb Uwe Ligges <ligges at statistik.tu-dortmund.de>:
The package was already built 18 days after graph was removed from CRAN?
I'll try to ignore the "But it looks like you have not even tested!"
since I tested it 4 days ago, when it did not work. And since I had no
notice up to today that it was rebuilt with a new (i.e. old) version
of the graph package, I did not expect that it had changed already
(also my computer is not a Windows machine, which makes testing more
complicated).

Nevertheless a big, big thank you and I'm sorry that such a small
problem caused such a lengthy conservation.

Thanks and best regards, Kornelius.
#
On 11-06-14 7:21 PM, Kornelius Rohmeyer wrote:
Thanks, now I understand the issue.  It sounds as though it has been 
solved, but while it is in your mind, it might be worth adding some 
defensive code in case something similar happens in the future.  Can you 
check on version numbers at load time to give a helpful error message 
about the problem if it arises again?

Duncan Murdoch