Skip to content
Prev 2675 / 21312 Next

[Bioc-devel] eSet extension

On 07/18/2011 01:34 PM, Kasper Daniel Hansen wrote:
I'm a little rusty on ExpressionSet. I would have thought that providing 
a prototype would help, but apparently not. So I ended up with

setClass("RGChannelSet", contains = "eSet")

setValidity("RGChannelSet", function(object) {
     msg <- validMsg(NULL,
                     assayDataValidMembers(assayData(object),
                                           c("Red", "Green")))
     if (is.null(msg)) TRUE else msg
})

setMethod(initialize, "RGChannelSet",
           function(.Object, ...,
                    assayData=assayDataNew(Red=matrix(), Green=matrix()))
{
     callNextMethod(.Object, ..., assayData=assayData)
})

ExpressionSet has some unusual wrinkles. Also, it might make sense to 
extend NChannelSet instead of eSet.

Martin