<p>I suggest you follow the advice in <a href="https://bioinformatics.stackexchange.com/users/1628/eric-a-brenner">Eric A Brenner's</a> 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 <a href="https://github.com/rvalieris/parallel-fastq-dump" rel="nofollow noreferrer">parallel-fastq-dump</a> to make things faster. Do follow its advice regarding using <code>prefetch</code>.</p>

<p>You'd need to combine that with the answer from <a href="https://bioinformatics.stackexchange.com/users/939/b-nota">b.nota</a> (i.e., put the commands in a <code>for</code> loop).</p>

CC BY-SA 3.0
2017-10-17T08:19:27.760Z
2017-10-17T08:19:27.760Z
Devon Ryan
<p>Assuming you ultimately just want the fastq files and you know the SRR (run) numbers, I would download them from here: <a href="ftp://ftp.sra.ebi.ac.uk/vol1/fastq/" rel="nofollow noreferrer">ftp://ftp.sra.ebi.ac.uk/vol1/fastq/</a></p>

<p>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 :/</p>

CC BY-SA 3.0
2017-10-16T23:35:59.217Z
2017-10-16T23:35:59.217Z
Eric A Brenner
<p>This online tool creates download links for the less tech savy:</p>
<p><a href="https://sra-explorer.info/#" rel="nofollow noreferrer">https://sra-explorer.info/#</a></p>
<p>Using PRJNA201245 as ID, it provides several codes including a bash script for downloading all files.</p>

CC BY-SA 4.0
2021-03-21T21:13:48.720Z
2021-03-21T21:13:48.720Z
Geo Vogler
<p>Once you <a href="https://github.com/ncbi/sra-tools/wiki/02.-Installing-SRA-Toolkit" rel="nofollow noreferrer">install SRA tools</a>, you can grab a BioProject/SRP accession list (Send to - File - Accession List) and save it to default SRA tools /sra directory, then run (with /sra as cwd):</p>
<pre><code>prefetch --option-file SraAccList.txt
cat SraAccList.txt | xargs fasterq-dump --outdir &quot;/your-directory/for-fastq&quot;
</code></pre>
<p>P.S. The text file can be any list of accessions, separated by return.
Tested in Bash</p>

CC BY-SA 4.0
2021-03-17T17:46:08.883Z
2021-04-21T12:14:23.567Z
2021-04-21T12:14:23.567Z
Kostas Pildish
<p>You can download an entire project using <a href="https://github.com/saketkc/pysradb" rel="nofollow noreferrer">pysradb</a>:</p>

<pre><code>pysradb download -p SRP022054
</code></pre>

<p>It retains the same schema as SRA.</p>

CC BY-SA 4.0
2020-04-24T03:36:28.627Z
2020-04-24T03:36:28.627Z
Saket Choudhary
<p>I was able to find a solution for this using <a href="https://www.ncbi.nlm.nih.gov/books/NBK179288/" rel="nofollow noreferrer">Entrez Direct</a> and SRA toolkit :) If you have the project number or <a href="https://trace.ncbi.nlm.nih.gov/Traces/sra/?study=SRP022054" rel="nofollow noreferrer">SRA project number</a>, 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:</p>

<p><code>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</code></p>

CC BY-SA 4.0
2020-04-23T22:06:45.480Z
2020-04-23T22:06:45.480Z
Kai Fung
<p>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.</p>

<p>Something like this should work:</p>

<pre><code>for (( i = 19; i &lt;= 56; i++ ))
  do
  fastq-dump --accession SRR8378$i
done
</code></pre>

<p>After reading <a href="https://bioinformatics.stackexchange.com/users/77/devon-ryan">Devon Ryan</a>'s answer, I realize that you asked for SRA files instead of fastq. This can also be done with prefetch of the sratoolkit:</p>

<pre><code>for (( i = 19; i &lt;= 56; i++ ))
  do
  prefetch SRR8378$i
done
</code></pre>

CC BY-SA 3.0
2017-10-17T07:46:10.763Z
2017-10-17T09:48:28.950Z
2017-10-17T09:48:28.950Z
benn
<p>I want to download all SRA file from the following <a href="https://www.ncbi.nlm.nih.gov/sra?linkname=bioproject_sra_all&amp;from_uid=201245" rel="nofollow noreferrer">project</a>. Is there a method to download all the SRA files at the same time?</p>

CC BY-SA 3.0
2017-10-16T21:06:47.150Z
You could use the R/Bioconductor package [SRAdb](https://www.bioconductor.org/packages/release/bioc/html/SRAdb.html)
John Blischak
CC BY-SA 3.0
2017-10-17T10:50:11.887Z
@JohnBlischak This might be an answer if expanded explaining how SRAdb helps to answer the question
llrs
<rna-seq><data-download>
Download multiple SRA files
# Download multiple SRA files

(Asked by: username_0 on 2017-10-16)

I want to download all SRA file from the following [project](https://www.ncbi.nlm.nih.gov/sra?linkname=bioproject_sra_all&from_uid=201245). Is there a method to download all the SRA files at the same time?

**Tags:** rna-seq, data-download
> **Comments:**
> **username_1**: You could use the R/Bioconductor package [SRAdb](https://www.bioconductor.org/packages/release/bioc/html/SRAdb.html)  
> **username_2**: @JohnBlischak This might be an answer if expanded explaining how SRAdb helps to answer the question  

---

## 7 answers

### Answer by username_9 on 2017-10-17. Score: 5 | Accepted answer

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


---

### Answer by username_3 on 2017-10-17. Score: 3

I suggest you follow the advice in [Eric A Brenner's](https://bioinformatics.stackexchange.com/users/1628/eric-a-brenner) 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](https://github.com/rvalieris/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](https://bioinformatics.stackexchange.com/users/939/b-nota) (i.e., put the commands in a `for` loop).


---

### Answer by username_4 on 2017-10-16. Score: 3

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 :/


---

### Answer by username_8 on 2020-04-23. Score: 1

I was able to find a solution for this using [Entrez Direct](https://www.ncbi.nlm.nih.gov/books/NBK179288/) and SRA toolkit :) If you have the project number or [SRA project number](https://trace.ncbi.nlm.nih.gov/Traces/sra/?study=SRP022054), 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`


---

### Answer by username_5 on 2021-03-21. Score: 0

This online tool creates download links for the less tech savy:

<https://sra-explorer.info/#>

Using PRJNA201245 as ID, it provides several codes including a bash script for downloading all files.


---

### Answer by username_6 on 2021-03-17. Score: 0

Once you install SRA tools, you can grab a BioProject/SRP accession list (Send to - File - Accession List) and save it to default SRA tools /sra directory, then run (with /sra as cwd):
prefetch --option-file SraAccList.txt
cat SraAccList.txt | xargs fasterq-dump --outdir "/your-directory/for-fastq"

P.S. The text file can be any list of accessions, separated by return.
Tested in Bash


---

### Answer by username_7 on 2020-04-24. Score: 0

You can download an entire project using pysradb:
pysradb download -p SRP022054

It retains the same schema as SRA.


---

