Skip to content

Fix missing roiUtils import in ROIManager#2081

Merged
turner merged 1 commit into
masterfrom
roi-region-sweep-bug
May 22, 2026
Merged

Fix missing roiUtils import in ROIManager#2081
turner merged 1 commit into
masterfrom
roi-region-sweep-bug

Conversation

@turner

@turner turner commented May 22, 2026

Copy link
Copy Markdown
Contributor

Problem

Loading dev/roi/roi.html throws:

ROIManager.js:202 Uncaught (in promise) ReferenceError: createRegionKey is not defined
    at ROIManager.renderROISet (ROIManager.js:202)

Cause

Commit 7ee891f ("Remove circular dependencies") moved createRegionKey and parseRegionKey out of ROIManager.js into js/roi/roiUtils.js. ROITable.js got the new import, but ROIManager.js — which still calls both functions (parseRegionKey at line 191, createRegionKey at line 202) — did not.

Fix

Add the missing import:

import {createRegionKey, parseRegionKey} from './roiUtils.js'

🤖 Generated with Claude Code

Commit 7ee891f ("Remove circular dependencies") moved createRegionKey
and parseRegionKey from ROIManager.js into roiUtils.js but did not add
the corresponding import to ROIManager.js, causing a ReferenceError when
rendering ROI sets (e.g. loading dev/roi/roi.html).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@turner

turner commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

Note on the failing CI check

The build check fails on a single test — testBigbed.js:185 ("clinvar") — and it is unrelated to this PR. This PR's only change is a one-line import in ROIManager.js.

1) testBigBed  clinvar:
   AssertionError: expected 3 to equal 4
   at test/testBigbed.js:185

Cause: the clinvar test downloads a live file from UCSC (https://hgdownload.soe.ucsc.edu/gbdb/hg38/bbi/clinvar/clinvarMain.bb) and asserts an exact feature count of 4 in a fixed chr22 region. ClinVar is continuously updated by UCSC, and that region now contains 3 variants. The hardcoded assertion has drifted out of date.

This was confirmed by reproducing the failure locally — the identical expected 3 to equal 4 error occurs with or without this branch's change. The last master CI run (2026-03-20) passed because the data drift happened afterward; any PR opened against igv.js today will hit the same red build.

Suggest merging this fix despite the red check, and addressing the brittle clinvar test separately (either bump the expected count or relax it to a non-exact assertion).

@turner turner merged commit 80955af into master May 22, 2026
0 of 2 checks passed
@turner

turner commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

This PR fixes the bug mentioned here:
https://groups.google.com/g/igv-help/c/s18MgOgDw2g/m/eg6yCoByAAAJ

@turner turner deleted the roi-region-sweep-bug branch May 22, 2026 20:39
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.

1 participant