[Bioc-devel] class union with AffyBatch
Hi Audrey -- audrey <audrey at ebi.ac.uk> writes:
Hi all,
In my package, I am trying to set a class union the following way:
setClassUnion("OneColour", c("ExpressionSet", "AffyBatch"))
In the NAMESPACE if I write the following:
importClassesFrom("Biobase", "ExpressionSet")
importClassesFrom("Biobase", "AffyBatch")
definitely the last line is not correct.
When I build the package I have this error message
Error: package 'affy' does not have a name space
Execution halted
If I remove the importClassesFrom("Biobase", "AffyBatch") from my
NAMESPACE, I have this warning:
Warning in .findOrCopyClass(class1, classDef, where, "superClass") :
Class "AffyBatch" is defined (with package slot "affy") but no
metadata object found to revise superClass information---not exported?
Making a copy in package "arrayQualityMetrics"
In the dependencies in the DESCRIPTION, I do depend on the package
"affy". This is using R2.8 and affy_1.19.0.
Any idea on how I could solve that? Is it possible to import a class
from a package that does not have a namespace?
I think there's something else going on. If I create a package with
DESCRIPTION
-----------
Depends: affy
Imports: Biobase, methods
NAMESPACE
---------
import(methods)
importClassesFrom(Biobase, "ExpressionSet")
exportClasses("OneColour")
R/tmp.R
-------
setClassUnion("OneColour", c("ExpressionSet", "AffyBatch"))
I can build and check without error with
R --version
R version 2.8.0 beta (2008-10-09 r46680)
In arrayQualityMetrics, if I add a file like tmp.R, move methods to
Imports: (thinking that the end user doesn't need access to the
functionality of the methods package to use my package), add
imports(methods) and exportClasses("OneColour") then again I can build
and check without errors / warnings.
My only real suggestion is to update R.
Sorry to be less than helpful
Martin
Thanks Audrey -- Audrey Kauffmann EMBL - EBI Cambridge UK http://www.ebi.ac.uk/~audrey
_______________________________________________ Bioc-devel at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M2 B169 Phone: (206) 667-2793