Skip to content
Prev 574 / 21312 Next

[Bioc-devel] ReporterInfo and ExpressionSet

I haven't heard from seth on this, so...

The feeling was that this would be useful in some specific
circumstances, but not always, and hence should be delegated to a
subclass, i.e., a class created by individual developers or included
in Biobase at some point when it became clear how this class would
behave. 

If it were included in ExpressionSet but not used in most
circumstances, then there would be a bunch of 'zombie' methods that
expected something useful in reporterInfo, but found nothing. This
would confuse users ('why does this method return an error about an
empty data.frame? I don't even know what a reporterInfo is') and
burden developers ('I'd better return an error about an empty
data.frame, in case the user thought they'd put something useful
here').

Here's the essential subclass:

setClass("ReporterSet", contains="ExpressionSet",
         representation=representation(reporterData="data.frame"))

setMethod("initialize", signature(.Object="ReporterSet"),
          function(.Object, reporterData, ...) {
              .Object <- callNextMethod(.Object, ...)
              .Object at reporterData <- reporterData
              .Object
          })
          
setMethod("show", signature(object="ReporterSet"),
          function(object) {
              callNextMethod()
              cat("\nReporter Data\n  dim:", dim(object at reporterData), "\n")
          })

ReporterSet instances would behave as ExpressionSets. Methods for
ReporterSet would be sure to find something useful in the reporterData
slot.

Martin


Sean Davis <sdavis2 at mail.nih.gov> writes: