ncbi / sra-tools

SRA Tools
Other
1.07k stars 243 forks source link

fasterq-dump quit with error code 3, but no error is given #891

Closed vini8cs closed 4 months ago

vini8cs commented 6 months ago

I'm having this problem when I'm running fasterq-dump. Although it indicates a lack of success with the warning "fasterq-dump quit with error code 3", it's not returning what the error is. I've tried every solution from other issues, but none works.

The command used was: prefetch SRX9823484 -O /home/bombus/Apis --max-size u

2023-12-18T22:10:18 prefetch.3.0.9: Current preference is set to retrieve SRA Normalized Format files with full base quality scores. 2023-12-18T22:10:19 prefetch.3.0.9: 1) Downloading 'SRR13404638'... 2023-12-18T22:10:19 prefetch.3.0.9: SRA Normalized Format file is being retrieved, if this is different from your preference, it may be due to current file availability. 2023-12-18T22:10:19 prefetch.3.0.9: Downloading via HTTPS... 2023-12-18T22:21:26 prefetch.3.0.9: HTTPS download succeed 2023-12-18T22:21:28 prefetch.3.0.9: 'SRR13404638' is valid 2023-12-18T22:21:28 prefetch.3.0.9: 1) 'SRR13404638' was downloaded successfully 2023-12-18T22:21:28 prefetch.3.0.9: 'SRX9823484' has 0 unresolved dependencies The command used was: fasterq-dump --threads 40 --split-files /home/bombus/Apis/SRX9823484/SRX9823484.sra -O /home/bombus/Apis/SRX9823484 -x

fasterq-dump quit with error code 3

klymenko commented 6 months ago

Does the file /home/bombus/Apis/SRX9823484/SRX9823484.sra exist?

vini8cs commented 6 months ago

Yes, it does. It's happening to every code I test

klymenko commented 6 months ago

what is the output of ls /home/bombus/Apis/SRX9823484 ?

vini8cs commented 6 months ago

My bad, I was using the wrong codes. When I used "SRX9823484", it was downloading "SRR13404638". And then fasterq dump was trying to extract fastqs from an empty directory. But it would be interesting if fasterq dump could have a warning saying the directory is empty. Because I was doing this using snakemake and due to this reason I thought it was excluding the .sra after the error with fasterq dump.

durbrow commented 6 months ago

FYI, --split-files puts all read 1 into _1.fastq and all read 2 in _2.fastq. This works fine most of the time, but if some spots have missing reads (not uncommon), you will have some reads without the corresponding read in the other file, and many FASTQ processing programs will choke on that. You can use --split-3 instead; it places incomplete spots in a separate file.

About SRX accessions, they represent experiments, which may consist of multiple SRRs. You got lucky and your SRXs only have one run. If they had more than one, fasterq-dump would have failed (with an error). You can get detailed information about SRXs, including the associated run accessions, from NCBI, e.g. https://www.ncbi.nlm.nih.gov/sra/SRX9823484

vini8cs commented 6 months ago

Ooh, this happened a few times, and I didn't understand what was going on. Thank you very much for the tip.

I later realized that I was using the experiment accession, and prefetch would accept that, but it would create the directory for the run with the SRR file. Now it all makes sense. Thank you!