Repository navigation
fix(runall): wire --methylation-mode/--ref into the fused filter stage - #944
Conversation
The Stage::Filter arm of build_stage_options_bag never threaded the top-level --methylation-mode / --ref into the filter stage the way the Simplex/Duplex arms do, so runall's methylation-aware filter option --min-conversion-fraction was unreachable: the chain builder's filter.validate_parameters() saw MethylationMode::Disabled and rejected a legitimately-set --methylation-mode. Thread the resolved methylation mode (and, when methylation is requested, the top-level reference) into the filter stage before validation. Filter consumes --methylation-mode only through --filter::min-conversion-fraction (the sole filter option whose check reads the resolved mode), so the dead-flag guard treats a filter chain as a methylation consumer only when that option is set — a bare --methylation-mode on a filter chain stays rejected as inert rather than silently accepted. The projected --filter::ref is preserved when no top-level --ref is given. Rename the methylation-gated reference helper consensus_reference -> methylation_reference now that filter also uses it. Add unit tests for the injection, the --filter::ref fallback, and both directions of the dead-flag guard (consuming vs inert), plus an end-to-end fused consensus->filter parity test that runs a methylation filter through runall and matches the staged standalone chain.
|
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Essentials Run ID: 📒 Files selected for processing (2)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. WalkthroughRunall now propagates top-level methylation mode and references to filter stages. Validation accepts methylation for conversion-fraction filtering and rejects inert filter-only usage. Tests cover precedence and fused versus staged execution. ChangesMethylation wiring
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Runall
participant SimplexConsensus
participant Filter
participant StagedPipeline
Runall->>SimplexConsensus: apply top-level methylation mode and reference
SimplexConsensus->>Filter: pass consensus output
Runall->>Filter: inject top-level methylation options
Filter-->>Runall: return fused filtered output
StagedPipeline->>SimplexConsensus: run consensus stage
StagedPipeline->>Filter: run filter with matching options
Filter-->>StagedPipeline: return staged filtered output
Runall->>StagedPipeline: compare records and headers
Merge Risk: ⚪ Minimal · up to Runall now forwards top-level methylation settings to fused filter stages while preserving reference precedence and rejecting inert flags. The supplied coverage shows the fused and staged paths agree, with no merge-blocking risk remaining. 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
Comment |
|
@coderabbitai pause |
✅ Action performedReviews paused. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #944 +/- ##
==========================================
- Coverage 94.38% 94.37% -0.01%
==========================================
Files 304 304
Lines 150599 150713 +114
==========================================
+ Hits 142144 142239 +95
- Misses 8455 8474 +19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
fgumi runall's fused filter stage silently dropped the top-level--methylation-mode/--ref, so runall's methylation-aware filter option--filter::min-conversion-fractionwas unreachable.build_stage_options_bag'sStage::Filterarm never threaded those flags into the filter stage the way the Simplex/Duplex arms do, so the chain builder'sfilter.validate_parameters()sawMethylationMode::Disabledand rejected a legitimately-set--methylation-mode— a fused… → filterchain with--methylation-mode em-seqfailed with "requires --methylation-mode to be set" even though it was set.What changed
Stage::Filterarm now injects the resolvedmethylation_modeand, when methylation is requested, the top-level reference into the projected filter options before validation (mirrors the Simplex/Duplex arms). A user-supplied--filter::refis preserved when no top-level--refis given.--methylation-modeonly through--filter::min-conversion-fraction(the one filter option whose check reads the resolved mode;--require-strand-methylation-agreementand--min-methylation-depthuse the reference/methylation tags but not the mode). So the up-front dead-flag guard treats a filter chain as a methylation consumer only when that option is set — a bare--methylation-modeon a filter chain stays rejected as inert rather than being silently accepted as a no-op.consensus_reference→methylation_reference, now that the filter stage uses it too.Tests
--filter::reffallback, and both directions of the dead-flag guard (live when--filter::min-conversion-fractionis set; rejected-as-inert otherwise).consensus → filterparity test that runs a methylation filter throughrunalland asserts record + header equivalence against the staged standalonesimplex+filterchain.Risk: grouping output: none; consensus output: yes for methylation-aware fused
runall, pinned by staged-chain parity tests; sort order: none; corrected UMI output: none; metrics output: none.unsafe: none; CLAUDE.md allowlist: unchanged. Memory bounds, queue capacity, and thread/backpressure policy: none.--methylation-modeand--refinto fused filter stages.--filter::refwhen no top-level reference is set.consensus_referencetomethylation_reference.