Entering edit mode
13.0 years ago
Yogesh Pandit
▴
520
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
My words exactly.... Just a note that GSEMatrix=TRUE has been the default for almost two years.
"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.