Skip to content

Prevent execution of gtdbtk/summary when no bins pass QC#1021

Merged
dialvarezs merged 3 commits into
nf-core:devfrom
dialvarezs:fix/gtdbtk-summary-no-qc-bins
Apr 9, 2026
Merged

Prevent execution of gtdbtk/summary when no bins pass QC#1021
dialvarezs merged 3 commits into
nf-core:devfrom
dialvarezs:fix/gtdbtk-summary-no-qc-bins

Conversation

@dialvarezs

Copy link
Copy Markdown
Member

This removes the .ifEmpty() of GTDBTK_CLASSIFYWF.out.summary to prevent running GTDBTK_SUMMARY when no summaries are available.
It also adds a warning when no bins passed QC thresholds.

Closes #981.

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 pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,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).

@dialvarezs dialvarezs changed the title Prevent running gtdbtk/summary when no bins passed QC Prevent execution of gtdbtk/summary when no bins pass QC Apr 9, 2026
Comment thread subworkflows/local/gtdbtk/main.nf Outdated
Comment thread subworkflows/local/gtdbtk/main.nf Outdated
ch_bin_qc_summary
.count()
.filter { count -> count == 0 }
.subscribe { _count ->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the subscribe do here 🤔 I never understood that operator...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

subscribe() executes a function on each output of a channel, without generating an ouput (contrary to map() that returns something)

Comment thread subworkflows/local/gtdbtk/main.nf Outdated
Comment thread subworkflows/local/gtdbtk/main.nf Outdated
Co-authored-by: Diego Alvarez S. <dialvarezs@gmail.com>
@dialvarezs dialvarezs merged commit d711344 into nf-core:dev Apr 9, 2026
23 checks passed
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