[BioC] Can BioC still convert exprSet to ExpressionSet?

Martin Morgan mtmorgan at fhcrc.org
Tue May 12 17:40:57 CEST 2009


Hi David --

David Rossell <david.rossell at irbbarcelona.org> writes:

> Dear all, I'm getting an error message when trying to convert an old exprSet
> object to the ExpressionSet class. "oncogene" is an exprSet object that I
> first load.
>
>> class(oncogene)
> [1] "exprSet"
> attr(,"package")
> [1] "Biobase"
>
>> slotNames(oncogene)
> [1] "exprs"             "se.exprs"          "description"
> [4] "annotation"        "notes"             "reporterInfo"
> [7] "phenoData"         ".__classVersion__"

slotNames consults the class definition, so is not really helfpul. I
think str(oncogene) will show the old-style list + attributes.

There's an archived instance in

fl <- system.file("UnitTests", "VersionedClass_data", "1.8",
                  "exprSet.Rda", package="Biobase")

but I think your version predates 1.8. Can you

  attr(oncogene, "description") = list()
  as(oncogene, "ExpressionSet")

? Likely some warnings...

Martin

>> newoncogene <- as(oncogene,"ExpressionSet")
> Error in asMethod(object) :
>   trying to get slot "description" from an object (class "exprSet") that is
> not an S4 object
>
> So the usual "as" conversion doesn't seem to work. Actually I'm not even
> allowed to manually access any of the slots, so I can't even create the
> ExpressionSet extracting each piece of information carefully.
>
>> oncogene at annotation
> Error: trying to get slot "annotation" from an object (class "exprSet") that
> is not an S4 object
>
>> head(oncogene at exprs)
> Error: trying to get slot "exprs" from an object (class "exprSet") that is
> not an S4 object
> Error in head(oncogene at exprs) :
>   error in evaluating the argument 'x' in selecting a method for function
> 'head'
>
>> head(exprs(oncogene))
> Error in function (classes, fdef, mtable)  :
>   unable to find an inherited method for function "exprs", for signature
> "exprSet"
> Error in head(exprs(oncogene)) :
>   error in evaluating the argument 'x' in selecting a method for function
> 'head'
>
> I haven't found this problem posted anywhere. I know that exprSet has been
> deprecated but the conversion method should still work right?
> My session info is below, thanks in advance for any hints,
>
> David
>
>> sessionInfo()
> R version 2.8.1 (2008-12-22)
> i386-apple-darwin8.11.1
>
> locale:
> C
>
> attached base packages:
> [1] splines   tools     stats     graphics  grDevices utils     datasets
> [8] methods   base
>
> other attached packages:
>  [1] convert_1.18.0       marray_1.20.0        MDA_1.0.1
>  [4] Heatplus_1.12.0      mouse4302.db_2.2.5   hgu133a.db_2.2.5
>  [7] hgu133plus2.db_2.2.5 RSQLite_0.7-1        DBI_0.2-4
> [10] biomaRt_1.16.0       hopach_2.3.0         gaga_1.1.1
> [13] coda_0.13-4          lattice_0.17-17      ada_2.0-1
> [16] sma_0.5.15           randomForest_4.5-28  ClassDiscovery_2.5.0
> [19] PreProcess_2.5.0     oompaBase_2.5.0      gplots_2.6.0
> [22] gdata_2.4.2          gtools_2.5.0         limma_2.16.5
> [25] MLInterfaces_1.22.0  cluster_1.11.11      annotate_1.20.1
> [28] xtable_1.5-5         AnnotationDbi_1.4.2  rda_1.0
> [31] rpart_3.1-42         genefilter_1.22.0    survival_2.34-1
> [34] MASS_7.2-45          Biobase_2.2.2
>
> loaded via a namespace (and not attached):
> [1] RCurl_0.93-0 XML_1.99-0   grid_2.8.1
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioconductor mailing list