Problem using SRAtoolkit
1
0
Entering edit mode
14 months ago
Yoosef ▴ 60

Hello Biostars community

I wanted to use split-3 function of sratoolkit to split my pair-ended RNA-seq files to two fastq files. However, after inserting the code, I get the following error. What is the problem?

./fastq-dump --split-3
2023-01-29T12:54:14 fastq-dump.3.0.2 err: param empty while validating argument list - expected accession
sra sratoolkit fastq RNA-seq • 1.4k views
ADD COMMENT
1
Entering edit mode
14 months ago
GenoMax 141k

Message tells you what you need to do. You need to provide an SRA accession number or name of a downloaded .sra file with this command.

e.g. fastq-dump --split-3 SRR345355

ADD COMMENT
0
Entering edit mode

Thanks for your help. Actually I was trying to use following loop to split my SRA files. However, I think the problem relates to my file extensions as they don't have .sra. How can I add that to the end of all my files?

for i in /media/yousef/C0B0499AB04997B4/transcriptom_files/* ; do ./fastq-dump --split-3 --outdir /media/yousef/C0B0499AB04997B4/split/$i; done
ADD REPLY
1
Entering edit mode

Did you download the files from SRA using prefetch?

ADD REPLY
0
Entering edit mode

No. I downloaded them by clicking on download link in NCBI website.

ADD REPLY
1
Entering edit mode

Try processing one file and see it works before you try the loop. In case your files are corrupt this is not going to work.

ADD REPLY
0
Entering edit mode

Sure. Thanks for your help.

ADD REPLY
1
Entering edit mode

If you are sure the files are in .sra format then you could rename one file and try. Something like

mv file file.sra
fastq-dump --split-3 file.sra

I suggest you try instead

fastq-dump --split-files file.sra 
ADD REPLY
0
Entering edit mode

Thanks. Yes files are in sra format. I could solve this by adding a .sra to each file. I was just wondering, is there a way to add .sra to all files by using a code in linux?

ADD REPLY
2
Entering edit mode
for i in /media/yousef/C0B0499AB04997B4/transcriptom_files/* ; do echo mv ${i} $[i}.sra; done

If all commands look correct then remove echo to actually do the renaming.

If you want to be super careful the you could cp ${i} ${i}.sra (instead of mv command) leaving a copy of original files intact.

ADD REPLY

Login before adding your answer.

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