How to programmatically get GEO accession number ID
2
0
Entering edit mode
10.1 years ago
ggundersen • 0

I can query GEO eUtils by accession number and get back some relevant XML, e.g.

http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gds&term=GSE57214%5bGEO%20Accession

But what I really want is the full record, which comes from the first ID listed in the above query's returned XML:

http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=gds&id=200057214

My question is: where does this ID (200057214), come from, and how can I programmatically get it from the accession number (GSE57214). In particular, I'd like to be able to get it from the website (http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE57214 ).

Any help is appreciated.

gene geo eutils ncbi • 4.9k views
ADD COMMENT
6
Entering edit mode
10.1 years ago
David W 4.9k

I think you also want to limit the search by "entry type", as it seems the same accession number can be used for datasets, series and samples.

Using the development version of rentrez to demonstrate (though, of course, you can do this with any package). First find what search terms are aviable for GDS:

library(rentrez)
terms <- entrez_db_searchable(db="gds")
as.data.frame(terms)[c("ACCN", "ETYP"),]                                                                 

#ACCN accession for GDS (DataSet), GPL (Platform), GSM (Sample), GSE (Series)
#ETYP                                          Entry type (DataSet or Series)

Then make your search/fetch your summary:

gds_search <- entrez_search(db="gds", term="GSE57214[ACCN] AND gse[ETYP])")
gds_search$ids
# [1] "200057214"

#get the record summary as a list:
entrez_summary(db="gds", id=gds_search$ids)
ADD COMMENT
1
Entering edit mode
10.1 years ago
Ram 44k

You could possibly restrict the retmax to 1 and retmode to JSON on esearch, then pickup the ID returned, then pass it to esummary. Not sure if you can jump from search to details and skip the results step in between.

http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gds&term=GSE57214%5bGEO%20Accession&retmax=1&retmode=json

ADD COMMENT
0
Entering edit mode

Those are useful parameters. Thanks!

ADD REPLY

Login before adding your answer.

Traffic: 1636 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