How to retrieve GenBank records with a range of accession numbers

Yesterday I was looking at a publication my research group published a few years ago and I found a reference to some data I was looking for.

The ESTs from GR_Ea and GR_Eb were deposited in GenBank under accession nos. CO069431–CO100583 and CO100584–CO132899.]

I went to GenBank and submitted these accession numbers as search terms, but I could only get it to retrieve 1 EST at a time. I did not want to repeat this process thousands of times, so I did some searching and finally got a response on the BioStar forum.

GenBank’s EST database (as well as their other databases) has a URL-based query interface. The answer to my problem was simply knowing how to use this interface (in other words, how to build my URLs). Of course, you don’t have to use URLs–they have a “Search Details” box on the site that allows you to enter your search query directly. Using either interface will retrieve the same results.

To get the first set of records in the publication, I used to URL-based interface and pointed my browser to[accn]. The colon operator is interpreted as the range between the two values, and the [accn] operator indicates you want to retrieve entries whose accession numbers match the provided value(s). Taadaaaa!

This is a relatively simple query, but GenBank allows you to build pretty complex queries and filters. If you check out GenBank’s Entrez Help page, they provide a detailed description of how to build complex queries for retrieving your desired data. Make sure to scroll past their long-winded description of all of the Entrez databases!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s