Skip to content

Update whamg: topic versions, stub block, sanitizeOutput#11450

Open
HReed1 wants to merge 4 commits intonf-core:masterfrom
HReed1:stub-topics-whamg
Open

Update whamg: topic versions, stub block, sanitizeOutput#11450
HReed1 wants to merge 4 commits intonf-core:masterfrom
HReed1:stub-topics-whamg

Conversation

@HReed1
Copy link
Copy Markdown
Contributor

@HReed1 HReed1 commented Apr 30, 2026

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, add --profile docker,wave tests.
  • Make sure your code lints (nf-core modules lint).
  • Ensure the test suite passes (nf-test test).

Description of changes

Migrates the whamg module to the nf-core v4.0.1 architecture:

  • topic: versions: Replaced legacy versions.yml file emission with dynamic eval() tuple emission on the topic: versions channel.
  • stub block: Added a deterministic stub: block for CI/CD stub-run support.
  • sanitizeOutput: Refactored all test assertions to use sanitizeOutput(process.out) per nf-test best practices.
  • meta.yml: Updated to include both output: versions_whamg and topics: versions sections.

Part of the v4.0.1 standardization effort tracked in #11323.

Part of #4570

Comment on lines -34 to -35
path(process.out.vcf[0][1]).vcf.summary,
file(process.out.tbi[0][1]).name,
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.

vcf and tbi files are typically unstable due to differences between conda/docker/singularity.
The vcf summary command comes from the nft-vcf plugin.
Any time you see a snapshot split out like this it means you need to take special care and not just snapshot the whole process.out.
You can use unstableKeys for the tbi channel, but the vcf summary is useful to keep for showing the vcf file is not changing.

tuple val(meta), path("*.vcf.gz.tbi") , emit: tbi
tuple val(meta), path("*.txt") , emit: graph, optional: true
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('whamg'), eval('whamg 2>&1 | grep Version | sed \'s/^Version: v//; s/-.*$//\''), topic: versions, emit: versions_whamg
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 make this one sed command please.

@HReed1 HReed1 force-pushed the stub-topics-whamg branch from 32adb88 to c489f4f Compare May 1, 2026 12:07
HReed1 and others added 2 commits May 1, 2026 09:25
- main.nf: emit: versions -> emit: versions_whamg
- meta.yml: output key versions: -> versions_whamg:

Local lint: 56/0. Local nf-test: 2/2 passed.
process.out.versions
).match()
}
{ assert snapshot(sanitizeOutput(process.out)).match() }
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.

Still need to swap back to use nft-vcf for the vcf file, and the tbi is unstable

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