Thank you very much, Istvan. The command you provided is really helpful!
Dear all,
I have a list of NCBI GEO Series Accession numbers and Platform IDs, and want to download the raw data in batch. A previous post on Biostars presents a good example of batch download (How to download raw sequence data from GEO/SRA ), but that solution is based on project ID rather than GEO Series Accession number. Does anyone know how to work out this task? Thank you very much!
1 answer
You can connect GEO to the SRA run info like so:
esearch -query GSE65022 -db gds | elink -target sra | efetch -format runinfo
then from that you can build the command to automate data download as such (this only gets the first 10 spots to allow easy testing):
esearch -query GSE65022 -db gds | elink -target sra | efetch -format runinfo | cut -d ',' -f 1 | grep SRR | xargs fastq-dump -X 10 --split-files
remove the limit of -X 10 when getting all the data.
I wonder if search can retrieve strain information like shown in runInfo table (https://www.ncbi.nlm.nih.gov/Traces/study/?acc=SRR1761531&go=go ) or SRX summary information (https://www.ncbi.nlm.nih.gov/gds/?term=SRX844624 )
There is an XML file that contains all the information that is displayed, though getting the data out can be somewhat convoluted. For example:
esearch -db sra -query SRR1761531 | efetch > summary.xml
cat summary.xml | xtract -Pattern SAMPLE_ATTRIBUTE -element TAG,VALUE
would produce:
source_name Leaf tissue
cultivar Nipponbare
tissue leaf
treatment control
developmental stage Vegetative stage
Log in to answer this question.
Can you post an example of the Accession number you are interested in? @Istvan's solution with eUtils should be able to accommodate your needs.
Thank you for your comment, genomax! The GEO Series Accession Number is something like GSE65022, and the Platform ID is like GPL19657. I want to get the SRA number something like SRR4024915.
This may be helpul batchentrez
Hi, Buffo, thanks for your comment! However, after uploading a list of Platform ID (eg, GPL19657), I could not get the SAR run number, which is something like SRR4024915.
Hi, Just in case you are only interested in SRR ids, SRA run selector is a very good option. You can either enter GSE65022 in the run selector and it should pull all the relevant metadata for you. For example is this url https://www.ncbi.nlm.nih.gov/Traces/study/?acc=GSE65022&go=go