Skip to content

Phase 4 — Interactive Gating #4

Description

@hypercompetent

Part of the PyQt → Dash/Plotly migration. See cytoflowweb/PLAN.md for full context.

Estimated effort: 2–3 weeks
Depends on: Phase 2 (#2), Phase 3 (#3)

Tasks

  • Threshold gate: dcc.Graph clickData callback → updates numeric input; vertical line rendered as go.layout.Shape
  • Range gate: dcc.RangeSlider below the plot, or Plotly dragmode='select' + selectedData.range.x
  • 2D range / quad gates: Plotly dragmode='select' → box-select → selectedData.range
  • Lasso gate: Plotly dragmode='lasso'selectedData.lassoPoints → inverse-scale transform → PolygonOp vertices
  • Gate overlay rendering: committed gate drawn as a closed go.layout.Shape path overlaid on the plot

Gate mechanism summary

Gate type Plotly/Dash mechanism
Threshold clickDatago.layout.Shape vertical line
Range (1D) dcc.RangeSlider or dragmode='select' + selectedData.range.x
Rectangle / Quad (2D) dragmode='select'selectedData.range
Non-rectangular (replaces PolygonOp) dragmode='lasso'selectedData.lassoPoints.{x,y}

Notes

  • Lasso coordinates arrive in pre-transformed (scale) space. Apply scale.inverse() before passing vertices to PolygonOp — the op itself is unchanged.
  • Gate overlays rendered as go.layout.Shape objects sit on top of the plot data.
  • An optional "refine gate" editable vertex table can be added as a follow-on enhancement.

Milestone

All gate types work end-to-end. Lasso gate commits on mouseup and triggers pipeline re-run downstream.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions