Download SRA data via SRA Toolkit.
1
1
Entering edit mode
6.8 years ago
XBria ▴ 90

Hi there,

How to download all SRR files of SRP027383 at once ? What I found on internet guides downloading only one SRR file.

Thanks in advance

sra • 2.3k views
ADD COMMENT
0
Entering edit mode

It worked. Thank you !

ADD REPLY
0
Entering edit mode

Dear Wouter.

Downloading process stopped. the following message appears: Error in download.file(i, destfile = file.path(destDir, basename(i)), : write failed If I start to redo downloading, it will again download the existing sra files ! Can you please guide me how to fix it ?

ADD REPLY
0
Entering edit mode

From my links, which command are you using? Is your hard drive full?

ADD REPLY
0
Entering edit mode

The second one, I guessed the memory capacity is the problem so I changed the directory to an external hardware of 1TB. Again it restarts downloading the existing file !

ADD REPLY
0
Entering edit mode

Yes the command simply downloads the entire set without checking what's already available. I don't know what the easiest solution to that is in R. If you would use the answer below here (A: Download SRA data via SRA Toolkit.) you would simply grep those out from the list.

ADD REPLY
1
Entering edit mode
6.8 years ago
James Ashmore ★ 3.4k

This method requires you to have E-utilities and GNU Parallel installed:

esearch -db sra -query SRP027383 | esummary | xtract -pattern DocumentSummary -element Run@acc | parallel -j 1 'fastq-dump -A {}'

Change the number next to the '-j' flag to run N jobs in parallel

ADD COMMENT
0
Entering edit mode

What do you want to gain by running it in parallel? This is about downloading 300 SRA files with about 3 gigs each. Bandwidth will be the limiting factor. Also make sure that you have enough free disk space in your HOME or wherever fastq-dump will create its local file cache.

ADD REPLY
1
Entering edit mode

parallel -j 1 would be just a single job at a time, and it certainly looks more elegant than a for loop. Has features such as --progress and --eta. And I think running this with -j 2 would be fine (depending on your architecture) and already double the speed of just sequential downloading.

ADD REPLY

Login before adding your answer.

Traffic: 2519 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6