Pattern Library

IWC-grounded workflow construction recipes.

Pattern maps are the entry points; operation and recipe pages are the concrete Galaxy authoring moves that Molds can reference and casts can condense.

Total
54
Maps
5

Pattern Maps

/ start here

Browse By Topic

/ tag rollups

Collection

/ 11 implementation patterns
draft operation

Collection: build named bundle

Use BUILD_LIST to assemble named outputs into a collection bundle for publishing or downstream fan-in.

rev2 revised2026-05-03
draft operation

Collection: flatten after fan-out

Use FLATTEN to collapse nested collection outputs to a flat list once the outer axis no longer matters.

rev2 revised2026-05-03
draft operation

Collection: unbox singleton

Use __EXTRACT_DATASET__ with which: first when a one-element collection must become a dataset.

rev2 revised2026-05-03

Conditional

/ 4 implementation patterns
draft recipe

Conditional: gate on non-empty result

Derive a boolean from empty or non-empty data, then use when to skip reporting or export steps.

target/galaxy
rev3 revised2026-05-03
draft operation

Conditional: run optional step

Use a workflow boolean connected as inputs.when to skip an optional Galaxy step or branch.

target/galaxy
rev4 revised2026-05-03
draft operation

Conditional: transform or pass through

Gate an optional transform, then use pick_value to pass transformed data when present or original data otherwise.

target/galaxy
rev2 revised2026-05-03

General

/ 4 implementation patterns
draft recipe

Cleanup, sync, and publish non-empty results

Clean sparse mapped outputs, keep sibling collections aligned, then gate report publishing on non-empty results.

target/galaxytopic/galaxy-transformtopic/collection-transform
rev1 revised2026-05-04
draft recipe

Fan-in bundle, consume, and flatten

Bundle parallel outputs into a collection consumer, then flatten nested results for pooled downstream processing.

target/galaxytopic/galaxy-transformtopic/collection-transform
rev1 revised2026-05-04
draft recipe

Manifest to mapped collection lifecycle

Use a manifest or table to build a collection, map a tool per row, then relabel or reshape outputs.

target/galaxytopic/galaxy-transformtopic/collection-transform
rev1 revised2026-05-04
draft recipe

Reshape, relabel, and remap by collection axis

Use Apply Rules and deterministic relabeling when domain fan-out creates the wrong map-over axis.

target/galaxytopic/galaxy-transformtopic/collection-transform
rev1 revised2026-05-04

Interval

/ 7 implementation patterns
draft recipe

Interval: build a mask by set algebra

Compute regions from regions: concatenate candidate intervals, merge into non-overlapping spans, then subtract the set to keep. The gops_* set-algebra recipe.

target/galaxytopic/galaxy-transformtopic/interval-transform
rev1 revised2026-06-10
draft operation

Interval: compute coverage

Two coverage modes: genome-wide depth as a bedgraph (genomecoveragebed) and reads counted in given regions (coveragebed). Same family, different question.

target/galaxytopic/galaxy-transformtopic/interval-transform
rev1 revised2026-06-10
draft recipe

Interval: consensus regions by multi-intersect

Find features reproducible across replicates: multi-intersect per-replicate sets, threshold by replicate count, then intersect back against the merged call.

target/galaxytopic/galaxy-transformtopic/interval-transformtopic/collection-transform
rev1 revised2026-06-10
draft operation

Interval: filter or annotate by overlap

Keep, drop, or annotate coordinate features by overlap with a second feature set; bedtools intersect (BED) or vcfvcfintersect (VCF), mapped over a collection.

target/galaxytopic/galaxy-transformtopic/interval-transform
rev1 revised2026-06-10
draft operation

Interval: merge overlapping features

Collapse overlapping or book-ended intervals within one set into single spans; bedtools mergebed or the gops_merge Operate-on-Genomic-Intervals tool.

target/galaxytopic/galaxy-transformtopic/interval-transform
rev1 revised2026-06-10
draft operation

Interval: window or flank features

Extend features by a fixed or fractional amount to build neighborhood windows, clamped to chromosome ends; bedtools slopbed with a genome file.

target/galaxytopic/galaxy-transformtopic/interval-transform
rev1 revised2026-06-10
draft recipe

Interval: windowed coverage around features

Quantify signal in fixed neighborhoods around point features: window the features (slop), collapse overlaps (merge), then count reads in each window (coverage).

target/galaxytopic/galaxy-transformtopic/interval-transform
rev1 revised2026-06-10

Parameter

/ 3 implementation patterns
draft operation

Parameter: derive from file

