[Bioc-devel] unexpected interaction of "exprSet" and "DBI" package
mtmorgan at fhcrc.org
Sun Apr 15 03:03:08 CEST 2007
I wonder if it's a bug in methods?
> setClass("A", contains="list")
> as(list(), "A")
An object of class "A"
Error in .mergeMethodsTable(generic, mtable, get(tname, envir = env), :
Invalid object in meta table of methods for "coerce", label "list#A", had class "function"
The method table entry for the auto-generated 'as' is a simple function
> get(".MTable", environment(coerce))[["list#A"]]
function (from, to)
obj <- new("A")
as(obj, "list") <- from
whereas all the other entries are
> class(get(".MTable", environment(coerce))[["ANY#vector"]])
If so, the culprit is methods:::.asFromReplace, called from
R version 2.6.0 Under development (unstable) (2007-04-06 r41065)
attached base packages:
 "stats" "graphics" "grDevices" "utils" "datasets" "methods"
Seth Falcon <sfalcon at fhcrc.org> writes:
> Wolfgang Huber <huber at ebi.ac.uk> writes:
>> has anybody seen the following phenomenon before or have an idea whether
>> it is to be considered a bug in either methods, Biobase or DBI?
> Not until now.
>> new("exprSet", description = new("MIAME"))
>> Error in .mergeMethodsTable(generic, mtable, get(tname, envir = env), :
>> Invalid object in meta table of methods for "coerce", label
>> "list#Versions", had class "function"
>> Thanks to Jelle Goeman, who pointed out a version of this problem. My
>> attempts to more closely locate the origin have so far not been
>> successul. The error does not occur when 'description = new("MIAME")' is
> Very odd. The NAMESPACE file in DBI was exporting a coerce method
> when it should not have (there is no call to setAs). Removing the
> coerce export from DBI seems to have made the problem go away. I will
> send an update to CRAN.
> Still, this seems buggy to me: I would expect at least a warning about
> exporting methods that you don't define in any way. And not ending up
> with a corrupt methods table would be nice.
> Thanks for the report.
> + seth
> Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
> Bioc-devel at stat.math.ethz.ch mailing list
Bioconductor / Computational Biology
More information about the Bioc-devel