Home Pattern

Cleanup, sync, and publish non-empty results

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

Revised
2026-05-04
Rev
1

Pattern health

warn
  • IWC exemplar anchors

    1 abstract workflow anchor declared.

  • Foundry verification fixture

    No structural verification fixture yet.

  • Pattern map coverage

    1 pattern map link here.

  • Metadata contract

    Pattern frontmatter matches the site contract.

Cleanup, sync, and publish non-empty results

Use this recipe when a mapped search, extraction, or classification can produce empty per-element outputs and downstream reports should only run when useful results remain.

The key decision is that cleanup is not enough. If sibling collections still represent the original sample set, they must be filtered, sorted, or relabeled to match the cleaned result collection before downstream map-over or report export.

Recipe

  1. Map the domain tool over the input collection.
  2. Drop empty/failed element outputs so the cleaned collection contains only usable results. Use replacement only when preserving shape is more important than defining a result-set truth mask.
  3. Extract identifiers from the cleaned collection that now represents the usable result set.
  4. Filter sibling collections to match those identifiers; add sorting or relabeling only when the downstream consumer needs order or label harmonization.
  5. Derive a whole-result non-empty boolean with the vetted collection-to-boolean chain when report/export tools should not run on empty collections.
  6. Gate report or export steps with Galaxy when conditions.

Reach For This When

  • “No hits” is valid for some samples but breaks downstream aggregation.
  • A cleaned result collection must stay aligned with sequence, metadata, or classification sibling collections.
  • Final reports should be omitted when there is no meaningful result to publish.

Operation Handoffs

Pitfalls

  • Do not filter sibling inputs from the original collection when the cleaned result collection is the truth set.
  • Do not assume identifier sync also guarantees order sync.
  • Do not gate per-element routing with Galaxy when; use filters/classifiers for per-element behavior and reserve when for step-level gates.

See Also

IWC exemplars1 anchor

IWC Exemplars

amplicon/amplicon-mgnify/mgnify-amplicon-pipeline-v5-rrna-prediction/mgnify-amplicon-pipeline-v5-rrna-predictionhigh

Filters empty mapped BED outputs, syncs sibling collections from cleaned identifiers, then gates Krona and BIOM exports.

Incoming References (4)