Limma: can't coerce Rgmodel into exprSet
2
0
Entering edit mode
@michael-watson-iah-c-378
Last seen 10.2 years ago
Hi I have a kooperberg bg corrected dataset in limma and I want to coerce it to an exprSet object so that I can do some other stuff with it. I have two objects, RG which is a normal RG object, and RGmodel which is the kooperberg one: > as(RG, "exprSet") An object of class "exprSet2" @expressions EXP1_NC_Cy3-DETANO_Cy5 EXP1_NC_Cy5-DETANO_Cy3 EXP2_NC_Cy3-DETANO_Cy5 EXP2_NC_Cy5-DETANO_Cy3 [1,] 36551 43598 61149 36924 [2,] 1404 1168 914 960 [3,] 2879 2222 3844 4283 [4,] 16497 11104 812 9903 [5,] 4500 3207 852 8055 EXP1_NC_Cy3-DETANO_Cy5 EXP1_NC_Cy5-DETANO_Cy3 EXP2_NC_Cy3-DETANO_Cy5 EXP2_NC_Cy5-DETANO_Cy3 [1,] 519 450 360 388 [2,] 432 454 286 298 [3,] 3407 1252 7398 1844 [4,] 18128 6515 273 6913 [5,] 4337 1621 295 5100 4619 more rows ... @probes Block Row Column ID Name 1 1 1 1 Cy3 lights (12A 2 1 1 2 Carry-over 16s 3 1 1 3 5s rRNA (11I4) 4 1 1 4 16s rRNA N (11E 5 1 1 5 16s rRNA 1:3 (1 4619 more rows ... > as(RGmodel, "exprSet") Error in as(RGmodel, "exprSet") : No method or default for coercing "list" to "exprSet" As can be seen, the RG object happily goes to an exprSet object, but the RGmodel one refuses. I guess this is because the RGmodel has no values for background intensity?? Thanks Mick
limma limma • 942 views
ADD COMMENT
0
Entering edit mode
@james-wettenhall-153
Last seen 10.2 years ago
Hi Mick, On Fri, 4 Jun 2004, michael watson (IAH-C) wrote: > I have a kooperberg bg corrected dataset in limma and I want to coerce > it to an exprSet object so that I can do some other stuff with it. I <snip> > > as(RGmodel, "exprSet") > Error in as(RGmodel, "exprSet") : No method or default for coercing > "list" to "exprSet" limma used to use regular lists for RG data but now it uses S4 objects of class RGList. Matt Ritchie wrote the kooperberg function, so I'm CCing the email to him. He has (for the moment) used the old style (just a regular list). You can convert it to the new style with: RGobj <- new("RGList",.Data=RGmodel) as(RGobj,"exprSet") Hope this helps, James
ADD COMMENT
0
Entering edit mode
@michael-watson-iah-c-378
Last seen 10.2 years ago
Hi James Thanks for that! This ties together with my posts yesterday - I want to use the Biobase function esApply on my limma data, and esApply uses exprSet objects. Can I also coerce MA objects into exprSet objects through this method? Thanks Mick -----Original Message----- From: James Wettenhall [mailto:wettenhall@wehi.edu.au] Sent: 04 June 2004 13:14 To: michael watson (IAH-C) Cc: bioconductor@stat.math.ethz.ch; Matthew Ritchie Subject: Re: [BioC] Limma: can't coerce Rgmodel into exprSet Hi Mick, On Fri, 4 Jun 2004, michael watson (IAH-C) wrote: > I have a kooperberg bg corrected dataset in limma and I want to coerce > it to an exprSet object so that I can do some other stuff with it. I <snip> > > as(RGmodel, "exprSet") > Error in as(RGmodel, "exprSet") : No method or default for coercing > "list" to "exprSet" limma used to use regular lists for RG data but now it uses S4 objects of class RGList. Matt Ritchie wrote the kooperberg function, so I'm CCing the email to him. He has (for the moment) used the old style (just a regular list). You can convert it to the new style with: RGobj <- new("RGList",.Data=RGmodel) as(RGobj,"exprSet") Hope this helps, James
ADD COMMENT
0
Entering edit mode
On Fri, 4 Jun 2004, michael watson (IAH-C) wrote: > use the Biobase function esApply on my limma data, and esApply uses > exprSet objects. Can I also coerce MA objects into exprSet objects > through this method? Mick, Yes, the convert package offers a coerce method from an MAList object to an exprSet. See the last example in the help for the convert package: library(convert) ?"coerce,MAList,exprSet-method" Hopefully you are using a recent version of limma, which should produce MAList objects, but if you have any really old limma .RData files with MA values stored in a list, you can convert to an MAList object with: MAobj <- new("MAList", .Data=oldMA) I have never used the esApply method so I don't know whether it will work on your limma objects. Having a quick look at the help, it seems to use the phenoData slot of the exprSet object, which corresponds to the concept of a "targets" file in limma. So if you've read a targets file into your RG object with RG$targets <- readTargets("Targets.txt") then it will automatically become an attribute of your MA object when you do MA <- normalizeWithinArrays(RG) and then when you do eset <- as(MA,"exprSet") You should be able to see your targets/phenoData with: pData(phenoData(MAeset)) I just mention this because I saw "phenoData" mentioned in the help for esApply, but I've never really used esApply myself, so I can't help much further at the moment. Regards, James
ADD REPLY

Login before adding your answer.

Traffic: 765 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6