I want to download all SRA file from the following project. Is there a method to download all the SRA files at the same time?

• You could use the R/Bioconductor package SRAdb Oct 16 '17 at 21:06
• @JohnBlischak This might be an answer if expanded explaining how SRAdb helps to answer the question
– llrs
Oct 17 '17 at 10:50

A quick look at your link tells me the SRR numbers run from SRR837819 to SRR837856. You can use fastq-dump from the sratoolkit, and make a for loop around it in bash.

Something like this should work:

for (( i = 19; i <= 56; i++ ))
do
fastq-dump --accession SRR8378$i done  After reading Devon Ryan's answer, I realize that you asked for SRA files instead of fastq. This can also be done with prefetch of the sratoolkit: for (( i = 19; i <= 56; i++ )) do prefetch SRR8378$i
done


Assuming you ultimately just want the fastq files and you know the SRR (run) numbers, I would download them from here: ftp://ftp.sra.ebi.ac.uk/vol1/fastq/

As for downloading multiple files, I've just used multiple wget commands. I don't know of a way to download all of the files together in like a zipped folder or anything :/

I suggest you follow the advice in Eric A Brenner's answer and just download the fastq files. However, if you really really want to use the SRA files for some reason, note that you can use parallel-fastq-dump to make things faster. Do follow its advice regarding using prefetch.

You'd need to combine that with the answer from b.nota (i.e., put the commands in a for loop).

I was able to find a solution for this using Entrez Direct and SRA toolkit :) If you have the project number or SRA project number, yours would be SRP022054 in this case for the 36 SRAs, you can use esearch to make a query like so and pipe it into SRA toolkit with this one liner:

esearch -db sra -query SRP022054 | efetch --format runinfo | cut -d ',' -f 1 | grep SRR | head -5 | xargs fastq-dump --skip-technical --readids --read-filter pass --dumpbase --split-3

pysradb download -p SRP022054


It retains the same schema as SRA.

prefetch --option-file SraAccList.txt