-
Notifications
You must be signed in to change notification settings - Fork 26
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
Extra horizontal space should have a coordinate bar break #405
Comments
Here's an example of the extra space from #400. |
Here are some axis break symbols: |
We probably will need to touch the |
Here's an example of a gapped axis: |
We need to invent an algorithm where we can visit each node in turn along the path that we're drawing the x axis ruler for, and determine if there's a big enough gap in x from the previous node that we would want to cut the axis line. We need to spit out a list of pairs of x coordinates between which we wan the axis line to exist. Then we can draw the axis between each of those pairs of x coordinates, and draw some vertical lines at the endpoints, and we'll get a gapped x axis. |
If we make a list of the intervals in X that the nodes visited along the ruler path occupy, accounting for going backward, like this:
We would want a function that can find the intervals where the nodes are spaced closely and break on the intervals where nodes are spaced widely, maybe taking some threshold value. The result would be something like:
|
We have access to the nodes that are along the ruler track here in the loop over it: sequenceTubeMap/src/util/tubemap.js Line 3541 in ed3adac
So we could get their X start and end positions and make each of those into an item in the input to the interval merge function. Then the line gets drawn here: sequenceTubeMap/src/util/tubemap.js Lines 3624 to 3632 in ed3adac
So that would be replaced with a loop over the output of the merging function, to draw the line for each interval. |
It looks like sequenceTubeMap/src/util/tubemap.js Lines 2670 to 2675 in ed3adac
|
After setting this up, we noticed the vertical lines for the break in the coordinate bar start to impinge on the text for the tick marks. We might need to change sequenceTubeMap/src/util/tubemap.js Lines 3638 to 3648 in ed3adac
|
@ducku added extra horizontal space between nodes when there are lots of reads that need to move up and down. But this causes some large gaps/odd spacing in the horizontal axis tick marks that trace out node positions on the first/reference path.
They've always been not perfectly smooth and linear all the way across, but if we're going to make a big space on purpise we should indicate it on the axis somehow.
If we left space out it would be a normal axis break, but I'm not perfectly sure what to draw when we add space in.
The text was updated successfully, but these errors were encountered: