Home Source Pattern

Nextflow: grouped channel to regrouped Galaxy collection

Route Nextflow groupTuple, transpose, and grouped tuple payloads to Galaxy collection reshape patterns when the key is a real axis.

Revised
2026-05-04
Rev
1
Review Triggers
  • groupTuple uses explicit size, sort, or groupKey behavior.
  • transpose changes payload arity or relies on arbitrary tuple-record structure.
  • Group key is not a real Galaxy collection axis.
  • Grouped payload contains heterogeneous files with no shared collection element type.
  • Downstream logic depends on tuple field order rather than named identifiers.
  • Flattening would discard a grouping axis needed downstream.

Nextflow: grouped channel to regrouped Galaxy collection

Use this when Nextflow groups records with groupTuple(), reshapes grouped records with transpose(), or passes grouped tuple payloads that must become Galaxy collection structure.

Source signal

  • groupTuple() gathers records by key.
  • transpose() can expand or rotate grouped tuple payloads.
  • Grouped payloads often look collection-like, but Galaxy collections are typed axes, not arbitrary tuple records.

Translation rule

First decide whether the grouping key is a real Galaxy axis such as sample, region, segment, replicate, or method.

Decision checklist

  1. Name the group key.
  2. Name the grouped payload fields.
  3. Identify the Galaxy mapped axis needed by the next tool.
  4. Choose preserve, swap, split, flatten, unbox, or reduce.
  5. Add review if tuple shape is arbitrary or lossy.

Evidence posture

This page is grounded in existing Foundry notes that map groupTuple() and transpose() to collection reshape decisions. Direct fixture evidence was not regenerated during authoring.

Incoming References (1)

  • Nextflow: source pattern maprelated note— Use this source-pattern map to route recurring Nextflow channel and operator idioms to Galaxy implementation patterns.