Skip to content

Update mygene: topic versions, stub block, sanitizeOutput#11441

Open
HReed1 wants to merge 1 commit into
nf-core:masterfrom
HReed1:stub-topics-mygene
Open

Update mygene: topic versions, stub block, sanitizeOutput#11441
HReed1 wants to merge 1 commit into
nf-core:masterfrom
HReed1:stub-topics-mygene

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 mygene module to the nf-core v4.0.1 architecture:

  • topic: versions: Migrated to path "versions.yml", topic: versions emission. Note: mygene uses a Python template script, which prevents using the eval() tuple pattern (Nextflow blocks eval() for non-Bash interpreters). The Python template generates versions.yml natively, consistent with cellranger/count.
  • stub block: Added a deterministic stub: block that creates dummy output files and generates versions.yml via bash.
  • sanitizeOutput: Refactored all test assertions to use sanitizeOutput(process.out) per nf-test best practices.
  • meta.yml: Updated to include both output: versions_mygene and topics: versions sections.

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

Part of #4570

Comment thread modules/nf-core/mygene/main.nf Outdated
tuple val(meta), path("*.gmt"), emit: gmt
tuple val(meta), path("*.tsv"), emit: tsv , optional: true
path "versions.yml" , emit: versions
path "versions.yml" , emit: versions_mygene, topic: versions
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.

You forgot this part

Comment thread modules/nf-core/mygene/meta.yml Outdated
Copy link
Copy Markdown
Member

@mribeirodantas mribeirodantas left a comment

Choose a reason for hiding this comment

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

mygene version is missing in teh snapshot file

HReed1 added a commit to HReed1/modules that referenced this pull request May 1, 2026
…te snapshots

- main.nf: rename emit: versions to emit: versions_mygene per nf-core convention
- meta.yml: rename output key versions: to versions_mygene: to match emit name
- tests/main.nf.test: update all assertions to process.out.versions_mygene[0]
- tests/main.nf.test.snap: regenerate all 5 snapshots with versions_mygene channel

Addresses review feedback from mribeirodantas on PR nf-core#11441.
@HReed1 HReed1 enabled auto-merge May 18, 2026 23:25
@HReed1 HReed1 force-pushed the stub-topics-mygene branch from 1203b1f to 1bc1280 Compare May 18, 2026 23:51
@HReed1
Copy link
Copy Markdown
Contributor Author

HReed1 commented May 19, 2026

@mribeirodantas Thanks for the review! I've force-pushed a clean rebuild of this branch from upstream/master that addresses all of your feedback:

  1. Missing Snapshot Version: I've refactored the tests/main.nf.test assertions to use process.out.findAll { key, val -> key.startsWith('versions') }. The version tuple is now accurately captured and locked down in the snapshot file.
  2. Missing Version Tuple (main.nf:16): Since mygene uses a Python template script, Nextflow natively blocks eval() in the output: block (it throws a hard failure requiring bash). To solve this cleanly without resorting to the versions.yml or END_VERSIONS anti-patterns in the stub block, I've implemented the topic: versions channel using val("3.2.2"). This perfectly aligns with the v4.0.1 architecture since the biocontainer is strictly pinned.
  3. EDAM Comments: The # CSV and # TSV comments have been manually restored in meta.yml so they are no longer stripped by the linter!

Everything is strictly compliant with the v4.0.1 standards, lint is passing (77/77), and the cloud tests are green. Ready for another look!

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