Skip to content

feat: add topic version emission to quant-related modules#10931

Merged
pinin4fjords merged 1 commit intomasterfrom
feat/topic-versions-quant-modules
Mar 17, 2026
Merged

feat: add topic version emission to quant-related modules#10931
pinin4fjords merged 1 commit intomasterfrom
feat/topic-versions-quant-modules

Conversation

@pinin4fjords
Copy link
Member

@pinin4fjords pinin4fjords commented Mar 17, 2026

Summary

  • Convert custom/tx2gene, tximeta/tximport, and summarizedexperiment/summarizedexperiment to emit versions via topic: versions channels
  • Update meta.yml files with topics section and updated version output descriptions

This enables downstream subworkflows (e.g. quant_tximport_summarizedexperiment) to collect versions automatically via topic channels instead of manual ch_versions.mix(), which is needed for conditional execution paths like #10928.

Follows the pattern I observed in #10873 for templated modules.

Test plan

  • Existing module tests pass (snapshot update expected for versions format)
  • process.out.versions still works in tests (emit is preserved alongside topic)

🤖 Generated with Claude Code

Convert custom/tx2gene, tximeta/tximport, and
summarizedexperiment/summarizedexperiment to emit versions via
topic channels, enabling automatic version collection in
downstream subworkflows.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Member

@maxulysse maxulysse left a comment

Choose a reason for hiding this comment

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

wait

output:
tuple val(meta), path("*tx2gene.tsv"), emit: tx2gene
path "versions.yml" , emit: versions
path "versions.yml" , emit: versions, topic: versions
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
path "versions.yml" , emit: versions, topic: versions
path "versions.yml" , emit: versions_tx2gene, topic: versions

Copy link
Member

Choose a reason for hiding this comment

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

that's the pattern

@maxulysse maxulysse self-requested a review March 17, 2026 10:48
Copy link
Member

@maxulysse maxulysse left a comment

Choose a reason for hiding this comment

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

Nevermind, we agreed on a decision.

So versions.yml emitted via template are sent to the versions topics and emitted via versions only.

@pinin4fjords
Copy link
Member Author

Thanks @maxulysse !

@pinin4fjords pinin4fjords added this pull request to the merge queue Mar 17, 2026
@maxulysse maxulysse mentioned this pull request Mar 17, 2026
17 tasks
Merged via the queue into master with commit a6c47e7 Mar 17, 2026
66 checks passed
@pinin4fjords pinin4fjords deleted the feat/topic-versions-quant-modules branch March 17, 2026 10:53
pinin4fjords added a commit that referenced this pull request Mar 17, 2026
…view issues

- Remove ch_versions collection and versions emit from all three quant
  subworkflows (versions now handled via topic channels from #10931)
- Remove `def` keyword from channel variable declarations for consistency
- Add comment explaining why .first() is safe for tx2gene discovery

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ctuni pushed a commit to ctuni/modules that referenced this pull request Mar 17, 2026
)

Convert custom/tx2gene, tximeta/tximport, and
summarizedexperiment/summarizedexperiment to emit versions via
topic channels, enabling automatic version collection in
downstream subworkflows.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pinin4fjords added a commit to pinin4fjords/nf-core-modules that referenced this pull request Mar 17, 2026
Add an optional skip_merge boolean input to quant_tximport_summarizedexperiment,
quantify_pseudo_alignment, and quantify_rsem.

When true:
- tximport runs per-sample (preserving input meta) instead of collecting all
- SummarizedExperiment creation is skipped
- RSEM merge counts are skipped (quantify_rsem only)

When false (default), behavior is identical to before.

Additional improvements made alongside this feature:
- CUSTOM_TX2GENE now uses .first() unconditionally for transcript ID
  discovery, since it only ever reads one sample's files. This assumes
  all samples were quantified against the same transcriptome (documented
  in meta.yml). If mixed-transcriptome support is needed in future,
  tx2gene would need to run independently per sample.
- Version collection removed from all three subworkflows. The underlying
  modules now emit via topic channels (nf-core#10931), so manual ch_versions
  plumbing is no longer needed.

Used by nf-core/rnaseq --skip_quantification_merge (nf-core/rnaseq#1744).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
github-merge-queue bot pushed a commit that referenced this pull request Mar 17, 2026
#10928)

Add an optional skip_merge boolean input to quant_tximport_summarizedexperiment,
quantify_pseudo_alignment, and quantify_rsem.

When true:
- tximport runs per-sample (preserving input meta) instead of collecting all
- SummarizedExperiment creation is skipped
- RSEM merge counts are skipped (quantify_rsem only)

When false (default), behavior is identical to before.

Additional improvements made alongside this feature:
- CUSTOM_TX2GENE now uses .first() unconditionally for transcript ID
  discovery, since it only ever reads one sample's files. This assumes
  all samples were quantified against the same transcriptome (documented
  in meta.yml). If mixed-transcriptome support is needed in future,
  tx2gene would need to run independently per sample.
- Version collection removed from all three subworkflows. The underlying
  modules now emit via topic channels (#10931), so manual ch_versions
  plumbing is no longer needed.

Used by nf-core/rnaseq --skip_quantification_merge (nf-core/rnaseq#1744).

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants