Skip to content

feat(shasta): add stub block and migrate to topic channel versions#11408

Merged
HReed1 merged 7 commits into
nf-core:masterfrom
HReed1:stub-topics-shasta
May 17, 2026
Merged

feat(shasta): add stub block and migrate to topic channel versions#11408
HReed1 merged 7 commits into
nf-core:masterfrom
HReed1:stub-topics-shasta

Conversation

@HReed1
Copy link
Copy Markdown
Contributor

@HReed1 HReed1 commented Apr 29, 2026

Contribution to #4570 — Stub+Topic Channel Migration

Migrates shasta to the nf-core v4.0.1 topic channel versioning standard and adds a stub block.

Changes

  • main.nf: Replaced versions.yml / END_VERSIONS heredoc with topic channel emit (versions_shasta). Added stub block with echo "" | gzip for compressed outputs and mkdir -p ShastaRun for the results directory.
  • meta.yml: Removed legacy versions: output block; lint fixed to add versions_shasta and topics:. Restored EDAM ontology comments.
  • tests/main.nf.test: Main test uses deterministic content assertions (linesGzip, file.name); stub test uses sanitizeOutput. Added stub test case.
  • tests/main.nf.test.snap: Regenerated snapshots (2 created).

Test results (local, --profile docker)

SUCCESS: Executed 2 tests in 13.589s

Stability run: ✅ 2/2 passed

Part of the systematic migration tracked in #4570.

HReed1 added 4 commits April 29, 2026 17:11
- Converted versions.yml output to topic channel (versions_shasta)
- Removed END_VERSIONS heredoc from script block
- Added stub block with compressed outputs (echo | gzip) and mkdir for results dir
- Updated tests: deterministic content snapshots for main test, sanitizeOutput for stub
- Removed legacy versions output block from meta.yml
- Restored EDAM ontology comments

Contributes to nf-core#4570
Copy link
Copy Markdown
Contributor

@SPPearce SPPearce left a comment

Choose a reason for hiding this comment

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

This agent is trying to get around the linting complaining about the use of meta.model by adding args2. This should be done via a second input val channel instead.

Comment thread modules/nf-core/shasta/main.nf Outdated
tuple val(meta), path("*_Assembly.gfa.gz") , emit: gfa
tuple val(meta), path("ShastaRun/") , emit: results
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('shasta'), eval('shasta --version | head -n 1 | cut -f 3 -d " "'), emit: versions_shasta, topic: versions
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you simplify this version extraction into one command rather than head then cut.

Comment thread modules/nf-core/shasta/main.nf Outdated
Comment on lines -24 to -25
def args2 = task.ext.args2 ?: '--config Nanopore-Oct2021'
def prefix = task.ext.prefix ?: "${meta.id}"
def model = "${meta.model}" ?: 'Nanopore-Oct2021'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This model argument should be provided as an input channel (which may have a default set to be this string). See https://nf-co.re/docs/specifications/components/modules/general#non-file-mandatory-command-arguments

HReed1 and others added 2 commits May 15, 2026 03:56
…n sed

Addresses reviewer feedback:
- meta.model replaced with val(model) input channel per nf-core spec
  (non-file mandatory args SHOULD be value channels)
- Version extraction simplified from head|cut to single sed
- Removed args2 workaround; restored explicit --config flag
- Removed model from meta map in tests
@HReed1
Copy link
Copy Markdown
Contributor Author

HReed1 commented May 15, 2026

@SPPearce — updated, thanks for the feedback.

  • Version extraction — simplified head | cut to a single sed -n '1s/.* //p'
  • meta.modelval input channel — removed the args2 workaround entirely. Model is now a proper val model input with a 'Nanopore-Oct2021' default, per the non-file mandatory arguments spec. Removed model from the meta map in tests accordingly.

CI green across all three profiles.

@HReed1 HReed1 enabled auto-merge May 15, 2026 08:26
@HReed1 HReed1 added this pull request to the merge queue May 17, 2026
Merged via the queue into nf-core:master with commit c706e65 May 17, 2026
23 checks passed
@HReed1 HReed1 deleted the stub-topics-shasta branch May 17, 2026 14:25
manascripts pushed a commit to manascripts/modules that referenced this pull request May 21, 2026
…f-core#11408)

* Migrate shasta to topic channel versions and add stub block

- Converted versions.yml output to topic channel (versions_shasta)
- Removed END_VERSIONS heredoc from script block
- Added stub block with compressed outputs (echo | gzip) and mkdir for results dir
- Updated tests: deterministic content snapshots for main test, sanitizeOutput for stub
- Removed legacy versions output block from meta.yml
- Restored EDAM ontology comments

Contributes to nf-core#4570

* fix(shasta): replace meta.model with task.ext.args2 to satisfy main_nf_meta_key lint rule

* fix(shasta): add memory=8.GB to test config; update assertion to use versions_shasta; regenerate snap

* fix(shasta): remove redundant named-key versions snapshot assertions per migration guide

* fix(shasta): migrate meta.model to val input channel; simplify version sed

Addresses reviewer feedback:
- meta.model replaced with val(model) input channel per nf-core spec
  (non-file mandatory args SHOULD be value channels)
- Version extraction simplified from head|cut to single sed
- Removed args2 workaround; restored explicit --config flag
- Removed model from meta map in tests
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