just for those who were interested, here is what I bolted together a LONG
time ago

warning: this will probably burn your retinas with its  badness.  also, no
refclasses for colData that pertains across the child SummarizedExperiments
(doh)


require(GenomicRanges) ## ensure that SummarizedExperiment has been declared
setClassUnion("SummarizedExperimentOrNULL",c("SummarizedExperiment","NULL"))

## slots: exprData, methData, geneData, exonData, lincData, mirData, cnvData
setClass("MergedDataSet", contains=c("eSet"), # {{{
         representation=representation(
           exprData="SummarizedExperimentOrNULL",   # exprs, pvals?
           methData="SummarizedExperimentOrNULL",   # betas, totals
           geneData="SummarizedExperimentOrNULL",   # counts, RPKM, pvals?
           exonData="SummarizedExperimentOrNULL",   # counts, RPKM
           lincData="SummarizedExperimentOrNULL",   # counts, RPKM
           mirData="SummarizedExperimentOrNULL",    # counts, RPKM
           cnvData="SummarizedExperimentOrNULL"     # RLE CN, pvals?
        )) # }}}

setValidity("MergedDataSet", function(object) { # {{{ check sample names
  valid = TRUE
  genome = NULL
  samples = NULL
  for( s in c('exprData', 'methData', 'geneData',
              'exonData', 'lincData', 'mirData', 'cnvData') ) {
    if( !empty(slot(object, s)) ) {

      # do all of the genomes match?
      if(is(slot(object, s), 'SummarizedExperiment')) {
        if(is.null(genome)) genome = unique(genome(slot(object, s)))
        valid = valid && (genome == unique(genome(slot(object, s))))
      }

      # do all of the samples match?
      if(is(slot(object, s), 'ExpressionSet')) {
        samples.s = sampleNames(slot(object, s))
      } else if(is(slot(object, s), 'SummarizedExperiment')) {
        samples.s = colnames(slot(object, s))
      }

      if(is.null(samples)) samples = samples.s
      valid = valid && (samples == samples.s)

    }
  }
  return( valid )
}) # }}}

setMethod("show",signature(object="MergedDataSet"), function(object) { #
{{{
callNextMethod()
  available = c()
  for( s in c('exprData', 'methData', 'geneData',
              'exonData', 'lincData', 'mirData', 'cnvData') ) {
    if(!empty(slot(object, s))) available = append(available, s)
  }
  if(empty(available)) cat('No experimental data has been added yet.\n')
  else cat('Available data types:\n', paste(available, collapse=', '), '\n')
  message("FIXME: add methods to automatically add columns of NAs to new
data")
}) # }}}


-- 
*A model is a lie that helps you see the truth.*
*
*
Howard Skipper<http://cancerres.aacrjournals.org/content/31/9/1173.full.pdf>

	[[alternative HTML version deleted]]

