AIM: Download "Unique Identifier List" for the following query from GEO DataSets.

Query: ("Expression profiling by high throughput sequencing"[DataSet Type] AND ("Homo sapiens"[Organism] OR "Mus musculus"[Organism] OR "rattus norvegicus"[Organism])) AND ("2020/01/01"[PDAT] : "3000"[PDAT])

which means, all RNASeq studies deposited on GEO in the year 2020 for humans, mice or rat.

Problem: I need the GSE ID list for ~9k datasets, but while trying to download the list of ids, it loads to a blank page and nothing happens. Also, clicking on "Next Page" gives error. I have been trying for the last 3-4 days but it doesn't work.

Steps to generate file:

"Send To" -> "File" -> "Format" (Unique Identifier List) -> "Sort By" (Default Order) -> "Create File"


2 Answers 2


You can use Entrez Direct for this. The following returns Unique Identifiers which are just bare integers.

$ geo_query='"Expression profiling by high throughput sequencing"[DataSet Type] AND ("Homo sapiens"[Organism] OR "Mus musculus"[Organism] OR "rattus norvegicus"[Organism]) AND ("2020/01/01"[PDAT] : "3000"[PDAT])'
$ esearch -db gds -query "$geo_query" | efetch -format uid > gds_results.txt 
$ wc -l gds_results.txt 
9981 gds_results.txt
$ head -n2 gds_results.txt 

Instead, if you are looking for a way to get the GSE accessions, you can use the built-in xtract command to parse the XML returned by esummary as follows:

$ esearch -db gds -query "$geo_query" | esummary | xtract -pattern DocumentSummary -first Accession > gse_accs.txt > gse_accs.txt
$ wc -l gse_accs.txt 
9981 gse_accs.txt
$ head -n2 gse_accs.txt 

I think I would just try to do this with GEOquery.


  • $\begingroup$ GEOquery would download datasets for a given accession ID. R provides a library bioconductor.org/packages/release/bioc/html/GEOmetadb.html which contains metadata for microarray studies. I couldn't find anything similar to this for RNASeq studies so had to resort to the GUI. $\endgroup$ Jan 2, 2021 at 5:17
  • $\begingroup$ Oh you're right, I did something similar before, i though it was GEOquery but i guess i don't remember... Ok, can you download the text file like: "Send To" -> "File" -> "Format" Summary (text) And then do something like: cat gds_result.txt | grep 'Accession: GSE' | cut -f 3 | cut -f 2 -d ' ' | sort > gse.txt $\endgroup$
    – k1sauce
    Jan 6, 2021 at 0:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.