Home Pattern

Galaxy: collection patterns

Choose a Galaxy collection operation or map-over recipe from the current and required data shapes.

Revised
2026-09-22
Rev
2

Galaxy: collection patterns

Choose by the collection you have and the shape the next Galaxy step needs. The linked operation pages give tool settings and pitfalls. The recipes cover several operations around map-over, where Galaxy runs a step on each collection element. The iwc-transformations-survey records the IWC evidence behind these choices.

Enter or leave a collection

  • Table to mapped elements: tabular-to-collection-by-row splits a manifest, accession list, or result table into collection elements by row or key. Choose a stable identifier column for later alignment.
  • Individual datasets to a named list: collection-build-named-bundle assembles separate outputs for publication or a collection-aware consumer. It does not concatenate their file contents.
  • Collection of tables to one long table: tabular-concatenate-collection-to-table appends rows. Decide whether to carry each element identifier into every row and whether the inputs have headers.
  • Collection of keyed value tables to one wide table: tabular-pivot-collection-to-wide makes elements into columns. Choose the missing-value fill and header behavior for downstream use. Filter empty elements first only when they can occur.
  • Known singleton collection to a dataset: collection-unbox-singleton extracts its first element. Use it only when the collection has exactly one meaningful element by construction.

Keep mapped siblings aligned

First identify what changed. Membership, order, and labels are separate decisions.

  • Empty or failed elements: collection-cleanup-after-mapover-failure drops unusable mapped outputs with the matching built-in filter. A replacement dataset preserves the slot when a later step needs the original shape, but it changes the data supplied to that step.
  • Membership: sync-collections-by-identifier takes identifiers from the collection that now defines the usable set and filters a sibling to the same names. Filtering preserves the sibling’s existing order.
  • Order: harmonize-by-sortlist-from-identifiers reorders a sibling by an identifier file when later pairing depends on order. The file must name every element, so this operation does not subset.
  • Labels only: regex-relabel-via-tabular derives and applies cleaner element identifiers when the collection structure is already right. relabel-via-rules-and-find-replace covers relabeling within a structural reshape.

After dropping elements from one mapped result, use its surviving identifiers to filter siblings before relying on per-element correspondence. Add ordering or relabeling only if the downstream step needs it.

Change the collection axes

Follow a map-over lifecycle

See also

Incoming References (6)

  • Iwc Conditionals Survey related note — Corpus survey of Galaxy conditional step usage in IWC, covering when-gates, boolean shims, and routed output selection.
  • Iwc Interval Operations Survey related note — IWC corpus survey of coordinate-aware genomic interval operations; sizing and candidate boundaries for a galaxy-interval-patterns MOC, with hold-if-thin gate.
  • Iwc Map Over Lifecycle Survey related pattern — Survey of IWC map-over lifecycle recipes, with a Nextflow-to-Galaxy crosswalk for collection construction, cleanup, reshape, reduce, and publish phases.
  • Iwc Transformations Survey related note — Corpus survey of collection-shape transformations across IWC: built-in collection ops, toolshed transformers, and the multi-step recipes that bracket map-over.
  • Nextflow: source pattern map implemented_by_patterns — Use this source-pattern map to route recurring Nextflow channel and operator idioms to Galaxy implementation patterns.
  • Nextflow: samplesheet rows to Galaxy collections implemented_by_patterns — Route Nextflow samplesheet row streams and repeated tuple inputs to Galaxy list, paired, or list:paired collections.