Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MEGAHIT process on resume #516

Merged
merged 4 commits into from
Sep 27, 2023
Merged

Fix MEGAHIT process on resume #516

merged 4 commits into from
Sep 27, 2023

Conversation

prototaxites
Copy link
Contributor

@prototaxites prototaxites commented Sep 27, 2023

It turns out that when resuming a Nextflow pipeline, a work directory will be re-used if all the same input conditions (file names, sizes, timestamps, parameters, etc.) are met: https://training.nextflow.io/basic_training/cache_and_resume/#how-resume-works

When run, Megahit creates a directory called MEGAHIT. Occasionally, when resuming the pipeline after a Megahit failure, the same work directory is used. As it has previously been used, the directory still exists. The Megahit process then fails as it detects this directory, which it wants not to exist.

MEGAHIT has a force overwrite option, but I think just deleting the MEGAHIT directory on detection at the start of the script is more robust and less likely to result in some error I haven't thought of.

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/mag branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

@github-actions
Copy link

github-actions bot commented Sep 27, 2023

nf-core lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 6ce28af

+| ✅ 158 tests passed       |+
#| ❔   1 tests were ignored |#
!| ❗   3 tests had warnings |!

❗ Test warnings:

  • pipeline_todos - TODO string in main.nf: Remove this line if you don't need a FASTA file [TODO: try and test using for --host_fasta and --host_genome]
  • pipeline_todos - TODO string in WorkflowMag.groovy: Optionally add in-text citation tools to this list.
  • pipeline_todos - TODO string in methods_description_template.yml: #Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline

❔ Tests ignored:

  • files_unchanged - File ignored due to lint config: lib/NfcoreTemplate.groovy

✅ Tests passed:

Run details

  • nf-core/tools version 2.10
  • Run at 2023-09-27 15:49:10

@prototaxites prototaxites merged commit fa9f1dc into nf-core:dev Sep 27, 2023
15 checks passed
@jfy133 jfy133 mentioned this pull request Oct 9, 2023
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants