Download entire SRA study to convert to Fastq
3
0
Entering edit mode
9.1 years ago
jwoot88 ▴ 30

There is an NCBI SRA project I would like to convert to Fastq files. I know I can use use SRA tools and convert individual files but how do I download all of the files as Fastq files at once (there are 174 of them so I don't want to do it manually).

RNA-Seq SRA FastQ • 5.6k views
ADD COMMENT
1
Entering edit mode
ADD REPLY
5
Entering edit mode
9.1 years ago
Tky ★ 1.0k

Peit's comment is great. Just added a little bit more for a thorough solution.

Suppose the study ID is "PRJNA223640"

We can get URLs of all SRA files and then used as input for wget

wget 'http://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?save=efetch&rettype=runinfo&db=sra&term=PRJNA223640' -O - | cut -d',' -f12 |  xargs -n 1 wget
-----------------------------------------------------------------------------------------------^^^^^^^^^^^
ADD COMMENT
1
Entering edit mode

Great answer, copied for own use -

I'd add a grep -v '^Run' after the wget command to get rid of the table's header since that one causes a small error in the second wget command

ADD REPLY
1
Entering edit mode

Hi, Phil, thanks for the advice! Got your point.

wget 'http://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?save=efetch&rettype=runinfo&db=sra&term=PRJNA223640' -O - | grep -v '^Run' | cut -d',' -f12 |  xargs -n 1 wget
ADD REPLY
3
Entering edit mode
9.1 years ago
jwoot88 ▴ 30

Thanks so much guys! I also wanted to add that I found out about this entrez direct tool as well and was able to successfully download all the files and covert to fastqs with that using:

esearch -db sra -query PRJNA291386 | efetch --format runinfo | cut -d ',' -f 1 | grep SRR | xargs fastq-dump
ADD COMMENT
0
Entering edit mode

you may want to add --split-3 to the fastq-dump command it'll split up your paired reads file into two files ending in _1 and _2, based on personal preference. If you don't have paired read files then you can ignore that flag.

ADD REPLY
0
Entering edit mode
2.7 years ago
ks.bis • 0

This is also a nice method: https://nf-co.re/fetchngs/usage

ADD COMMENT

Login before adding your answer.

Traffic: 2551 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