Skip to content

Milab 7197 add filtered inputs - #15

Merged
mchernys merged 4 commits into
mainfrom
MILAB-7197_add-filtered-inputs
Oct 29, 2026
Merged

mchernys merged 4 commits into
mainfrom
MILAB-7197_add-filtered-inputs

Conversation

@mchernys

@mchernys mchernys commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

The PR appears safe to merge, with a non-blocking request to test the new filtered export.

Fix All in Claude CodeFindings

  1. P2 Filtered export has no tests ▶
Fix with agent prompt
### Issue 1
workflow/src/main.tpl.tengo:219-226
The new filtered export path has no regression test. The only block test checks `expect(true).toBe(true)`, so it never exercises `addPrimary` with a filter. Dropped sample metadata or excluded reads reaching the analysis could go unnoticed.

Add a test with selected and excluded variants. Check that `reads.tsv` contains only selected variants and keeps their condition and gate values. Also check the unfiltered path.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds an optional subset alongside the dataset selection. The workflow filters reads before scoring and marks result columns with the subset's identity.

  • Sort-Seq Analysis can score reads from a selected dataset subset.

Important touched types:

Term Definition Change
BlockData Saved settings that the user edits. Adds optional filterRef for the chosen subset column.
BlockArgs Values passed from the model to the workflow. Adds optional inputFilter, containing the subset column's canonical ID.
DatasetOption An option offered by the dataset picker. Replaces the previous abundance option shape and includes available subsets.
DatasetSelection The dataset and optional filter currently selected in the picker. Now connects PlDatasetSelector to the saved abundance and filter references.
PlRef A reference to a column supplied by a block. Now also identifies the selected subset through filterRef.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Picker[Dataset picker] --> Dataset[Abundance column]
  Picker --> Filter[Optional subset column]
  Dataset --> Export[Export reads]
  Filter --> Export
  Metadata[Sample metadata] --> Export
  Export --> Score[Score selected reads]
  Score --> Results[Build result columns]
  Filter --> Identity[Subset domain and trace]
  Identity --> Results
Loading

Reviews (1) · Last reviewed commit: "MILAB-7197: forward only the filter's tr..." · Reviewed by Greptile

Comment on lines +219 to +226
readsBuilder = pframes.tableBuilder("tsv").setColumnJoin("left")
readsBuilder.setAxisHeader(sampleAxisSpec.name, "sampleId")
readsBuilder.setAxisHeader(variantAxisSpec.name, "variantKey")
readsBuilder.addPrimary("main", {
__isPrimaryRef: "v1",
column: columns.getColumn("main"),
filter: filterColumn
}, { header: "reads" })

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Filtered export has no tests

The new filtered export path has no regression test. The only block test checks expect(true).toBe(true), so it never exercises addPrimary with a filter. Dropped sample metadata or excluded reads reaching the analysis could go unnoticed.

Add a test with selected and excluded variants. Check that reads.tsv contains only selected variants and keeps their condition and gate values. Also check the unfiltered path.

Prompt To Fix With AI
This is a comment left during a code review.
Path: workflow/src/main.tpl.tengo
Line: 219-226

Comment:
**Filtered export has no tests**

The new filtered export path has no regression test. The only block test checks `expect(true).toBe(true)`, so it never exercises `addPrimary` with a filter. Dropped sample metadata or excluded reads reaching the analysis could go unnoticed.

Add a test with selected and excluded variants. Check that `reads.tsv` contains only selected variants and keeps their condition and gate values. Also check the unfiltered path.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code

@mchernys
mchernys merged commit d002426 into main Oct 29, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants