Skip to content
Prev 464 / 21307 Next

[Bioc-devel] Biobase / eSet changes for this release

Hi Rafael,

An approach is to create a new class derived from eSet with
initialization and validation methods to specify the additional
elements to be stored in assayData. For the additions you suggest, the
following might be a useful template:

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

setMethod("initialize", "SnpSetPlus",
          function(.Object,
                   phenoData = new("AnnotatedDataFrame"),
                   experimentData = new("MIAME"),
                   annotation = character(),
                   call = new("matrix"),
                   callProbability = new("matrix"),
                   copyNumber = new("matrix"),
                   copyNumberProbability = new("matrix"),
                   ... ) {
            callNextMethod(.Object,
                           phenoData = phenoData,
                           experimentData = experimentData,
                           annotation = annotation,
                           call=call,
                           callProbability=callProbability,
                           copyNumber=copyNumber,
                           copyNumberProbability=copyNumberProbability,
                           ...)
          })

setValidity("SnpSetPlus", function(object) {
  assayDataValidMembers(assayData(object),
                        c("call","callProbability",
                          "copyNumber", "copyNumberProbability"))
})

obj <- new("SnpSetPlus")

Martin


Rafael A Irizarry <ririzarr at jhsph.edu> writes: