nf-core / fetchngs

Pipeline to fetch metadata and raw FastQ files from public databases
https://nf-co.re/fetchngs
MIT License
150 stars 72 forks source link

SRA prefetch gets sralite file but fasterq-dump can't find it #162

Closed SCDealy closed 9 months ago

SCDealy commented 1 year ago

Description of the bug

fetchngs successfully handles sra files, but when prefetch gets an sralite file, fasterq-dump can't see it. After fetchngs runs I checked the working directory for the failed SRA file and found it in a sub-directory that was given the SRA accession as its name. Of all the SRA files I tried to process, this is the only one that was downloaded as an sralite file.

I am new to NextFlow (first time using it), so I am still figuring out how things work, but it appears that fasterq-dump doesn't know to look for an sralite file in the sub-directory so it doesn't find it.

Command used and terminal output

$ nextflow run -r 1.10.0 nf-core/fetchngs -profile singularity --input SRR_Acc_List.txt --outdir SRA --nf_core_pipeline rnaseq --force_sratools_download

ERROR ~ Error executing process > 'NFCORE_FETCHNGS:SRA:FASTQ_DOWNLOAD_PREFETCH_FASTERQDUMP_SRATOOLS:SRATOOLS_FASTERQDUMP (SRX879490_SRR1806585)'

Caused by:
  Process `NFCORE_FETCHNGS:SRA:FASTQ_DOWNLOAD_PREFETCH_FASTERQDUMP_SRATOOLS:SRATOOLS_FASTERQDUMP (SRX879490_SRR1806585)` terminated with an error exit status (3)

Command executed:

  export NCBI_SETTINGS="$PWD/user-settings.mkfg"

  fasterq-dump \
      --split-files --include-technical \
      --threads 6 \
      --outfile SRX879490_SRR1806585.fastq \
       \
      SRR1806585

  pigz \
       \
      --no-name \
      --processes 6 \
      *.fastq

  cat <<-END_VERSIONS > versions.yml
  "NFCORE_FETCHNGS:SRA:FASTQ_DOWNLOAD_PREFETCH_FASTERQDUMP_SRATOOLS:SRATOOLS_FASTERQDUMP":
      sratools: $(fasterq-dump --version 2>&1 | grep -Eo '[0-9.]+')
      pigz: $( pigz --version 2>&1 | sed 's/pigz //g' )
  END_VERSIONS

Command exit status:
  3

Command output:
  (empty)

Command error:
  INFO:    Environment variable SINGULARITYENV_NXF_DEBUG is set, but APPTAINERENV_NXF_DEBUG is preferred
  2023-05-25T15:12:38 fasterq-dump.2.11.0 err: invalid accession 'SRR1806585'
  fasterq-dump quit with error code 3

Relevant files

SRR_Acc_List.txt nextflow.log

System information

SCDealy commented 1 year ago

NOTE: the sra-tools bug below sounds like it might be the problem (it's the same version: 2.11.0), but the response to the bug was "Download the latest toolkit." with no explanation.

https://github.com/ncbi/sra-tools/issues/663

FWIW.

amizeranschi commented 1 year ago

I'm running into the same issue with fetchngs v. 1.10. Latest sra-tools version as of now is 3.0.6.

Could be worth updating the nf-core sratools modules to a newer version.

adf-ncgr commented 12 months ago

FYI, I was having the same issue but just updated to the newly released 1.11.0 and it seems to have fixed the problem for me (thanks nf-core!)

drpatelh commented 9 months ago

Yep, this should have been fixed with https://github.com/nf-core/fetchngs/commit/a9e5646e60a24f59346392d7acc657f8efcd29e0