[BioC] Can BioC still convert exprSet to ExpressionSet?
Martin Morgan
mtmorgan at fhcrc.org
Wed May 13 05:19:55 CEST 2009
David Rossell <david.rossell at irbbarcelona.org> writes:
> Thank you Martin, I tried it but it still doesn't work (see below).
> Anyway, I managed to get access to the raw data so I guess it'll just be
> easier to build the ExpressionSet from scratch. Thanks for your help!
> David
>> str(oncogene)
> list()
> - attr(*, "exprs")= num [1:22283, 1:24] 9.53 6.73 5.53 7.99 3.38 ...
> ..- attr(*, "dimnames")=List of 2
> .. ..$ : chr [1:22283] "1007_s_at" "1053_at" "117_at" "121_at" ...
> .. ..$ : chr [1:24] "P1" "P2" "P3" "P4" ...
> - attr(*, "se.exprs")= logi[0 , 0 ]
> - attr(*, "description")= list()
> ..- attr(*, "name")= chr ""
> ..- attr(*, "lab")= chr ""
> ..- attr(*, "contact")= chr ""
> ..- attr(*, "title")= chr ""
> ..- attr(*, "abstract")= chr ""
> ..- attr(*, "url")= chr ""
> ..- attr(*, "pubMedIds")= chr ""
> ..- attr(*, "samples")= list()
> ..- attr(*, "hybridizations")= list()
> ..- attr(*, "normControls")= list()
> ..- attr(*, "preprocessing")= list()
> ..- attr(*, "other")= list()
> ..- attr(*, "class")= atomic [1:1] MIAME
> .. ..- attr(*, "package")= chr "Biobase"
> - attr(*, "annotation")= chr ""
> - attr(*, "notes")= chr ""
> - attr(*, "reporterInfo")= symbol NULL
> - attr(*, "phenoData")= list()
> ..- attr(*, "pData")='data.frame': 24 obs. of 1 variable:
> .. ..$ recurrence: Factor w/ 2 levels "N","Y": 1 1 1 1 1 1 1 1 1 1 ...
> ..- attr(*, "varLabels")=List of 1
> .. ..$ recurence: chr "Recurence within 5 years"
> ..- attr(*, "varMetadata")='data.frame': 0 obs. of 0 variables
> ..- attr(*, "class")= atomic [1:1] phenoData
> .. ..- attr(*, "package")= chr "Biobase"
> - attr(*, "class")= atomic [1:1] exprSet
> ..- attr(*, "package")= chr "Biobase"
>> attr(oncogene, "description") = list()
>> as(oncogene, "ExpressionSet")
> Error in asMethod(object) :
> trying to get slot "description" from an object (class "exprSet") that is
> not an S4 object
OK after some investigation I see that coerce,exprSet-method was
updated during the last release cycle, and in the current R (2.9) /
Biobase (2.4) a simple
as(oncogene, "ExpressionSet")
should work.
Martin
>
>
> On Tue, May 12, 2009 at 5:40 PM, Martin Morgan <[[mtmorgan at fhcrc.org]]> wrote:
>
> 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
--
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