Skip to content

Move self-contained channel construction into PIPELINE_INITIALISATION#1032

Open
erikrikarddaniel wants to merge 5 commits into
nf-core:devfrom
erikrikarddaniel:convert-param-handling
Open

Move self-contained channel construction into PIPELINE_INITIALISATION#1032
erikrikarddaniel wants to merge 5 commits into
nf-core:devfrom
erikrikarddaniel:convert-param-handling

Conversation

@erikrikarddaniel

@erikrikarddaniel erikrikarddaniel commented Jul 24, 2026

Copy link
Copy Markdown
Member

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/ampliseq 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).

Description

Part of #1029: moves the params that are used only to construct a channel (with no other logic depending on how it's built) out of workflows/ampliseq.nf and into PIPELINE_INITIALISATION, threading them down through NFCORE_AMPLISEQ -> AMPLISEQ as explicit take:/emit: arguments instead of reaching into global params directly.

  • Moves 9 channels: metadata, report_template/report_css/report_logo/report_abstract, pplace_sheet's initial value, expected_sequences/expected_abundances, metadata_category.
  • Pure plumbing refactor, no behavior change.
  • Adds a second test case to tests/default.nf.test for --report_abstract and --metadata_category, the two params among these that weren't exercised by any existing test profile.
  • Also includes an unrelated fix: the vendored cutadapt module's stub: block referenced ${outformat} without ever assigning it (only script: did), breaking -stub-run.

Deliberately out of scope for this PR (left for follow-up): the remaining scalar params.X reads in workflows/ampliseq.nf, the per-classifier reference-taxonomy channels (entangled with catalog-download logic), and params.X reaches inside subworkflows/local and modules/local.

Verified: nf-test (both cases pass, no snapshot changes), nf-core pipelines lint, nextflow lint . at 26.04.0 and 26.04.6 (0 errors both), prek run -a.

The stub: block referenced ${outformat} in the process output glob but
never assigned it (only script: did), so -stub-run failed with "No such
variable: outformat". Assign it in stub: the same way script: does, and
use it in the stub output filenames for consistency with the declared
output pattern. Patch regenerated via `nf-core modules patch cutadapt`.
Part of nf-core#1029: params used only to build a channel, with no other logic
depending on how that channel is constructed, should be built once in
PIPELINE_INITIALISATION and threaded down as explicit arguments rather
than workflows/ampliseq.nf reaching into global params directly.

Moves 9 such channels (metadata, report_template/css/logo/abstract,
pplace_sheet's initial value, expected_sequences/abundances,
metadata_category) through PIPELINE_INITIALISATION -> NFCORE_AMPLISEQ ->
AMPLISEQ via take:/emit:. Behavior is unchanged; this is a pure plumbing
refactor covered by the existing nf-test snapshot suite.

Adds a second test case to tests/default.nf.test for --report_abstract
and --metadata_category, the two params among these that weren't
exercised by any existing test profile.

Deliberately out of scope (left for follow-up): the ~90 remaining
scalar params.X reads in workflows/ampliseq.nf, the 6 per-classifier
reference-taxonomy channels (entangled with catalog-download logic),
and params.X reaches inside subworkflows/local and modules/local.
@erikrikarddaniel
erikrikarddaniel marked this pull request as draft July 24, 2026 18:05
nf-core core-team consensus is not to allow CLAUDE.md files in pipeline
repos, to avoid this ballooning for other agents and cluttering the
repo root. AGENTS.md remains as the single, tool-agnostic instructions
file; agent-specific loading (e.g. Claude Code treating an AGENTS.md as
if it were a CLAUDE.md) is configured per-user outside the repo instead.
@erikrikarddaniel
erikrikarddaniel marked this pull request as ready for review July 24, 2026 21:30
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.

1 participant