2
$\begingroup$

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

  1. Access SRA Run Selector.
  2. Enter the accession number for the project of interest.
  3. 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.
  4. For each accession number in the accession list I run the following command:
$ fastq-dump --accession <accesion_number> --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 (:

$\endgroup$
2
  • 1
    $\begingroup$ 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 (ebi.ac.uk/ena/browser/home) and see if they offer fastq files for the dataset(s) you are interested in. $\endgroup$
    – haci
    Commented Jul 22, 2021 at 13:07
  • 1
    $\begingroup$ The dataset I am looking for is actually available at ENA, and indeed, the workflow is way nicer using their interface. $\endgroup$ Commented Jul 23, 2021 at 12:48

1 Answer 1

2
$\begingroup$

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
$\endgroup$
3
  • $\begingroup$ Nice, I will test this in a couple of hours ^^ $\endgroup$ Commented Jul 22, 2021 at 12:43
  • $\begingroup$ 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. $\endgroup$ Commented Jul 23, 2021 at 9:08
  • $\begingroup$ I did a slight modification just in case the official installation steps didn't work. $\endgroup$
    – zorbax
    Commented Jul 24, 2021 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.