This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to download multiple SRA files with prefetch in ubuntu?

I created a download list

grep -E 'SRR|ERR' XDR_169_ids.txt > downloads.txt

## Find SRAs from SRS:
grep 'SRS' XDR_169_ids.txt | parallel "esearch -db sra -query {} | efetch --format runinfo | cut -d ',' -f 1 | grep SRR" >> downloads.txt

## Now make sure there are no duplicates, then download using GNU parallel to have 4 (or as many your disk can handle) streams in parallel:
sort -u downloads.txt | parallel -j 4 "prefetch {}"

Files were not downloaded.

rna-seq

prefetch does not unpack the files, just prefetches them (places them in a storage system for later commands that need it)

if you want to see files you need to use fastq-dump

or as many your disk can handle

Don't forget about your network. If you don't have enough bandwidth you may end up killing all downloads.

0 answers

No answers yet.

Log in to answer this question.