# What's the best way to download data from the SRA? Is it really this slow?

I'm trying to download three WGS datasets from the SRA that are each between 60 and 100GB in size. So far I've tried:

• Fetching the .sra files directly from NCBI's ftp site
• Fetching the .sra files directly using the aspera command line (ascp)
• Using the SRA toolkit's fastqdump and samdump tools

It's excruciatingly slow. I've had three fastqdump processes running in parallel now for approximately 18 hours. They're running on a large AWS instance in the US east (Virginia) region, which I figure is about as close to NCBI as I can get. In 18 hours they've downloaded a total of 33GB of data. By my calculation that's ~500kb/s. They do appear to still be running - the fastq files continue to grow and their timestamps continue to update.

At this rate it's going to take me days or weeks just to download the datasets. Surely the SRA must be capable of moving data at higher rates that this? I've also looked, and unfortunately the datasets I'm interested have not been mirrored out to ENA or the Japanese archive, so it looks like I'm stuck working with the SRA.

Is there a better way to fetch this data that wouldn't take multiple days?

• The SRA is definitely capable of moving this data at higher rates. The throttling happens not at their end but somewhere else in the network connection. In my test just now, using fastq-dump, I get a throughput of ~11.5 MiB/s, more than 20 times the rate you observe. Jun 3, 2017 at 12:39
• I don't know if this can help answering your question, but providing the commands you used might be at least useful for other readers.
– bli
Jun 5, 2017 at 8:55
• In general I find that its the conversion from SRA to fastq that is slow, not the downloading. You can try this by running NCBI's prefetch tool first to download the file (through using ascp if possible) and then fastq-dumping it. Also note that ascp works better when you limit the band width its allowed. We limit it to 100m/sec. Jun 6, 2017 at 9:44

Proximity to NCBI may not necessarily give you the fastest transfer speed. AWS may be deliberately throttling the Internet connection to limit the likelihood that people will use it for undesirable things. There's a chance that a home network might be faster, but you're likely to get the fastest connection to NCBI by using an academic system that is linked to NCBI via a research network.

Another possibility is using Aspera for downloads. This is unlikely to help if bandwidth is being throttled, but it might help if there's a bit of congestion through the regular methods:

https://www.ncbi.nlm.nih.gov/public/

On a related note, just in case someone sees this and EBI/ENA is an option, there's a great guide for how to do file transfer using Aspera on the EBI web site:

Your command should look similar to this on Unix:

ascp -QT -l 300m -i <aspera connect installation directory>/etc/asperaweb_id_dsa.openssh era-fasp@fasp.sra.ebi.ac.uk:<file or files to download> <download location>


In my case, I've just started downloading some files from a MinION sequencing run. The estimated completion time via standard FTP was 12 hours for about 32GB of data; ascp has reduced that estimated download time to about an hour. Here's the command I used for downloading:

ascp -QT -l 300m -i ~/.aspera/connect/etc/asperaweb_id_dsa.openssh era-fasp@fasp.sra.ebi.ac.uk:/vol1/ERA932/ERA932268/oxfordnanopore_native/20160804_Mock.tar.gz .


In general, the best way to download SRA data is: don't download from SRA. However, as ENA has not be sync'd yet, I would recommend to download from SRA ftp and then convert to fastq locally. You can find files in the SRA format here. Downloading and then converting locally is much faster than direct retrieval from NCBI for some mysterious reasons.

• Agree. I always download via ENA, it's reliably fast and you get the fastq files natively. I usually search with SRA as it's terrible on ENA. Jul 13, 2017 at 9:00

By far the fastest method in my experience has been to use the SRAdb library in R. For most entries, you can download fastq files directly. Some older experiments don't have them, but I've still found it much faster to download SRA files via getSRAfile() and then to convert them using fastqdump than to use fastqdump directly.

• +1 for providing an R solution. That said, I don't think NCBI keeps FASTQ. I speculate that SRAdb just downloads from ENA. Its source code seems to confirm my guess. Jun 6, 2017 at 23:14

NCBI is moving slowly to cloud (AWS/Google) for hosting. As such the tradiational FTP urls do not always work. My solution involves using pysradb.

pysradb download -p <SRP_ID>

Another possibility in 2020 is to use fasterq-dump which is promoted to be faster than previous fastq-dump.