Skip to content

Commit 194f404

Browse files
committed
fix workflow: gate filter lookup on primaryRef.filter being set
`args.columns.getColumn("filter")` panics with "Column not found" when the bundle pool doesn't carry the "filter" key. wf.prepare only addSingle's the filter when the user picked one, so the unconditional getColumn at body time blew up for every run that didn't pick a filter (i.e. the default path). Gate the lookup + sidecar staging on the same `is_undefined(args.primaryRef.filter)` check we use in prepare so the two stay in sync.
1 parent 288f6cb commit 194f404

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

workflow/src/main.tpl.tengo

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,12 @@ wf.body(func(args) {
118118
cmd = withSidecar(cmd, "perResidueConfidence", "per_residue_confidence.tsv", "--per-residue-confidence") // R4 fallback
119119

120120
// R1 PrimaryRef.filter: single column (vs the multi-column lookups
121-
// above), so use the corresponding `getColumn` accessor.
122-
filterCol := args.columns.getColumn("filter")
123-
if !is_undefined(filterCol) {
124-
filterTsv := xsv.exportFrame([filterCol], "tsv", { mem: "1GiB", cpu: 1 })
121+
// above), so use the `getColumn` accessor. The bundle only carries
122+
// "filter" when wf.prepare actually addSingle'd it, so we gate on the
123+
// same `primaryRef.filter` undefined check; `getColumn` panics if the
124+
// key isn't in the pool.
125+
if !is_undefined(args.primaryRef.filter) {
126+
filterTsv := xsv.exportFrame([args.columns.getColumn("filter")], "tsv", { mem: "1GiB", cpu: 1 })
125127
cmd = cmd.
126128
addFile("clonotype_filter.tsv", filterTsv).
127129
arg("--clonotype-filter").arg("clonotype_filter.tsv")

0 commit comments

Comments
 (0)