Fix gate selection - #3
Conversation
| frequencies — but it would otherwise contribute a rank-less term to both sums of the | ||
| weighted mean, which is precisely the arithmetic clause 2 confines to collected gates. | ||
| """ | ||
| return reads.filter(pl.col(COL_GATE).is_in(list(params.gate_ranks))) |
There was a problem hiding this comment.
Unmatched gates produce empty success
When a direct CLI invocation supplies a non-empty gateRanks map whose keys match none of the current gate values, selected_gates removes every row and the pipeline exits successfully with an empty conditions manifest and no score files instead of rejecting the stale selection.
Prompt To Fix With AI
This is a comment left during a code review.
Path: software/src/pipeline.py
Line: 88
Comment:
**Unmatched gates produce empty success**
When a direct CLI invocation supplies a non-empty `gateRanks` map whose keys match none of the current gate values, `selected_gates` removes every row and the pipeline exits successfully with an empty `conditions` manifest and no score files instead of rejecting the stale selection.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| of the run, and the ranks close up behind it. Seeded with every value the column | ||
| carries, because a run that uses all of them should need no editing. --> | ||
|
|
||
| <PlAccordion v-if="app.model.data.gateOrder.length > 0" multiple> |
There was a problem hiding this comment.
Empty selection hides recovery controls
Removing the final gate makes this v-if hide the entire gate-order editor while validation requires at least one gate, forcing the user to clear and reselect the gate column just to restore the list.
Prompt To Fix With AI
This is a comment left during a code review.
Path: ui/src/components/SettingsDrawer.vue
Line: 154
Comment:
**Empty selection hides recovery controls**
Removing the final gate makes this `v-if` hide the entire gate-order editor while validation requires at least one gate, forcing the user to clear and reselect the gate column just to restore the list.
---
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!
Greptile Summary
This PR changes gate order from a complete ranking of every gate-column value into a selectable binding ladder, filtering unselected gates before validation and scoring. It also updates model validation, UI guidance, documentation, and integration coverage.
Important touched terms
gateRanks.Confidence Score: 4/5
The empty-run path should be rejected before merging because stale or unmatched CLI gate selections currently appear to complete successfully without producing any analysis.
The new pre-scoring filter can remove every read before retained conditions are derived, and neither the CLI parameter parser nor pipeline rejects the resulting empty analysis; the UI also lacks an in-place recovery control after removing every gate.
Files Needing Attention: software/src/pipeline.py, ui/src/components/SettingsDrawer.vue
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Reads and gateRanks] --> B[Filter to selected gates] B --> C[Derive retained conditions] C --> D[Validate samples and sort fractions] D --> E[Compute per-condition gate-rank means] E --> F[Write score files and manifest] B -->|No matching rows| G[Empty retained-condition list] G --> H[Successful empty manifest]Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "Fix gate selection" | Re-trigger Greptile
Context used: