-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the left and right buttons go to the previous/next BED region when a BED file is selected #354
Comments
I need to add a sequence of steps that can be used to reproduce this issue before it can actually be fixed. |
To reproduce this issue:
You will get an error:
Instead of letting this happen, we should probably look in the BED file for a next or previous region, and jump to that instead. In this particular BED file there is just one region, so we should grey out the next/previous buttons since we are at the first region and we are at the last region. We also get the same error if, having visited |
The BED regions are stored in the state here: sequenceTubeMap/src/components/HeaderForm.js Lines 41 to 43 in e70b93c
We need to add a better comment, but this holds We would want to see if a region from the BED is selected by matching the region field against the regions (maybe with the same logic we use to know to show the tooltip description), and move to the next region in the file. (Maybe by incrementing/decrementing the index, but we could also try and do a search in genome coordinates.) Maybe we should lift some code out of |
For implementation, so far we have a function from region string to index in the collection of available regions, if present. The buttons need to:
|
If a BED subregion contains a
tracks.json
that doesn't point at files the server is allowed to use (because e.g. it was extracted from a larger graph that is not available on the web), we should figure this out and stop the user from trying to use that file.For example, we should turn off the left and right buttons, because we know we won't be able to fetch a different set of coordinates (or we could make them go left/right to the next/previous region in the BED file).
We should also stop the user from going to coordinates not represented in the BED with a premade chunk, if they don't actually have a set of tracks that we could fetch the region from.
(Maybe we want to handle this by allowing empty/null track files in
tracks.json
in a BED region? Then we can use null by default in the extraction scripts, and you could make sure to fill in the paths manually if you want a BED with pre-extracted regions but also a real backing graph.)The text was updated successfully, but these errors were encountered: