[Bioc-devel] BioC 3.0 CHECK ERROR

Andrzej Oleś andrzej.oles at gmail.com
Wed Dec 3 18:49:01 CET 2014


Dear Joachim,

thank you for reporting the issue with using EBImage in your package!

Martin, Dan: many thanks for digging into the problem and for suggesting
solutions to overcome it.

I had a look into this as well and could reproduce the issue. I can also
confirm that it occurs under R 3.1.2 release but the subsequent patches in
R-patched and R-devel fix the problem.

To circumvent the bug with the broken Math2 group generic I have included
an explicit definition of it for the Image class. I've pushed the updated
EBImage 4.8.1 into the release repository; the update should be available
once the build servers crunch the package.

The updated package should restore the previous behavior, in particular, it
should be possible to call 'round' on Image objects without the need of
extracting imageData.

Also, please note that whenever accessing the pixel array from the Image
class it's good practice to use the 'imageData' accessor functions rather
than referring to Image at .Data directly. Accessing object slots is
potentially dangerous because you are relying on the actual class
implementation - in case it changes your code will fail. The accessory
functions, on the other hand, introduce and interface which is
implementation-independent.

Best,
Andrzej

On Fri, Nov 28, 2014 at 10:28 AM, Joachim Schumann <joachim.schumann at ufz.de>
wrote:

