epi2me-labs / wf-metagenomics

Metagenomic classification of long-read sequencing data
Other
55 stars 23 forks source link

[Bug]: wf-metagenomics keeps failing #40

Closed Drmegs closed 1 year ago

Drmegs commented 1 year ago

What happened?

When I use the demo data everything works, but when I try to run my own data it keeps failing with errors and also notes that I need to install graphviz however graphviz is already installed. Log output below

Operating System

Windows 11

Workflow Execution

EPI2ME Labs desktop application

Workflow Execution - EPI2ME Labs Versions

No response

Workflow Execution - CLI Execution Profile

Docker

Workflow Version

V4.11

Relevant log output

ry
Resources
Tasks
[admiring_lovelace]
Nextflow workflow report
[admiring_lovelace]
Workflow execution completed unsuccessfully!
The exit status of the task that caused the workflow execution to fail was: 2.

The full error message was:

Error executing process > 'kraken_pipeline:progressive_bracken (1)'

Caused by:
  Process `kraken_pipeline:progressive_bracken (1)` terminated with an error exit status (2)

Command executed:

  # run bracken on the latest kreports, is this writing some outputs
  # alongside the inputs? seems at least {}.kreport_bracken_species.txt
  # is written alongside the input
  run_bracken.py \
      "database_dir" \
      "kraken.1.unclassified/unclassified.kreport.txt" \
      "1000" \
      "S" \
      "unclassified.bracken_report.txt"

  # do some stuff...
  awk -F '  ' -v OFS='  ' '{ print $2,$6 }' "unclassified.bracken_report.txt" \
      | awk -F '    ' -v OFS='  ' 'NR!=1 {print}' \
      | tee taxacounts.txt \
      | awk -F '    ' -v OFS='  ' '{ print $1 }' > taxa.txt
  taxonkit lineage         -j 2 \
      --data-dir taxonomy_dir \
      -R taxa.txt  > lineages.txt
  aggregate_lineages_bracken.py \
      -i "lineages.txt" -b "taxacounts.txt" \
      -u "kraken.1.unclassified/unclassified.kreport.txt" \
      -p "unclassified.kraken2"

  file1=`cat *.json`
  echo "{"'"unclassified"'": "$file1"}" >> "bracken.json"

  # collate the latest bracken outputs into state
  if [[ "1" != "1" ]]; then
      cp -r "NOSTATE" "bracken.1"
  else
      # make fresh directory
      mkdir "bracken.1"
  fi;

  # first output here is just for end user
  mv "kraken.1.unclassified/unclassified.kreport_bracken_species.txt" "bracken.1" || echo "No bracken report"
  mv "bracken.json" "bracken.1/unclassified.json"

Command exit status:
  2

Command output:
  b' >> Checking for Valid Options...\n ERROR: database_dir/database1000mers.kmer_distrib does not exist\n        Run bracken-build to generate the kmer distribution file.\n'

Command error:
  b''awk: cannot open unclassified.bracken_report.txt (No such file or directory)

Work dir:
  /mnt/c/Users/meaga/epi2melabs/instances/wf-metagenomics_f7c179f2-5dae-473d-983d-6ea1c524321c/work/ca/688912bc1e50127ca1e628c3c3fa0b

Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out`
sarahjeeeze commented 1 year ago

Hi, Are you using your own database? In the input database directory you are using do you have 1000mers kmer file that is required for bracken?

Drmegs commented 1 year ago

No I am not. I have just uploaded my Fastq files. I have added them as a folder with separate folders for each barcode and also tried to put all barcode files in to a single file and keep getting the same error.

nggvs commented 1 year ago

Hi! I think that the problem was that there was a symbolic link within your store_dir (which saves db) pointing to an old wf-metagenomics project that you may have deleted. Hopefully the version 2.0.10 solves this. Please let us know if you still have the same error.

cjw85 commented 1 year ago

Closing due to lack of response.