Skip to content

Expose keep-last-N (and event count) under --warpdemux-compat so window width can be tuned #157

Description

@jayhesselberth

--warpdemux-compat hardcodes "110 t-test events, keep last 25". There is no way to vary the retained window without leaving compat mode entirely — and leaving it destroys the signal, so the effect of window width is currently unmeasurable.

Why this matters

In rnabioco/escapepod-models the 25-feature fingerprint is the accuracy ceiling for barcode classification: training volume is saturated (9.6x data buys +0.5pp) and soft labels are refuted, leaving "richer features / wider window" as the one untested lever. Our discriminability with compat mode is 0.374 against WarpDemuX's own reference of 0.43, so there may be headroom in the representation.

The problem, measured

I tried to test a wider window by leaving compat mode (--num-segments 50 --window-width 12). It collapses to chance:

arm features balanced recall@100
--warpdemux-compat (25 means) 25 0.9824
--warpdemux-compat --emit-dwell 50 0.9829
--num-segments 50 --window-width 12 50 0.2616
same + --emit-dwell 100 0.2598

0.26 on 4 classes is chance. The cause is that the non-compat path fingerprints a fixed sample range (--segment-start 1000 --segment-end 2000 defaults) rather than the boundary-anchored adapter that compat mode uses, so it is not a wider window — it is a different, signal-free region. That matches escapepod-models' earlier discriminability ladder (escpod default ≈ 0.03–0.078 vs compat 0.374).

So the two modes are not on a continuum, and "does a wider window help?" cannot currently be answered.

Ask

Expose the compat-mode constants as options, defaulting to today's values so nothing changes unless asked:

  • --wdx-keep-last <N> (default 25) — how many trailing event means are retained
  • --wdx-num-events <N> (default 110) — t-test event count

Equivalently, let --segment-start/--segment-end be specified relative to adapter_end so the non-compat path can address the same boundary-anchored region.

Either would make the window a measurable axis rather than a hardcoded constant.

Aside: --emit-dwell works, and is a clean null

For the record, since it may save someone else the experiment: --warpdemux-compat --emit-dwell composes correctly (51 columns, fp_0..24 + dwell_0..24). On 33,438 training reads / 11,145 paired test reads it made no difference — +0.0006 balanced recall, McNemar p=0.34. Dwell time is orthogonal to segment means in principle, but for these RNA004 tRNA barcodes it carries no additional class signal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions