galaxyproject / galaxyproject/foundry
Source-agnostic Galaxy input collection-shape selection note (+ IWC survey to ground it)
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 3
- Avg merge
- 1d 22m
- Merged PRs (30d)
- 63
Description
> Filed by Claude (AI assistant) on jmchilton's behalf — not authored by them personally.
## Motivation
Exercising `freeform-summary-to-galaxy-interface` on a real free-form summary, the one decision with no reference backing was **which Galaxy input collection shape to use** — specifically plain `list` vs `sample_sheet`. The Mold's references cover the *mechanism* of shapes but not the *choice*:
- `galaxy-sample-sheet-collections` — thorough on **how** sample sheets work (variants, column vocab, map-over column-loss), but framed as *translating an nf-schema sheet* ("the natural landing zone for `samplesheetToList`"). Wrong altitude and wrong source for a freeform/paper start.
- `galaxy-collection-semantics` — the formal spec, not a decision aid (and currently mis-cast — see the companion-files bug issue).
- `galaxy-paired-or-unpaired-collections` — precedent for a **single-axis decision note**, but only covers paired-vs-unpaired.
The Nextflow interface Mold *does* have shape-decision guidance: `nextflow-to-galaxy-channel-shape-mapping`. PR #264 deliberately excluded it from the freeform path as Nextflow-specific, and nothing source-agnostic replaced it. So the freeform and CWL interface Molds lost the shape-selection guidance the Nextflow path keeps.
## What I want: the document
A new source-agnostic research note, working name **`galaxy-input-collection-shape-selection`** (`content/research/`), that answers *"given a described input, which Galaxy input shape?"* independent of source format.
Proposed sections:
1. **The shape ladder** — `File` → `list` → `paired` → `paired_or_unpaired` → `sample_sheet[:paired|:paired_or_unpaired|:record]` → `record`, each with the **trigger** that selects it (stated against an abstract input description, not nf-schema/CWL/Nextflow vocabulary).
2. **`list` vs `sample_sheet` decision** — the call I had to improvise. Core rule: reach for `sample_sheet` only when per-row metadata must **survive into outputs**; otherwise a plain `list` (+ optional side metadata table) is simpler. Spell out the cost: map-over drops `column_definitions`, so carry-through needs explicit re-attachment.
3. **Identifier discipline** — preserving sample/biological identifiers through map-over (cross-links the testability note).
4. **Anti-patterns** — e.g. inventing a workflow-level `mode` select instead of `paired_or_unpaired`; flattening per-sample metadata into parallel parameter inputs.
5. **IWC grounding** — exemplar table: which corpus workflows use which shape and the input signal that drove it.
Source-agnostic by design: the existing `nextflow-to-galaxy-channel-shape-mapping` becomes (or cross-links to) a thin source adapter that maps Nextflow channel shapes onto this ladder, rather than re-deriving the decision.
## The IWC survey prompt (to ground it)
Run `/iwc-survey` with roughly:
> **Topic:** Galaxy workflow **input** collection-shape choices across the IWC corpus.
> For each workflow's declared `inputs:`, record the input collection_type used — `data`/File, `list`, `paired`, `list:paired`, `paired_or_unpaired`, `sample_sheet*`, `record`, nested — and the apparent input signal that motivated it (per-sample independent files, forward/reverse reads, mixed single/paired, per-sample typed metadata, heterogeneous per-sample artifacts).
> Quantify the distribution. Surface: where `sample_sheet` is used vs where a plain `list` + side metadata table was used for similar data; any workflow-level `mode`/`type` select params standing in for `paired_or_unpaired`; how sample/biological identifiers are preserved (or lost) through map-over.
> Cite exemplars as abstract IWC IDs + input labels. Separate corpus-observed claims from design inference.
Output is a survey research note (corpus evidence trail), exactly as the testability note has `iwc-workflow-testability-survey` behind it. The decision note above is then authored *from* the survey, not from intuition.
## How it fits the ecosystem
- **Referenced by:** `freeform-summary-to-galaxy-interface` and `cwl-summary-to-galaxy-interface` (and plausibly the data-flow/template Molds), as a `research` ref with an on-demand trigger like *"when choosing any workflow input collection shape."*
- **Relationship to existing notes:** sits above `galaxy-collection-semantics` (spec) and `galaxy-sample-sheet-collections` (mechanism) as the *decision* layer; generalizes the single-axis `galaxy-paired-or-unpaired-collections`; de-couples shape-decision guidance from `nextflow-to-galaxy-channel-shape-mapping`.
- **Cast behavior:** verbatim (or condense) research ref, same path as the others — closes the freeform/CWL gap without source-coupling.
## Done when
- [ ] `/iwc-survey` note exists with a quantified input-shape distribution + exemplar citations.
- [ ] `galaxy-input-collection-shape-selection` research note authored from the survey.
- [ ] Wired into the freeform + CWL interface Molds (and re-cast); validate clean.
- [ ] `nextflow-to-galaxy-channel-shape-mapping` cross-links to it rather than duplicating the decision.
## Suggested labels
`enhancement`, `agent/research`, `priority/mvp`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.