gtDMMB / RNAStructViz

Visualization, comparison, and analysis of RNA secondary structures via a cross-platform GUI
https://github.com/gtDMMB/RNAStructViz/wiki
GNU General Public License v3.0
17 stars 5 forks source link

Misalignment of arcs and ticks on circle #85

Closed ceheitsch closed 4 years ago

ceheitsch commented 4 years ago

The attached structure (o.nivara_region_25.dot with txt extension b/c of github) is unusually sparse, so it's easy to see that the arcs for the base pairs are misaligned in the screen shot.

For instance, there is a base pair (29,41) in the ct file, but in the diagram window it looks like (30, 42+). o.nivara_region_25.dot.txt Screen Shot 2020-01-24 at 1 48 19 PM

maxieds commented 4 years ago

@ceheitsch I believe that part of the problem (was) is in the DiagramWindow::ComputeDiagramParams function where we had semi-arbitrary offsets:

angleDelta = (M_PI * 2.0f - 0.05f) / (float) numBases;
angleBase = 1.5f * M_PI - 0.025f;
radius = (resolution + 10.f) / 2.0f;

Also, there was some issue with rounding error. When I increase the number of ticks around the circle from 12 to 35, we get the following diagram, which seems to be more consistent with your example:

Screenshot at 2020-01-27 22-39-15

So the question is this: Do we increase the number of tick marks around the bounding circle to prevent this from happening?

maxieds commented 4 years ago

@ceheitsch RE: The question asked above. Here is the arc diagram with 27 ticks. A little more packed, for sure, but shows your requested accuracy. Is this an OK number of bounding ticks?

Screenshot at 2020-01-27 22-43-16

maxieds commented 4 years ago

Mac OSX 10.14.x support verified!

maxieds commented 4 years ago

@ceheitsch

I'm about to add the new brew release to lower the former number of tick marks (27) around the arc diagram bounding circle to 12 as we originally discussed. The documentation of the accuracy (lack thereof) of these tick marks in determining precise base arc end indices is now here on the known issues page of the WIKI.

Please close this issue once you are happy with it.