Skip to content
Maxie D. Schmidt edited this page Jan 6, 2021 · 13 revisions

The integrated radial layout viewer

In the same way as we provide a CT file viewer in RNAStructViz, we also provide a limited radial layout viewer which is used to focus on a zoomed region of the structure. This radial layout viewer can be accessed from within the diagram window by first zooming in on an inclusive range of bases around the circle:

If the user then presses SHIFT+R, this keypress action brings up a dialog like the following:

When you select the specific CT file to zoom in on radially, or just press ENTER for the default, this action brings up a radial layout viewer like the following:

Every tenth base is intentionally labeled with the base index as a reference point for users. Users can scale the highlighted section in the radial layout viewer by clicking the zoom out / in (<< / >>) buttons at the top right corner of the window. Pressing the Reset button at the top of the window resets the diagram to its original state. This can be useful if successive zoom in-out operations leave the diagram too pixelated for analysis.

Note that the radial layout is zoomed, meaning that only the zoomed-in portions of the structure are shown in color, with grayed-out sections surrounding the highlighted region. Base pair regions which are too large to display will generate an error when trying to show them with the radial layout viewer. See our known limitations page for more information on our decision for a maximum subsequence length in the radial layout viewer (<= 500 bases).

Implementation notes and algorithms in the source code

One of the dependencies we bring in with RNAStructViz is the ViennaRNA RNAlib-v2 package in C++. We use the basic plotting algorithms to generate the radial layout coordinates via the PLOT_TYPE_SIMPLE algorithm (see official RNAlib documentation of this plot type). Once we use the library functionality to get the XY-plot coordinates via the simple_xy_coordinates() method, then we use our own custom coded display functions using the libcairo vector graphics routines to draw them out to the GUI window for users to view in realtime. An official publication documenting and summarizing the algorithms used by ViennaRNA and RNAlib2 is found in the article titled ViennaRNA Package 2.0 by R. Lorenz et. al. (Algorithms for Molecular Biology volume 6, Article number: 26 -- 2011).