igvteam / igv.js

Embeddable genomic visualization component based on the Integrative Genomics Viewer
MIT License
648 stars 229 forks source link

Feature not searchable when first loaded #1481

Open julianstanley opened 2 years ago

julianstanley commented 2 years ago

Small glitch, I think:

When I first load a genome browser with a bed annotation file and try to search for a gene, the gene isn't found.

If I zoom-in and zoom back out, the search works as-expected.

Here's a video of the behavior:

https://user-images.githubusercontent.com/22749289/160628389-adc44025-d19a-45d6-abfa-a37ff93e9f4f.mov

Live genome browser here: https://web.mit.edu/julianst/www/rend/browsers/test.html

jrobinso commented 2 years ago

Thanks for the test case, this was puzzling. The problem is you have a visibility window set, so no features are loaded until you zoom in past that window. Note the message "Zoom in to see features". This is normally used with indexed files. I'm undecided at the moment if "searchable" and "visibilityWindow" should be an invalid combination, but I think it probably should be. For the time being remove the "visibilityWindow" property and it should work.

julianstanley commented 2 years ago

Oh, interesting--yes, that fixes it, thank you!