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).
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).
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
-----------------------------------------------------------------------------------------------^^^^^^^^^^^
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
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
This is also a nice method: https://nf-co.re/fetchngs/usage
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
download all samples from a study in BioProject