Read a one-value dataset with param_value_from_file, including count recipes that feed typed parameters.

target/galaxy
rev3 revised2026-05-03

Sequence

/ 6 implementation patterns
draft operation

Sequence: compute record lengths

Emit a (id, length) table from a FASTA so downstream tabular steps can filter, sort, or threshold records by length; fasta_compute_length.

target/galaxytopic/galaxy-transformtopic/sequence-transform
rev1 revised2026-06-10
draft operation

Sequence: extract or mask by region

Turn coordinates into sequence: extract FASTA at BED intervals (getfasta), mask regions by BED (maskfasta), or extract transcripts from a GFF (gffread).

target/galaxytopic/galaxy-transformtopic/sequence-transform
rev1 revised2026-06-10
draft operation

Sequence: interconvert FASTA and tabular

Move sequence records between FASTA and a (header, sequence) table so tabular tools can edit them; fasta2tab one way, tab2fasta back.

target/galaxytopic/galaxy-transformtopic/sequence-transform
rev1 revised2026-06-10
draft operation

Sequence: merge FASTA and filter unique

Concatenate several FASTA files into one and drop duplicate records by sequence identity in a single step; fasta_merge_files_and_filter_unique_sequences.

target/galaxytopic/galaxy-transformtopic/sequence-transform
rev1 revised2026-06-10
draft operation

Sequence: reformat FASTA line width

Rewrap FASTA records to a fixed sequence-line width so downstream tools and viewers get canonical 60/70/80-column output; cshl_fasta_formatter.

target/galaxytopic/galaxy-transformtopic/sequence-transform
rev1 revised2026-06-10
draft recipe

Sequence: relabel FASTA headers via tabular

Edit FASTA headers you cannot easily regex in place: fasta2tab, rewrite column 1 with find/replace, then tab2fasta back. The high-value sequence recipe.

target/galaxytopic/galaxy-transformtopic/sequence-transform
rev1 revised2026-06-10

Tabular

/ 14 implementation patterns
draft operation

Tabular: compute a new column

Use column_maker (Add_a_column1) with strict error_handling to insert/replace a computed column. Per-expression-kind auto_col_types rule.

target/galaxy
rev3 revised2026-05-03
draft operation

Tabular: concatenate collection to table

Use collapse_dataset to row-bind a collection of tabulars into one table, with optional element IDs and header dedupe.

target/galaxy
rev2 revised2026-05-03
draft operation

Tabular: cut and reorder columns

Use Cut1 with a comma-separated cN list to project — and reorder — columns. Listing out of order is the canonical reorder idiom.

target/galaxy
rev2 revised2026-05-03
draft operation

Tabular: filter rows by column value

Use Filter1 with a Python expression over cN columns to drop rows. Highest-frequency tabular row filter in IWC.

target/galaxy
rev2 revised2026-05-03
draft operation

Tabular: filter rows by regex

Use tp_grep_tool for whole-line regex row filters on tabular input. Grep1 is the legacy alternative.

target/galaxy
rev2 revised2026-05-03
draft operation

Tabular: group and aggregate

Use datamash_ops for grouped tabular aggregation: multi-column grouping, collapse, countunique, min/max, and reductions.

target/galaxy
rev2 revised2026-05-03
draft operation

Tabular: join on key

Use tp_easyjoin_tool for two-tabular key joins; use tp_multijoin_tool for many files and query_tabular for SQL joins.

target/galaxy
rev2 revised2026-05-03
draft operation

Tabular: pivot collection to wide

Use collection_column_join to outer-join a collection of 2-column id/value tables into one wide table.

target/galaxy
rev2 revised2026-05-03
draft operation

Tabular: prepend header

Use tp_awk_tool to prepend a constant header line, optionally skipping or reformatting an existing first row.

target/galaxy
rev2 revised2026-05-03
draft operation

Tabular: relabel by row counter

Use tp_awk_tool to replace each row or label with deterministic sample_N values from awk NR.

target/galaxy
rev2 revised2026-05-03
draft operation

Tabular: split taxonomy string

Use tp_awk_tool to split semicolon-delimited taxonomy strings into explicit rank columns with missing-rank handling.

target/galaxy
rev2 revised2026-05-03
draft operation

Tabular: SQL query

Use query_tabular when SQL semantics justify it: windows, joins, anti-joins, or fused project+compute over tabulars.

target/galaxy
rev2 revised2026-05-03
draft operation

Tabular: to collection by row

Use split_file_to_collection split_by:col to fan a tabular into collection elements by row/key.

rev2 revised2026-05-03