thank you david,

this is the situation

>library(GEOquery)
>gse <- getGEO("GSE3494", GSEMatrix = FALSE)
>if (.Platform$OS.type != "windows") {
+    gse <- getGEO("GSE3494", GSEMatrix = TRUE)
+    show(gse)
+    show(pData(phenoData(gse[[1]]))[1:5, c(1, 6, 8)])
>}
>gsmplatforms <- lapply(GSMList(gse), function(x) {
+    Meta(x)$platform
>})
after this I have this error:
Error in function (classes, fdef, mtable)  :
unable to find an inherited method for function "GSMList", for signature
"list"

> sessionInfo()
R version 2.6.0 (2007-10-03)
x86_64-unknown-linux-gnu

locale:
C

attached base packages:
[1] tools     stats     graphics  grDevices utils     datasets  methods
[8] base

other attached packages:
[1] GEOquery_2.2.1 RCurl_0.8-3    Biobase_1.16.3

loaded via a namespace (and not attached):
[1] rcompgen_0.1-15

thank you


On Feb 19, 2008 9:38 AM, Sean Davis <sdavis2@mail.nih.gov> wrote:

> On Feb 19, 2008 11:36 AM, John Lande <john.lande77@gmail.com> wrote:
> > dear Bioc,
> >
> >
> > I want to use GEOquery to get a GSE dataset corresponding to two GPL.
> when I
> > use the following code I retrive an incompleate expression set, how can
> i
> > solve the problem?
> >
> > >library(GEOquery)
> > >gse <- getGEO("GSE3494", GSEMatrix = FALSE)
> > >if (.Platform$OS.type != "windows") {
> > >    gse <- getGEO("GSE3494", GSEMatrix = TRUE)
> > >    show(gse)
> > >    show(pData(phenoData(gse[[1]]))[1:5, c(1, 6, 8)])
> > >}
> > >gsmplatforms <- lapply(GSMList(gse), function(x) {
> > >    Meta(x)$platform
> > >})
> > >probsets <- Table(GPLList(gse)[[1]])$ID
> > >    data.matrix <- log2(do.call("cbind", lapply(GSMList(gse),
> function(x) {
> > >    tab <- Table(x)
> > >    mymatch <- match(probesets, tab$ID_REF)
> > >    return(tab$VALUE[mymatch])
> > >})))
> > >data.matrix[1:5, ]
> > >require(Biobase)
> > >rownames(data.matrix) <- probesets
> > >colnames(data.matrix) <- names(GSMList(gse))
> > >pdata <- data.frame(samples = names(GSMList(gse)))
> > >rownames(pdata) <- names(GSMList(gse))
> > >pheno <- as(pdata, "AnnotatedDataFrame")
> > >eset2 <- new("ExpressionSet", exprs = data.matrix, phenoData = pheno)
> > >eset2
>
> Hi, John.  Since there are two GPLs in this GSE, one needs to pay
> particular attention to the platform associated with each GSM; this
> can be a bit tedious, so I don't recommend it if you can help it (and
> it looks like from your code you can).
>
> You didn't send the output of sessionInfo(), so I'm not sure what
> version of R you are using.  I would suggest upgrading to the newest
> version of GEOquery and the newest version of R (if you aren't using
> R-2.6).  Due to a relatively recent change to the code (that I patched
> back to the release because it is so useful), you can do:
>
> esets <- getGEO('GSE3494',GSEMatrix=TRUE)
>
> esets will be a list of length two with an ExpressionSet in each
> member of the list.  Each ExpressionSet will contain the information
> associated with a single GPL.  I imagine that is what you ultimately
> were aiming for.
>
> Hope that helps,
> Sean
>

	[[alternative HTML version deleted]]

