nf-core / nf-core/fetchngs

ERROR ~ Error executing process > 'NFCORE_FETCHNGS:SRA:FASTQ_DOWNLOAD_PREFETCH_FASTERQDUMP_SRATOOLS:CUSTOM_SRATOOLSNCBISETTINGS (ncbi-settings)'

Open
#351 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Nextflow
Stars
202
Forks
93
Avg merge
1d 18m
Merged PRs (30d)
15

Description

Description of the bug

I am trying to download from SRA some reads for a project for my thesis. When the Fetchngs pipeline arrives at the last steps, it crashes. Download of reads is complete but it doesn't proceed.

I checked, vdb-config is present in my computer; the pipeline should be able to access it.

Command used and terminal output
nextflow run nf-core/fetchngs -resume --input workdir/sample_list.csv -profile conda --outdir workdir/reads/download

ERROR ~ Error executing process > 'NFCORE_FETCHNGS:SRA:FASTQ_DOWNLOAD_PREFETCH_FASTERQDUMP_SRATOOLS:CUSTOM_SRATOOLSNCBISETTINGS (ncbi-settings)'                                                                                                                                          
                                                                                                                                                                                                                                                                                          
Caused by:                                                                                                                                                                                                                                                                                
  Process `NFCORE_FETCHNGS:SRA:FASTQ_DOWNLOAD_PREFETCH_FASTERQDUMP_SRATOOLS:CUSTOM_SRATOOLSNCBISETTINGS (ncbi-settings)` terminated with an error exit status (1)                                                                                                                         
                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                          
Command executed [/home/juri/.nextflow/assets/nf-core/fetchngs/modules/nf-core/custom/sratoolsncbisettings/templates/detect_ncbi_settings.sh]:                                                                                                                                            
                                                                                                                                                                                                                                                                                          
  #!/usr/bin/env bash                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                          
  set -u                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                          
  # Get the expected NCBI settings path and define the environment variable                                                                                                                                                                                                               
  # `NCBI_SETTINGS`.                                                                                                                                                                                                                                                                      
  eval "$(vdb-config -o n NCBI_SETTINGS | sed 's/[" ]//g')"                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                          
  # If the user settings do not exist yet, create a file suitable for `prefetch`                                                                                                                                                                                                          
  # and `fasterq-dump`. If an existing settings file does not contain the required                                                                                                                                                                                                        
  # values, error out with a helpful message.                                                                                                                                                                                                                                             
  if [[ ! -f "${NCBI_SETTINGS}" ]]; then                                                                                                                                                                                                                                                  
      printf '/LIBS/GUID = "9a0fef2a-9c7c-4609-a33c-331cc9e57a16"\n/libs/cloud/report_instance_identity = "true"\n' > 'user-settings.mkfg'                                                                                                                                                
  else                                                                                                                                                                                                                                                                                    
      prefetch --help &> /dev/null                                                                                                                                                                                                                                                        
      if [[ $? = 78 ]]; then                                                                                                                                                                                                                                                              
          echo "You have an existing vdb-config at '${NCBI_SETTINGS}' but it is"\                                                                                                                                                                                                         
          "missing the required entries for /LIBS/GUID and"\                                                                                                                                                                                                                              
          "/libs/cloud/report_instance_identity."\                                                                                                                                                                                                                                        
          "Feel free to add the following to your settings file:" >&2                                                                                                                                                                                                                     
          echo "$(printf '/LIBS/GUID = "9a0fef2a-9c7c-4609-a33c-331cc9e57a16"\n/libs/cloud/report_instance_identity = "true"\n')" >&2                                                                                                                                                     
          exit 1                                                                                                                                                                                                                                                                          
      fi                                                                                                                                                                                                                                                                                  
      fasterq-dump --help &> /dev/null                                                                                                                                                                                                                                                    
      if [[ $? = 78 ]]; then                                                                                                                                                                                                                                                              
          echo "You have an existing vdb-config at '${NCBI_SETTINGS}' but it is"\                                                                                                                                                                                                         
          "missing the required entries for /LIBS/GUID and"\                                                                                                                                                                                                                              
          "/libs/cloud/report_instance_identity."\                                                                                                                                                                                                                                        
          "Feel free to add the following to your settings file:" >&2                                                                                                                                                                                                                     
          echo "$(printf '/LIBS/GUID = "9a0fef2a-9c7c-4609-a33c-331cc9e57a16"\n/libs/cloud/report_instance_identity = "true"\n')" >&2                                                                                                                                                     
          exit 1                                                                                                                                                                                                                                                                          
      fi                                                                                                                                                                                                                                                                                  
      if [[ "${NCBI_SETTINGS}" != *.mkfg ]]; then                                                                                                                                                                                                                                         
          echo "The detected settings '${NCBI_SETTINGS}' do not have the required"\                                                                                                                                                                                                       
          "file extension '.mkfg'." >&2                                                                                                                                                                                                                                                   
          exit 1                                                                                                                                                                                                                                                                          
      fi                                                                                                                                                                                                                                                                                  
      cp "${NCBI_SETTINGS}" ./
  fi
  cat <<-END_VERSIONS > versions.yml
  "NFCORE_FETCHNGS:SRA:FASTQ_DOWNLOAD_PREFETCH_FASTERQDUMP_SRATOOLS:CUSTOM_SRATOOLSNCBISETTINGS":
      sratools: $(vdb-config --version 2>&1 | grep -Eo '[0-9.]+')
  END_VERSIONS

Command exit status:
  1

Command output:
  (empty)

Command error:
  .command.sh: riga 8: vdb-config: comando non trovato
  .command.sh: riga 13: NCBI_SETTINGS: variabile non assegnata

Work dir:
  workdir/work/94/ec06b566312d77fc613d06fcc048d8 

Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line

 -- Check '.nextflow.log' file for details
Relevant files

No response

System information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with modules/nf-core/custom/sratoolsncbisettings/templates/detect_ncbi_settings.sh and reproduce the reported command with the conda profile and -resume. Check the vdb-config, prefetch, and fasterq-dump results in the failing ncbi-settings process; done means Fetchngs proceeds past this process and downloads the reads successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash
Domain
bioinformatics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.