<p>So far, <strong>grabseqs</strong> is the easiest option, a wrapper for <code>fastq_dump</code> and <code>fasterq-dump</code>, you can install it with conda, I recommend you to use an environment:</p>
<pre><code>conda create -n grabseqs -c louiejtaylor -c bioconda -c conda-forge grabseqs

conda activate grabseqs

grabseqs sra SRRNNNNNNNN

conda deactivate
</code></pre>
<p>And download directly projects, runs, and bioprojects from SRA with <code>grabseqs sra SRRNNNNNNNN</code>. Check it out here: <a href="https://github.com/louiejtaylor/grabseqs" rel="nofollow noreferrer">https://github.com/louiejtaylor/grabseqs</a></p>
<p>You can install in a different way just in case the first one doesn't work:</p>
<pre><code>conda create -n grabseqs -yc bioconda parallel-fastq-dump pigz 
conda activate grabseqs 
pip install grabseqs

grabseqs sra SRRNNNNNNNN

conda deactivate
</code></pre>

CC BY-SA 4.0
2021-07-22T12:43:29.233Z
Nice, I will test this in a couple of hours ^^
pietro_molina
CC BY-SA 4.0
2021-07-23T09:08:51.200Z
I didn't manage to install it easily, it is presenting some kind of conflict between the dependencies. I will try to find something else.
pietro_molina
CC BY-SA 4.0
2021-07-24T20:16:34.563Z
I did a slight modification just in case the official installation steps didn't work.
zorbax
CC BY-SA 4.0
2021-07-22T12:39:23.367Z
2021-07-24T20:18:56.370Z
2021-07-24T20:18:56.370Z
zorbax
<p>My workflow for downloading data from SRA has been the following:</p>
<ol>
<li>Access <a href="https://www.ncbi.nlm.nih.gov/Traces/study/?" rel="nofollow noreferrer">SRA Run Selector</a>.</li>
<li>Enter the accession number for the project of interest.</li>
<li>Download &quot;Accession List&quot; for the &quot;Total&quot; data. The accession list is basically, as the name says, a <code>.txt</code> file listing all accession numbers for each run in a given bioproject.</li>
<li>For each accession number in the accession list I run the following command:</li>
</ol>
<pre><code>$ fastq-dump --accession &lt;accesion_number&gt; --outdir .
</code></pre>
<p>How to download data from SRA in Linux systems via the command line? What are fast and scalable ways of achieving this? What should one know before downloading data?</p>
<p>Although there are some similar discussions in this StackExchange (eg. <a href="https://bioinformatics.stackexchange.com/questions/13802/trying-to-retrieve-sra-data-using-sra-explorer">Trying to retrieve sra data using sra explorer</a>, <a href="https://bioinformatics.stackexchange.com/questions/11166/downloading-dataset-from-sra-solid-platform">Downloading dataset from SRA (SOLiD Platform)</a>, <a href="https://bioinformatics.stackexchange.com/questions/12937/downloading-sra-files-from-aws">Downloading SRA Files from AWS</a>, etc).</p>
<p>The discussion on <a href="https://bioinformatics.stackexchange.com/questions/411/whats-the-best-way-to-download-data-from-the-sra-is-it-really-this-slow?rq=1">What's the best way to download data from the SRA? Is it really this slow?
</a> seems like a good starting point, but I wasn't able to find a straightforward guide on how to download data from SRA, e believe that a well thought and complete answer would help beginners alike. I am preparing an answer to the problem myself, but I thought that the community would probably give some interesting insights (:</p>

CC BY-SA 4.0
2021-07-22T13:07:51.693Z
I wouldn't say the download itself is slow but in my experience `sra` to `fastq` conversion took much more time than the download, and using `fasterq-dump` instead of `fastq-dump` did not help much. I would take a look at ENA (https://www.ebi.ac.uk/ena/browser/home) and see if they offer fastq files for the dataset(s) you are interested in.
haci
CC BY-SA 4.0
2021-07-23T12:48:49.840Z
The dataset I am looking for is actually available at ENA, and indeed, the workflow is way nicer using their interface.
pietro_molina
<genomics><public-databases><transcriptome><data-download>
How to download data from SRA in Linux systems via the command line?
# How to download data from SRA in Linux systems via the command line?

(Asked by: username_0 on 2021-07-22)

My workflow for downloading data from SRA has been the following:

Access SRA Run Selector.
Enter the accession number for the project of interest.
Download "Accession List" for the "Total" data. The accession list is basically, as the name says, a .txt file listing all accession numbers for each run in a given bioproject.
For each accession number in the accession list I run the following command:

$ fastq-dump --accession  --outdir .

How to download data from SRA in Linux systems via the command line? What are fast and scalable ways of achieving this? What should one know before downloading data?
Although there are some similar discussions in this StackExchange (eg. Trying to retrieve sra data using sra explorer, Downloading dataset from SRA (SOLiD Platform), Downloading SRA Files from AWS, etc).
The discussion on What's the best way to download data from the SRA? Is it really this slow?
 seems like a good starting point, but I wasn't able to find a straightforward guide on how to download data from SRA, e believe that a well thought and complete answer would help beginners alike. I am preparing an answer to the problem myself, but I thought that the community would probably give some interesting insights (:

**Tags:** genomics, public-databases, transcriptome, data-download
> **Comments:**
> **username_1**: I wouldn't say the download itself is slow but in my experience `sra` to `fastq` conversion took much more time than the download, and using `fasterq-dump` instead of `fastq-dump` did not help much. I would take a look at ENA (https://www.ebi.ac.uk/ena/browser/home) and see if they offer fastq files for the dataset(s) you are interested in.  
> **username_0**: The dataset I am looking for is actually available at ENA, and indeed, the workflow is way nicer using their interface.  

---

## 1 answers

### Answer by username_2 on 2021-07-22. Score: 2

So far, grabseqs is the easiest option, a wrapper for fastq_dump and fasterq-dump, you can install it with conda, I recommend you to use an environment:
conda create -n grabseqs -c louiejtaylor -c bioconda -c conda-forge grabseqs

conda activate grabseqs

grabseqs sra SRRNNNNNNNN

conda deactivate

And download directly projects, runs, and bioprojects from SRA with grabseqs sra SRRNNNNNNNN. Check it out here: https://github.com/louiejtaylor/grabseqs
You can install in a different way just in case the first one doesn't work:
conda create -n grabseqs -yc bioconda parallel-fastq-dump pigz 
conda activate grabseqs 
pip install grabseqs

grabseqs sra SRRNNNNNNNN

conda deactivate

> **Comments:**
> **username_0**: Nice, I will test this in a couple of hours ^^  
> **username_0**: I didn't manage to install it easily, it is presenting some kind of conflict between the dependencies. I will try to find something else.  
> **username_2**: I did a slight modification just in case the official installation steps didn't work.  

---

