I have recently downloaded a bunch of sra files. and i like to convert them to fastq paired reads. It works by doing this :
./fastq-dump --split-files /Users/medsmit/ncbi/public/sra/SRR3501908.sra
But I need a way to convert them all together.
I was trying this
for i in `ls /Users/medsmit/ncbi/public/sra/*.sra' ; do ./fastq-dump -- split-files $f; done
But definitely doing some silly mistake as its not working. Can anyone please help me? Thank you, Suparna
Do you have a space between
--
andsplit-files
in the loop? I would also usels -1
so only one file is fed tofastq-dump
for each iteration of the loop.Thanks Genomax. Yes I do have space between -- and split-files in the loop. Also I tried with ls -l After I pass this code bellow:
I only see
As if it entered in any interface. Not sure what wrong I am doing. Thanks, Suparna
You can't have a space between
--split-files
. That was also a1
(number one) notl
(L) in thels
command.And two additional mistakes noted by @jean below.
Alternatively, you can always check the ENA for your files, which are typically mirrored there directly as fastq, or use parallel-fastq-dump (python3) if the sra files are big (tens of Gb).