epi2me-labs / wf-bacterial-genomes

Small variant calling for haploid samples
https://labs.epi2me.io/
Other
26 stars 8 forks source link

workflow fails with demo data #5

Closed baynec2 closed 1 year ago

baynec2 commented 1 year ago

What happened?

Hi,

I have been trying to get this workflow to run for awhile with no success. When attempting to run the workflow on demo data it rapidly fails and produces a "stops with error" outcome.

The log shows that there is an error when calling prokka: Command error: touch: cannot touch '.command.trace': Permission denied

I have tried altering permissions to the directory to be the most permissive with no success.

Would you be able to help?

Thanks, Charlie

Operating System

Ubuntu 20.04

Workflow Execution

EPI2ME Labs desktop application

Workflow Execution - EPI2ME Labs Versions

V4.1.3

Workflow Execution - CLI Execution Profile

None

Workflow Version

v0.2.12

Relevant log output

NOTE: Nextflow is not tested with Java 1.8.0_362 -- It's recommended the use of version 11 up to 18
N E X T F L O W  ~  version 22.04.5
Launching `/home/nanopore-catalyst/epi2melabs/workflows/epi2me-labs/wf-bacterial-genomes/main.nf` [goofy_kalam] DSL2 - revision: f4f74b71cb
||||||||||   _____ ____ ___ ____  __  __ _____      _       _
||||||||||  | ____|  _ \_ _|___ \|  \/  | ____|    | | __ _| |__  ___
|||||       |  _| | |_) | |  __) | |\/| |  _| _____| |/ _` | '_ \/ __|
|||||       | |___|  __/| | / __/| |  | | |__|_____| | (_| | |_) \__ \
||||||||||  |_____|_|  |___|_____|_|  |_|_____|    |_|\__,_|_.__/|___/
||||||||||  wf-bacterial-genomes v0.2.12
--------------------------------------------------------------------------------
Core Nextflow options
  runName             : goofy_kalam
  containerEngine     : docker
  launchDir           : /home/nanopore-catalyst/epi2melabs/instances/wf-bacterial-genomes_07513228-afc6-44a5-b9f8-494da672e466
  workDir             : /home/nanopore-catalyst/epi2melabs/instances/wf-bacterial-genomes_07513228-afc6-44a5-b9f8-494da672e466/work
  projectDir          : /home/nanopore-catalyst/epi2melabs/workflows/epi2me-labs/wf-bacterial-genomes
  userName            : nanopore-catalyst
  profile             : standard
  configFiles         : /home/nanopore-catalyst/epi2melabs/workflows/epi2me-labs/wf-bacterial-genomes/nextflow.config, /home/nanopore-catalyst/epi2melabs/instances/wf-bacterial-genomes_07513228-afc6-44a5-b9f8-494da672e466/demo.config
Input Options
  fastq               : /home/nanopore-catalyst/epi2melabs/demo/epi2me-labs/wf-bacterial-genomes/wf-bacterial-genomes-demo/fastq
  summarise_assemblies: true
Output Options
  out_dir             : /home/nanopore-catalyst/epi2melabs/instances/wf-bacterial-genomes_07513228-afc6-44a5-b9f8-494da672e466/output
!! Only displaying parameters that differ from the pipeline defaults !!
--------------------------------------------------------------------------------
If you use epi2me-labs/wf-bacterial-genomes for your analysis please cite:
* The nf-core framework
  https://doi.org/10.1038/s41587-020-0439-x
--------------------------------------------------------------------------------
This is epi2me-labs/wf-bacterial-genomes v0.2.12.
--------------------------------------------------------------------------------
Checking fastq input.
Barcoded directories detected.
Running Denovo assembly.
[1a/dc8277] Submitted process > calling_pipeline:prokkaVersion
[41/fbfb49] Submitted process > calling_pipeline:concatFastq (1)
[d5/485863] Submitted process > calling_pipeline:concatFastq (2)
[0e/d5e754] Submitted process > calling_pipeline:getParams
[29/445c44] Submitted process > calling_pipeline:lookup_medaka_variant_model (1)
Error executing process > 'calling_pipeline:prokkaVersion'
Caused by:
  Process `calling_pipeline:prokkaVersion` terminated with an error exit status (1)
Command executed:
  prokka --version | sed 's/ /,/' >> "prokka_version.txt"
Command exit status:
  1
Command output:
  (empty)
Command error:
  touch: cannot touch '.command.trace': Permission denied
Work dir:
  /home/nanopore-catalyst/epi2melabs/instances/wf-bacterial-genomes_07513228-afc6-44a5-b9f8-494da672e466/work/1a/dc827712d6c17f9700b49dcaa836ba
Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line
WARN: Killing running tasks (4)
YoungMunLEE commented 1 year ago

This seems to happen when docker is not running as root. So I put the account name instead of id in runOptions = "--user \$(id -u):\$(id -g) --group-add 100" in the nextflow.config file. For example, if my account name is nanopore, runOptions = "--user \$(nanopore -u):\$(nanopore -g) --group-add 100". After fixing this, I ran it again and it worked fine.

For reference, the nextflow.config file can be found in the folder below. epi2melabs\workflows\epi2me-labs\wf-bacterial-genomes\

baynec2 commented 1 year ago

Thanks for the suggestion! I'm not sure why, but that did not work for me. I changed the runOptions as suggested which in my case was:

runOptions = "--user (nanopore-catalyst -u) :(nanopore-catalyst -g) --group-add 100"

This did change the error in the log to the following though:

Error executing process > 'calling_pipeline:prokkaVersion'
Caused by:
  Process `calling_pipeline:prokkaVersion` terminated with an error exit status (2)
Command executed:
  prokka --version | sed 's/ /,/' >> "prokka_version.txt"
Command exit status:
  2
Command output:
  (empty)
Command wrapper:
  .command.run: line 308: syntax error near unexpected token `('
Work dir:
  /home/nanopore-catalyst/epi2melabs/instances/wf-bacterial-genomes_5a53cc8b-4068-44df-bbee-d81f9a5163dc/work/b1/6c91642aedbb10b87be3ee55713c59
Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line
WARN: Killing running tasks (4)
baynec2 commented 1 year ago

I did find that changing the runOptions to the following did work for me though:

runOptions = "--user \$(id -u):\$(id -g) --group-add 100"

baynec2 commented 1 year ago

It looks like the answer @YoungMunLEE provided was showing up wrong in my browser. I suspect I should have changed the options to runOptions= "--user $(nanopore-catalyst -u):$(nanopore-catalyst -g) --group add 100

instead of runOptions = "--user (nanopore-catalyst -u) :(nanopore-catalyst -g) --group-add 100"

YoungMunLEE commented 1 year ago

After returning it to its original state, try changing it according to the homepage below.

https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user

YoungMunLEE commented 1 year ago

In my case, my account ID was nanopore, so I changed it as above. image

image