fix-fig5-sweepga-redraw-coordinate-style

Fix Fig5 sweepGA redraw coordinate and style

Metadata

Statusdone
Assignedagent-2569
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-06-19T14:59:56.593310999+00:00
Started2026-06-19T15:01:40.076028160+00:00
Completed2026-06-19T15:11:02.779546883+00:00
Tagspedigree, fig5, sweepga, redraw, fix, eval-scheduled
Eval score0.92
└ blocking impact0.95
└ completeness0.93
└ constraint fidelity0.25
└ coordination overhead0.87
└ correctness0.94
└ downstream usability0.92
└ efficiency0.89
└ intent fidelity0.88
└ style adherence0.93

Description

Fix the Fig5 sweepGA 1:1 inspection redraw. The first redraw is not acceptable: it is illegible and contains plotting-coordinate errors. Produce a corrected author-facing redraw; do not edit the manuscript or replace the submitted Fig. 5 asset.

Observed failures to fix:

  1. Coordinate bug: scripts/pedigree/plot_fig5_sweepga_1to1_redraw.py treated the odgi PAF column 2 (fields[1]) as the full 500 kb query flank length. In these odgi PAFs, column 2 is not usable as the 500 kb plotting denominator: rows show coordinates such as qstart=69722, qend=122813 while fields[1]=41248. The generated conservative_segments.tsv therefore contains invalid rows such as query_start=56490, query_end=41248, and the SVG has rectangles with x coordinates far beyond the viewBox (x max around 3441 for a 1372-wide SVG). This is the source of the little fragments off the right-hand side.
  2. Visual encoding failure: the many target-arm colors are impossible to read. Do not color every target arm with a separate rainbow. Use a restrained, paper-like encoding: same-arm/background mappings in light gray, interchromosomal candidate mappings in one strong color or a very small fixed palette, with text/labels rather than rainbow decoding when needed.
  3. Format mismatch: the output should visually resemble the existing pedigree/Fig. 5 logic, not become a dense all-arm diagnostic heat strip. Keep it compact and readable for author inspection.

Required corrective work:

  1. Inspect the existing paper Fig. 5 asset (submission/fig/MainFigures/Fig5_pedigree_untangle.pdf) and any prior figure source/report to identify the basic formatting and visual logic.
  2. Keep the conservative filtering path from the previous task: native odgi untangle m1000 n4 PAF -> keep nb:i:1 -> sweepga --num-mappings 1:1 --scaffold-jump 0.
  3. Fix coordinate parsing. Use a correct 0-500 kb child/query coordinate system for each subtelomeric flank. Derive the flank span from the query path name coordinates when possible (e.g. ...:9503-509502... implies 500 kb), or from max observed query coordinates with explicit documentation. Do not use PAF fields[1] as the plotting denominator unless independently validated.
  4. Do not clamp qend to the incorrect PAF length field. Drop or fix any row where qend <= qstart. All plotted/coalesced rows must have 0 <= query_start < query_end <= query_length, with query_length near 500000 for these flanks.
  5. Clip all SVG/PDF rectangles to their track bounds. Add a validation check that no rectangle has x < panel start or x+width > panel end, except for a tiny floating-point tolerance.
  6. Replace the many-color target-arm palette with a readable design. Suggested default: light gray for same-chromosome/same-arm mappings, muted neutral for same-chromosome off-arm if present, one red/purple color for interchromosomal candidate mappings, and optional small labels for target arm on major candidate blocks only. Avoid target-arm rainbow legends.
  7. Regenerate corrected outputs under paper_prep/_brainstorming/fig5_sweepga_1to1_redraw/, preserving the old bad output only if renamed clearly as superseded/bad; preferably overwrite the previous plot with corrected files and document the fix in README.
  8. Update scripts/pedigree/plot_fig5_sweepga_1to1_redraw.py so it regenerates the corrected plot from repo root.
  9. Update README/summary counts with a short note explaining the coordinate bug in the superseded plot and the corrected coordinate basis.

Validation:

  • python3 scripts/pedigree/plot_fig5_sweepga_1to1_redraw.py --force runs from repo root.
  • conservative_segments.tsv has zero rows with query_end <= query_start, query_start < 0, or query_end > query_length.
  • Query lengths are derived correctly for 500 kb flanks, not all collapsed to 41248.
  • SVG viewBox/geometry validation reports zero off-panel rectangles.
  • The corrected SVG/PDF are visually readable: no rainbow target-arm color explosion and no fragments off the right side.
  • Conservative plotted PAF rows are all nb:i:1.
  • git diff -- submission/paper.tex submission/fig/MainFigures/Fig5_pedigree_untangle.pdf is empty.
  • Commit with WG provenance message, e.g. fix: fig5-sweepga-redraw-coordinate-style (agent-NNN).

Depends on

Required by

Log