[Bioc-devel] Problem with setClassUnion and DelayedArray

Elizabeth Purdom epurdom @ending from @t@t@berkeley@edu
Wed Oct 10 20:51:12 CEST 2018


Hello,

I am using `setClassUnion` in my package `clusterExperiment` in the following code to allow for either matrix or DelayedArray:

setClassUnion("matrixOrHDF5",members=c("matrix", "DelayedArray"))

This causes the following warning in checking my package:

Warning: subclass "DelayedArray1" of class "DelayedArray" is not local and cannot be updated for new inheritance information; consider setClassUnion()

I’ve gotten this warning in other settings, and I believe it is due to the fact that setClassUnion works on the subclasses of the members, so if you give the argument `members=c(“X”,”Y”)` and you haven’t imported into your package all of the subclasses of “X” and “Y” it is warning you those non-imported classes haven’t been dealt with (though if so, I’d say the warning is awfully cryptic, especially since it says to use `setClassUnion` as a solution). In my other cases, I have just gone ahead and imported all of the subclasses from the package that defines the member classes and have gotten rid of the message (in the past it hasn’t been so many). But “DelayedArray1” is not an exported class of the DelayedArray package so that is not an option here. 

I have been just ignoring this warning, since I understand (I think) the warning, I can’t do anything about it, and am not concerned about it since this new class is only used internally by my function for the slot definition. And I don’t think the user sees this generally. But given that we’re coming up on a release I thought I would ask if there’s anything I can do to get rid of this warning! Or can I go with my first instinct and safely ignore it?

Thanks,
Elizabeth Purdom



More information about the Bioc-devel mailing list