Question: Geo Data Matrix Using R
1
gravatar for Yogesh Pandit
6.4 years ago by
Yogesh Pandit490
United States
Yogesh Pandit490 wrote:

I want something like,

ID   GB_ACC   Gene Title   Gene Symbol   ENTREZ_GENE_ID   GO_BP   GO_MF   GO_CC   Sample1   Sample2......

along with the corresponding values/IDs in the rows for a specific GSE. Following code gives me on the values for samples. How can I add rest of the information to the data matrix in R

library(GEOquery)
gse <- getGEO(filename = file)
probesets <- Table(GPLList(gse)[[1]])$ID
data.matrix <- do.call("cbind", lapply(GSMList(gse),
    function(x) {
        tab <- Table(x)
        mymatch <- match(probesets, tab$ID_REF)
        return(tab$VALUE[mymatch])
    }
                                       ))

And how do I restrict it to a few of my selected samples. Thanks in advance

geo R • 4.7k views
ADD COMMENTlink modified 6.4 years ago by Larry_Parnell16k • written 6.4 years ago by Yogesh Pandit490
2
gravatar for Stephen
6.4 years ago by
Stephen2.6k
Charlottesville Virginia
Stephen2.6k wrote:

Use the GSEMatrix argument:

mygeomat <- getGEO("GSE12345", GSEMatrix=TRUE)

See page 13 of the docs.

ADD COMMENTlink written 6.4 years ago by Stephen2.6k

My words exactly.... Just a note that GSEMatrix=TRUE has been the default for almost two years.

ADD REPLYlink written 6.4 years ago by Sean Davis24k

"mygeomat" in the answer above will be a list of ExpressionSet objects. Take a look at the Biobase vignette about ExpressionSets for details of subsetting and getting annotation information out.

ADD REPLYlink written 6.4 years ago by Sean Davis24k
0
gravatar for Larry_Parnell
6.4 years ago by
Larry_Parnell16k
Boston, MA USA
Larry_Parnell16k wrote:

Via Simon Cockell's Twitter feed, I learned about GEO2R, a web app to analyze gene expression in GEO datasets using R. While this won't address your specific question, it may offer an alternate way to get the result you seek.

ADD COMMENTlink modified 6.4 years ago • written 6.4 years ago by Larry_Parnell16k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1177 users visited in the last hour