> Thanks for all the answers. I corrected the code. The problem was that
> round() does not work on an Image object of EBImage as it did before.
> In the package I could call round(Image,digits=3) but now it only works
> using round(Image at .Data,digits=3).
> I will fix this.
>
> Joachim
>
> Am 27/11/14 08:05 schrieb Martin Morgan  <mtmorgan at fredhutch.org>:
> >
> > On 11/26/2014 07:36 PM, Dan Tenenbaum wrote:
> > >
> > >
> > >----- Original Message -----
> > >>From: "Martin Morgan" <mtmorgan at fredhutch.org>
> > >>To: "Dan Tenenbaum" <dtenenba at fredhutch.org>
> > >>Cc: "Joachim Schumann" <joachim.schumann at ufz.de>,
> bioc-devel at r-project.org
> > >>Sent: Wednesday, November 26, 2014 5:33:22 PM
> > >>Subject: Re: [Bioc-devel] BioC 3.0 CHECK ERROR
> > >>
> > >>On 11/26/2014 10:03 AM, Dan Tenenbaum wrote:
> > >>>
> > >>>
> > >>>----- Original Message -----
> > >>>>From: "Martin Morgan" <mtmorgan at fredhutch.org>
> > >>>>To: "Joachim Schumann" <joachim.schumann at ufz.de>,
> > >>>>bioc-devel at r-project.org
> > >>>>Sent: Wednesday, November 26, 2014 9:00:07 AM
> > >>>>Subject: Re: [Bioc-devel] BioC 3.0 CHECK ERROR
> > >>>>
> > >>>>On 11/26/2014 01:39 AM, Joachim Schumann wrote:
> > >>>>>Hi everyone,
> > >>>>>this morning I got an email from bioconductor.
> > >>>>>The message:
> > >>>>>
> > >>>>>According to the "Build/check report" for BioC 3.0,
> > >>>>>the flowCHIC package has the following problem(s):
> > >>>>>ERROR for 'R CMD check' on zin1.
> > >>>>>
> > >>>>>The error I get is the following:
> > >>>>>
> > >>>>>Error in callGeneric() :
> > >>>>> 'callGeneric' with a primitive needs explicit arguments (no
> > >>>>> formal args defined)
> > >>>>>Calls: calculate_overlaps_xor ... calculate_overlaps_xor ->
> > >>>>>.local
> > >>>>>-> bXOR ->
> > >>>>>round -> round -> callGeneric
> > >>>>>
> > >>>>>Does anyone know what the problem is? It seems that the round
> > >>>>>function causes
> > >>>>>the error.
> > >>>>
> > >>>>This is some kind of interaction with Matrix
> > >>>>
> > >>>> > library(EBImage)
> > >>>> > img = readImage(system.file(package="EBImage", "images",
> > >>>> > "nuclei.tif"))
> > >>>> > xx = round(img)
> > >>>> > library(Matrix)
> > >>>> > yy = round(img)
> > >>>>Error in callGeneric() :
> > >>>> 'callGeneric' with a primitive needs explicit arguments (no
> > >>>> formal
> > >>>> args defined)
> > >>>>
> > >>>>which defines a Math2 group generic. How long has this been
> > >>>>appearing? It
> > >>>>doesn't seem like the build system R, EBImage or Matrix has
> > >>>>changed
> > >>>>since
> > >>>>release, and the package is available via biocLite implying that
> > >>>>it
> > >>>>once built...
> > >>>
> > >>>I think the build system R has changed since release, since it's
> > >>>running 3.1.2 which was released on 10/31/2014, but release was
> > >>>10/14/2014.
> > >>>
> > >>>Indeed, if I look at the flowCHIC_1.0.0.tgz DESCRIPTION file, I see
> > >>>in the "Built" line that it was built with R 3.1.1.
> > >>>
> > >>>So this suggests a problem with R-3.1.2? Is this a bug we should
> > >>>report?
> > >>
> > >>The path to Matrix is
> > >>
> > >>flowCHIC
> > >> Imports: vegan
> > >> Imports: mgcv
> > >> Imports: Matrix
> > >>
> > >>vegan was updated on
> > >>
> > >> > packageDescription("vegan")[c('Version', 'Date/Publication')]
> > >>$Version
> > >>[1] "2.2-0"
> > >>
> > >>$`Date/Publication`
> > >>[1] "2014-11-17 11:35:34"
> > >>
> > >>and changed (based on comparison with the last archived version,
> > >>2.0-10 from
> > >>http://cran.fhcrc.org/src/contrib/Archive/vegan) to move Matrix from
> > >>Suggests:
> > >>to Imports:.
> > >>
> > >>I think it's a long-standing issue in R; I can reproduce it using the
> > >>EBImage /
> > >>Matrix example in R 2.15, for instance (although oddly I had to go
> > >>through some
> > >>mild histrionics to get EBImage to compile). Specifically, it seems
> > >>like a patch
> > >>that Michael just applied in R-devel (!), plus
> > >>
> > >>Index: MethodsListClass.R
> > >>===================================================================
> > >>--- MethodsListClass.R      (revision 67060)
> > >>+++ MethodsListClass.R      (working copy)
> > >>@@ -353,7 +353,7 @@
> > >> function(x, digits) {
> > >> value <- x
> > >> x <- x at .Data
> > >>- value at Data <- callGeneric()
> > >>+ value at .Data <- callGeneric()
> > >> value
> > >> })
> > >> ## some methods for nonStructure, ensuring that the class and
> > >> slots
> > >>
> > >>
> > >
> > >Are you going to commit this? If this (and Michael's change) fixes the
> problem, then I will update the build machines. BTW flowCHIC has the same
> issue in release, so I guess some backporting is in order.
> > >
> >
> > Both R-devel and R-3-1-branch will have a fix.
> >
> > For flowCHIC, I'd leave devel as-is, it will eventually heal itself.
> >
> > For release, I think Joachim should explore an alternative so that users
> of the current R release can use flowCHIC without waiting for the next
> release in the R-3-1 series. I'm not really familiar with the EBImage
> package, but I think what you want to do is the equivalent of
> >
> >  x = initialize(x, round(imageData(x) * (2^8 - 1), digits = 3))
> >
> > i.e., calculating round() on the raw array, then updating the Image
> object 'x'.
> >
> > Martin
> >
> > >Dan
> > >
> > >
> > >>Martin
> > >>
> > >>>
> > >>>Dan
> > >>>
> > >>>
> > >>>>
> > >>>>Martin
> > >>>>
> > >>>>>
> > >>>>>Best,
> > >>>>>Joachim
> > >>>>>
> > >>>>
> > >>>>
> > >>>>--
> > >>>>Computational Biology / Fred Hutchinson Cancer Research Center
> > >>>>1100 Fairview Ave. N.
> > >>>>PO Box 19024 Seattle, WA 98109
> > >>>>
> > >>>>Location: Arnold Building M1 B861
> > >>>>Phone: (206) 667-2793
> > >>>>
> > >>>>_______________________________________________
> > >>>>Bioc-devel at r-project.org mailing list
> > >>>>https://stat.ethz.ch/mailman/listinfo/bioc-devel
> > >>>>
> > >>
> > >>
> > >>--
> > >>Computational Biology / Fred Hutchinson Cancer Research Center
> > >>1100 Fairview Ave. N.
> > >>PO Box 19024 Seattle, WA 98109
> > >>
> > >>Location: Arnold Building M1 B861
> > >>Phone: (206) 667-2793
> > >>
> >
> >
> > --
> > Computational Biology / Fred Hutchinson Cancer Research Center
> > 1100 Fairview Ave. N.
> > PO Box 19024 Seattle, WA 98109
> >
> > Location: Arnold Building M1 B861
> > Phone: (206) 667-2793
> >
> --
>
> Joachim Schumann
> Department of Environmental Microbiology
> AG Flow Cytometry
> Helmholtz Centre for Environmental Research - UFZ
> Permoserstraße 15, 04318 Leipzig
>
> E-Mail: joachim.schumann at ufz.de
> http://www.ufz.de
>
>         [[alternative HTML version deleted]]
>
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>
>

	[[alternative HTML version deleted]]



More information about the Bioc-devel mailing list