Ali
Ali

Reputation: 9850

How to extract sample titles (names) using GEOquery package?

GEOquery is a great R package to retrieve and analyze the Gene Expression data stored in NCBI Gene Expression Omnibus (GEO) database. I have used the following code provided from GEO2R service of GEO database (that generates the initial R script to analyze your desired data automatically) to extract some GEO series of experiments:

gset <- getGEO("GSE10246", GSEMatrix =TRUE)
if (length(gset) > 1) idx <- grep("GPL1261", attr(gset, "names")) else idx <- 1
    gset <- gset[[idx]]
gset # displays a summary of the data stored in this variable

The problem is that I can not retrieve the sample titles from it. I have found some function Columns() that works on GDS datasets and returns the sample names, but not on GSE.

Please note I am not interested in sample accession IDs (i.e. GSM258609 GSM258610, etc), what I want is the sample human readable titles.

Is there any idea? Thanks

Upvotes: 4

Views: 1308

Answers (1)

Martin Morgan
Martin Morgan

Reputation: 46886

After

gset <- getGEO("GSE10246", GSEMatrix =TRUE)

gset is a simple list, it's first element is an ExpressionSet, and the sample information are in the phenoData or pData, so maybe you're looking for

pData(gset[[1]])

See ?ExpressionSet for more.

Upvotes: 3

Related Questions