[BioC] On extending class ExpressionSet

Renaud Gaujoux renaud at mancala.cbio.uct.ac.za
Wed Dec 15 18:42:43 CET 2010


Hi,

I am trying to extend class ExpressionSet in a very simple way to add an 
extra slot.
Now suppose I have a valid ExpressionSet object, I want to create an 
object of class 'A' as follows (this always worked with other S4 classes 
I defined):

library(Biobase)
setClass('A', representation(extraslot='list'), contains='ExpressionSet')
eset <- new('ExpressionSet')
new('A', eset)

# this throws the error:
Error in function (classes, fdef, mtable)  :
   unable to find an inherited method for function 
"annotatedDataFrameFrom", for signature "ExpressionSet"
#Note: this also does not work with a non-empty ExpressionSet object.

Is this normal? Is there a specific way to extend the class ExpressionSet?
The classes I found that extend ExpressionSet add an extra element in 
assayData, and from what I saw it requires defining an initialize method 
to pass all the standard parameters to the underlying ExpressionSet 
object (exprs, phenoData, featureData, etc...)

Thank you for any insight on the matter.
Renaud

sessionInfo:
R version 2.12.0 (2010-10-15)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
  [1] LC_CTYPE=en_ZA.utf8       LC_NUMERIC=C 
LC_TIME=en_ZA.utf8        LC_COLLATE=en_ZA.utf8     LC_MONETARY=C 
       LC_MESSAGES=en_ZA.utf8    LC_PAPER=en_ZA.utf8
  [8] LC_NAME=C                 LC_ADDRESS=C              LC_TELEPHONE=C 
            LC_MEASUREMENT=en_ZA.utf8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] Biobase_2.8.0


 

###
UNIVERSITY OF CAPE TOWN 

This e-mail is subject to the UCT ICT policies and e-mai...{{dropped:5}}



More information about the Bioconductor mailing list