This is a test version of Biostars. For the public version, visit https://www.biostars.org.
fastq-dump not working in loop

I am running loop to download fastq files through fastq-dump but it gives following error

fastq-dump.3.1.1 err: error unexpected while resolving query within virtual file system module - No accession to process ( 500 )
Failed to call external services.

Note. fastq-dump is working fine for single accession.

fastq-dump

Can you add a snippet of your code?

Based on the error it seems you are not providing an accession number.

Regards,

Nitin N.

input=/home/data/Downloads/acc.txt
for file in $(cat $input)
do 
    fastq-dump --orig-fmt --gzip $file -O /home/data/Downloads/raw/
done

If I am not wrong the accession number is a positional argument in fastq-dump, so probably your command should be something like this,

fastq-dump $file --orig-fmt --gzip -O /home/data/Downloads/raw/

If this doesn't work, it could be a problem with newline character in the accession number, try removing it in this case.

Just asking out of curiosity did you try running your command without a loop? I mean using a single static accession number.

Regards,

Nitin N.

Yes I tried using a single accession and and it worked

show the code you ran?

0 answers

No answers yet.

Log in to answer this question.