Hi everyone,
with the new bioC release I encounter a strange problem in my prada package:
I'm using some of the generics from Biobase (e.g. exprs, pData,
phenoData, description) to build methods for my own objects of class
cytoFrame (which describe data from FACS measurements).
e.g.
setMethod("description", signature="cytoFrame",
definition=function(object) object at description, valueClass="character")
This used to work fine with all recent bioC releases, but now I get the
following error when trying to install prada (and the same thing happens
on the build test machines in Seattle):
* Installing *source* package 'prada' ...
** R
** inst
** save image
Loading required package: Biobase
Loading required package: tools
Welcome to Bioconductor
Vignettes contain introductory material.
To view, simply type 'openVignette()' or start with 'help(Biobase)'.
For details on reading vignettes, see the openVignette help page.
Loading required package: RColorBrewer
Loading required package: grid
KernSmooth 2.22 installed
Copyright M. P. Wand 1997
** preparing package for lazy loading
KernSmooth 2.22 installed
Copyright M. P. Wand 1997
Error in methods:::mlistMetaName(mi, ns) :
the methods object name for 'description' must include the name
of the package that contains the generic function, but there is no
generic function of this name
Execution halted
ERROR: lazy loading failed for package 'prada'
Obviously R can't find the generics from Biobase although it is
attached. As a quick fix I tried to redefine those "missing" generics in
my own package. By doing so I get rid of the error message during
installation but I also break all functionality from Biobase. When
adding require(Biobase) in my R code before setting the new methods this
evaluates to TRUE but isGeneric(description) evaluates to FALSE during
installation.
When starting R interactively an after attaching Biobase I can set my
new methods without any problem simply by pasting in the code.
Does anybody have any idea what might be going wrong here?
My system setup is i686-pc-linux-gnu running with R 2.2.0 release and a
fresh installation of bioC 1.7 release (Biobase 1.8.0, prada 1.6.1)
Thank's in advance,
Florian
[Bioc-devel] generics from Biobase not found during package installation
7 messages · Florian Hahne, Robert Gentleman, Seth Falcon
Hi Florian, I suspect that the problem is that you will need to make use of .onLoad. One of the tricky bits with the "save image" technology is that any methods that you want to associate with generics from another package must have the setMethod code run each time the package is loaded (or attached). For any generics you define we save time by doing the association at package build time (because it cannot change). There is one example in Biobase (and I think some more substantial ones in iSPlot), Robert
Florian Hahne wrote:
Hi everyone,
with the new bioC release I encounter a strange problem in my prada package:
I'm using some of the generics from Biobase (e.g. exprs, pData,
phenoData, description) to build methods for my own objects of class
cytoFrame (which describe data from FACS measurements).
e.g.
setMethod("description", signature="cytoFrame",
definition=function(object) object at description, valueClass="character")
This used to work fine with all recent bioC releases, but now I get the
following error when trying to install prada (and the same thing happens
on the build test machines in Seattle):
* Installing *source* package 'prada' ...
** R
** inst
** save image
Loading required package: Biobase
Loading required package: tools
Welcome to Bioconductor
Vignettes contain introductory material.
To view, simply type 'openVignette()' or start with 'help(Biobase)'.
For details on reading vignettes, see the openVignette help page.
Loading required package: RColorBrewer
Loading required package: grid
KernSmooth 2.22 installed
Copyright M. P. Wand 1997
** preparing package for lazy loading
KernSmooth 2.22 installed
Copyright M. P. Wand 1997
Error in methods:::mlistMetaName(mi, ns) :
the methods object name for 'description' must include the name
of the package that contains the generic function, but there is no
generic function of this name
Execution halted
ERROR: lazy loading failed for package 'prada'
Obviously R can't find the generics from Biobase although it is
attached. As a quick fix I tried to redefine those "missing" generics in
my own package. By doing so I get rid of the error message during
installation but I also break all functionality from Biobase. When
adding require(Biobase) in my R code before setting the new methods this
evaluates to TRUE but isGeneric(description) evaluates to FALSE during
installation.
When starting R interactively an after attaching Biobase I can set my
new methods without any problem simply by pasting in the code.
Does anybody have any idea what might be going wrong here?
My system setup is i686-pc-linux-gnu running with R 2.2.0 release and a
fresh installation of bioC 1.7 release (Biobase 1.8.0, prada 1.6.1)
Thank's in advance,
Florian
_______________________________________________ Bioc-devel at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
Robert Gentleman, PhD Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M2-B876 PO Box 19024 Seattle, Washington 98109-1024 206-667-7700 rgentlem at fhcrc.org
Hi Robert, thanks a lot, this really fixed it. Allthough I think this leads to a lot of code duplication and might produce some serious headaches once the original generics definitions change (which of course shouldn't happen in the first place). Would it be possible to put a fixed version of prada into the bioC release branch? Thanks again for the help, Florian
Robert Gentleman wrote:
Hi Florian, I suspect that the problem is that you will need to make use of .onLoad. One of the tricky bits with the "save image" technology is that any methods that you want to associate with generics from another package must have the setMethod code run each time the package is loaded (or attached). For any generics you define we save time by doing the association at package build time (because it cannot change). There is one example in Biobase (and I think some more substantial ones in iSPlot), Robert Florian Hahne wrote:
Hi everyone,
with the new bioC release I encounter a strange problem in my prada
package:
I'm using some of the generics from Biobase (e.g. exprs, pData,
phenoData, description) to build methods for my own objects of class
cytoFrame (which describe data from FACS measurements).
e.g.
setMethod("description", signature="cytoFrame",
definition=function(object) object at description, valueClass="character")
This used to work fine with all recent bioC releases, but now I get
the following error when trying to install prada (and the same thing
happens on the build test machines in Seattle):
* Installing *source* package 'prada' ...
** R
** inst
** save image
Loading required package: Biobase
Loading required package: tools
Welcome to Bioconductor
Vignettes contain introductory material.
To view, simply type 'openVignette()' or start with
'help(Biobase)'.
For details on reading vignettes, see the openVignette help
page.
Loading required package: RColorBrewer
Loading required package: grid
KernSmooth 2.22 installed
Copyright M. P. Wand 1997
** preparing package for lazy loading
KernSmooth 2.22 installed
Copyright M. P. Wand 1997
Error in methods:::mlistMetaName(mi, ns) :
the methods object name for 'description' must include the
name of the package that contains the generic function, but there is
no generic function of this name
Execution halted
ERROR: lazy loading failed for package 'prada'
Obviously R can't find the generics from Biobase although it is
attached. As a quick fix I tried to redefine those "missing" generics
in my own package. By doing so I get rid of the error message during
installation but I also break all functionality from Biobase. When
adding require(Biobase) in my R code before setting the new methods
this evaluates to TRUE but isGeneric(description) evaluates to FALSE
during installation.
When starting R interactively an after attaching Biobase I can set my
new methods without any problem simply by pasting in the code.
Does anybody have any idea what might be going wrong here?
My system setup is i686-pc-linux-gnu running with R 2.2.0 release and
a fresh installation of bioC 1.7 release (Biobase 1.8.0, prada 1.6.1)
Thank's in advance,
Florian
_______________________________________________ Bioc-devel at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
3 days later
Hi Florian,
I still don't understand why I don't see the error everywhere. I can
only reproduce with our automted build account. Everywhere else I
try, prada builds and checks just fine (prior to your changes).
I just did the following experiment using the build account where I do
see the failure on accessing the "description" generic:
Added to NAMESPACE the following line:
import("Biobase")
After that change, I was able to build without error. I understand
what Robert is getting at with respect to SaveImage and what can and
cannot be done at build and/or install time vs load time. I don't
know exactly what the NAMESPACE stuff is doing and perhpas it is
changing the behavior of SaveImage?
Can you see if simply modifying NAMESPACE to import Biobase solves the
problem on your systems?
Best,
+ seth
Hi Seth, you are right, importing the whole Biobase namespace indeed also fixes the problem. At the moment I'm not sure if this is a better solution than the one proposed by Robert (it certainly is in terms of typing work). But for me it seems as everthing is working just fine using both alternatives. I don't have any idea why you can't reproduce this on every machine. Maybe you are not running the release R-2.2.0. I also don't get this error on R-2.2.0 devel. My current version info is: platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 2 minor 2.0 year 2005 month 10 day 06 svn rev 35749 language R So once this issue is settled for good would it be possible to pushed the patched package into the release branch? Florian
Seth Falcon wrote:
Hi Florian,
I still don't understand why I don't see the error everywhere. I can
only reproduce with our automted build account. Everywhere else I
try, prada builds and checks just fine (prior to your changes).
I just did the following experiment using the build account where I do
see the failure on accessing the "description" generic:
Added to NAMESPACE the following line:
import("Biobase")
After that change, I was able to build without error. I understand
what Robert is getting at with respect to SaveImage and what can and
cannot be done at build and/or install time vs load time. I don't
know exactly what the NAMESPACE stuff is doing and perhpas it is
changing the behavior of SaveImage?
Can you see if simply modifying NAMESPACE to import Biobase solves the
problem on your systems?
Best,
+ seth
_______________________________________________ Bioc-devel at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
Hi Seth, you were right, importing the whole Biobase namespace also fixed the problem. At the moment I'm not sure which of the two alternatives is the better one (imporing the namespace certainly is better in terms of typing work...) But for me it seems as if everything works fine both ways. But of course I don't want to break anything important by doing some silly stuff... I have no idea why you can't reproduce the error on all of your machines. Are you sure you are using the R 2.2.0 release version, because for R-2.2.0 devel I also don't get the error. I'm using this version at the time: platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 2 minor 2.0 year 2005 month 10 day 06 svn rev 35749 language R Once this issue is settled for good would it be possible to push the patched package to the release branch??
Seth Falcon wrote:
Hi Florian,
I still don't understand why I don't see the error everywhere. I can
only reproduce with our automted build account. Everywhere else I
try, prada builds and checks just fine (prior to your changes).
I just did the following experiment using the build account where I do
see the failure on accessing the "description" generic:
Added to NAMESPACE the following line:
import("Biobase")
After that change, I was able to build without error. I understand
what Robert is getting at with respect to SaveImage and what can and
cannot be done at build and/or install time vs load time. I don't
know exactly what the NAMESPACE stuff is doing and perhpas it is
changing the behavior of SaveImage?
Can you see if simply modifying NAMESPACE to import Biobase solves the
problem on your systems?
Best,
+ seth
_______________________________________________ Bioc-devel at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
On 24 Oct 2005, f.hahne at dkfz.de wrote:
Once this issue is settled for good would it be possible to push the patched package to the release branch??
Absolutely. I meant to say so in my earlier response and forgot. Can we give it another 1-2 days so we are sure we have the right solution? + seth