epi2me-labs / wf-artic

ARTIC SARS-CoV-2 workflow and reporting
https://labs.epi2me.io/
Other
47 stars 34 forks source link

[Bug]: Error `Trace file already exists` when rerunning command after failure #71

Closed corneliusroemer closed 1 year ago

corneliusroemer commented 1 year ago

What happened?

When I run nextflow run epi2me-labs/wf-artic -r v0.3.18 --fastq data/barcode01.fastq.gz --scheme_version Midnight-ONT/V3 after I had e.g. asked for --help I get the following error and no help/tip on how to avoid it other than manually deleting the trace file every time:

❯ nextflow run epi2me-labs/wf-artic -r v0.3.18 --fastq  data/barcode01.fastq.gz  --scheme_version Midnight-ONT/V3        
N E X T F L O W  ~  version 22.10.1
Launching `https://github.com/epi2me-labs/wf-artic` [infallible_goldberg] DSL2 - revision: a60a1e1e73 [v0.3.18]
Trace file already exists: /Users/corneliusromer/code/wf-artic/output/execution/trace.txt

Is there not a better way to add a flag to auto delete the trace file like in Snakemake where you can --force-run execution or --unlock the working directory.

Disclaimer: I've never run any nextflow pipelines but couldn't find help regarding this error upon googling.

Maybe this issue is relevant? https://github.com/nextflow-io/nextflow/issues/3334 There no longer seem to be rolling increments, at least for reports, maybe similar for traces.

Operating System

macOS

Workflow Execution

Command line

Workflow Execution - EPI2ME Labs Versions

NA

Workflow Execution - Execution Profile

Docker

Workflow Version

0.3.18

Relevant log output

See above
corneliusroemer commented 1 year ago

See https://bioinformatics.stackexchange.com/a/20097/12272 on how to resolve:

Rotation of report files (trace, execution, timeline etc) was removed recently (since version 22.10.0 in a762ed5). To overwrite the existing trace file you will need to add the following to your Nextflow config:

trace.overwrite = true
mattdmem commented 1 year ago

Fixed in upcoming v0.3.22