Skip to content

Show gene background colors in six-frame display - #870

Merged
garrettjstevens merged 4 commits into
GMOD:mainfrom
YashAnand69:fix/six-frame-gene-background-oct27
Oct 30, 2026
Merged

garrettjstevens merged 4 commits into
GMOD:mainfrom
YashAnand69:fix/six-frame-gene-background-oct27

Conversation

@YashAnand69

Copy link
Copy Markdown
Contributor

Fixes #694.

The six-frame display always painted a gene's central background with the theme paper color, so pseudogenes, ncRNA genes and custom geneBackgroundColor settings were ignored. Read the existing Apollo plugin configuration with the feature type, as the standard annotation display does. Keep the existing paper fallback, selected-gene black highlight, strand patterns and geometry. No new configuration or hardcoded gene palette.

Validation:

  • Six actual-glyph regression cases: three configured-color cases fail before the change; fallback and selection controls pass. All six pass afterward. The test uses the real configuration reader with a lightweight configuration-slot/canvas fixture.
  • Full plugin suite: 49 tests and 11 snapshots pass. Plugin build, TypeScript checks, changed-file ESLint and formatting pass.
  • Actual Chromium/JBrowse six-frame local-editing check with ordinary, pseudogene and ncRNA genes: default special-type colors appear, ordinary fallback is unchanged, a custom color works, and selecting a pseudogene retains its black highlight. No page errors. No collaboration-server or full Cypress run is claimed.

Before (ordinary gene, pseudogene, ncRNA gene from left to right):

Before

After:

After

The demo uses a minimal local annotation fixture; its orange validation icons are unrelated fixture warnings. Existing six-frame opacity/stripe compositing is retained, so this does not claim pixel-identical rendering to the standard display. Selection, custom-color evidence and pixel results. Proof assets are on a separate fork branch, outside this source patch.

Codex (GPT-6) assisted with investigation, implementation, tests and validation.

Preserve the renderer and geometry changes from GMOD#871 while retaining configured gene backgrounds. Exercise the current glyph entry point and real geometry helpers in both block orientations.

Assisted-by: Codex:GPT-6
@YashAnand69

Copy link
Copy Markdown
Contributor Author

Merged current main in ad605220 to resolve the conflict with #871. The block-based renderer, rounding and row changes are preserved; the production diff remains only the configured gene-background lookup and fallback.

Updated the glyph regression to use the new draw signature and real geometry helpers in forward and reversed blocks. On current main, the three configured-color cases fail while fallback/selection controls pass. With the fix, all 60 plugin tests and 11 snapshots pass; plugin/Node type checks, changed-file lint and formatting pass. Rebuilt JBrowse browser checks against current-main and updated bundles confirm the ordinary-gene fallback, special/custom colors and selection behavior without page errors. That browser fixture covers one region; it is not a claim of a fresh full multi-region Cypress run.

Codex (GPT-6) assisted with the merge, test adaptation and validation; an independent agent reviewed the final diff.

Use the captured Linux comparison after independent review of the intended background difference. Keep the image threshold unchanged. The same targeted Linux Cypress suite passes with this baseline.

Assisted-by: Codex:GPT-6
@YashAnand69

Copy link
Copy Markdown
Contributor Author

The new-head Cypress failure was the multi-region six-frame snapshot added in #871. I reproduced it on the fork's Linux runner and inspected the captured baseline/comparison/diff with an independent review. Of 858 flagged pixels, 831 are the intended pseudogene background change; the remaining 27 are sparse text-edge antialias differences. The four other snapshots pass.

Updated only that baseline from the actual Linux capture. The threshold remains 0.03, and no test assertions, geometry or production code changed in this update. The same targeted Linux renderTrack.cy.ts suite now passes: https://github.com/YashAnand69/Apollo3/actions/runs/40845806094 . The diagnostic workflow stays on a separate fork-only branch and is not part of this PR. The full upstream checks will run on the updated contribution head.

Codex (GPT-6) assisted with the diagnosis, independent image review and baseline update.

Assisted-by: Codex:GPT-6
@garrettjstevens garrettjstevens changed the title fix: honor gene background colors in six-frame display Show gene background colors in six-frame display Oct 30, 2026
@garrettjstevens
garrettjstevens merged commit dc7a5cd into GMOD:main Oct 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LASFD: Alternative colours for different gene feature types

2 participants