Interfaces

Graphical User Interface (GUI)

The main RFviewJS/RFview GUI consists of a toolbar and a canvas area:

The toolbar contains the following:

Loading structures, reactivity data & annotations

Structures can be loaded in one of four ways:

  • Structure files via the Load structure/reactivity/annotation dialog
  • Structure files by direct drag-and-drop onto the canvas area
  • Fetching of alignments from Rfam
  • Manual sequence/structure input via the Manually enter sequence & structure dialog

The Load structure/reactivity/annotation dialog provides an easy and intuitive interface for data loading, enabling the simultaneous import of structures, reactivity data and annotations:

Multiple files (structure, reactivity, annotations) can be simultaneously loaded, and they are displayed as lists the user can positionally match:

In the above example, a dot-bracket file containing 2 structures was imported, along with 2 XML reactivity files. The used can use the arrows to rearrange the files, such that the first structure will get the reactivities from the first XML file, the second structure from the second XML file, and so on.

The same dialog will pop-up if the user attempts to load reactivities on top of previously loaded structures. RFview will only display in the list the structures whose sequence matches the one in the XML file. If multiple structures match the sequence of an XML file, the user can remove the unwanted structure files from the list by clicking on the ×.

Alternatively, the Manually enter sequence & structure dialog allows the user to directly type in a structure and a sequence to be loaded. If no sequence is provided, bases will be displayed as Ns:

Customizing structure rendering settings

Upon loading, diplay settings can be adjusted through the Settings dialog. Multiple settings tab will be present, depedending on whether a reactivity and/or an annotation file has been loaded for the current structure:

The Apparance tab is always available, and it allows altering RNA backbone and bond color, size of the bases (circles and font), and base index font size.

When reactivity data is loaded, an additional Reactivity tab will appear:

Through this tab, the user can define the color scale used to render base reactivities. The default scheme uses a simple discretization of values between 0 and 0.3 (low reactivity), 0.3 and 0.7 (medium reactivity) and 0.7+ (high reactivity). Additional stops can be added as needed, or a continuous color scale can be adopted instead.

Similarly, when base-pair/helix annotations are loaded, an additional Annotations tab will appear:

Furthermore, several of toggles are available in the toolbar to turn on/off the rendering of base indices, reactivities, base-pair/helix annotations and pseudoknots.

Visualization of structures from Stockholm alignments

Stockholm alignments can be directly rendered by RFview, provided that the #=GC SS_cons is present in the alignment.

Rendering mostly follows the same rules as Zasha Weinberg's R2R algorithm, with minor improvements:

Base Rendered as
Single nucleotide present ≥ 97% That nucleotide, colored in red
Single nucleotide present ≥ 90% That nucleotide, colored in black
Single nucleotide present ≥ 75% That nucleotide, colored in grey
Two or three nucleotides, each present ≥ 30%, combined ≥ 75% IUPAC code, colored according to the same thresholds used for single nucleotides
Any nucleotide present ≥ 97% Filled red circle
Any nucleotide present ≥ 90% Filled black circle
Any nucleotide present ≥ 75% Filled grey circle
Any nucleotide present ≥ 50% Filled white circle
None of the above Alignment column not rendered

The user can switch between Structure view and Alignment view. In alignment view, the Stockholm alignment is displayed with alignment columns colored according to the parent helix:

Furthermore, RFview automatically computes the percentage of sequences with a canonical base-pair (AU, GC, GU) at each paired position. When a Stockholm structure is loaded, a % canonical pairs toggle button (%) appears in the toolbar. Activating it colors every base-pair using a red→yellow→green gradient. The gradient stop colors are adjustable via the Settings dialog. This mode also drives bond rendering in the alignment view: positions where canonical pairs are the majority (>50%) are drawn a line, while non-canonical-majority positions are drawn as a dot.

Command Line Interface (CLI)

When packed as a standalone Electron app, RFview can be invoked from command line to directly generate structure plots in SVG format.

Usage

$ RFview --structureFile structure.db
$ RFview --structureFile structure.db --xml reactivity.xml --svg plot.svg
$ RFview --structureFile alignment.sto --basePairAnno alignment.cov --layout naview --svg plot.svg

To list all avalailable parameters, simply type:

$ RFview --help
Parameter Type Description
--structureFile string Path to a structure file (.db, .dbn, .ct, .txt) or to a Stockholm alignment [required]
--rfam string Rfam family ID to fetch directly from Rfam (e.g., RF00162)
Note: --rfam and --structureFile are mutually exclusive
--xml string Reactivity file (in RNA Framework's XML format)
--basePairAnno string Pair-annotation file (.tsv, .txt) or R-scape's .cov file
--percCanonical For Stockholm alignments, colors every base-pair by % canonical pairs computed from the alignment
--helixCovAnno string R-scape's .helixcov helix-level covariation file
--layout string Layout for RNA secondary structure rendering: auto (automatically determines the best layout between naview and radiate to avoid overlaps between helices), naview, or radiate (Default: auto)
--svg string Path to the output SVG file (Default: <structureFile basename>.svg)
--pdf string Path to the output PDF file
--noLegend Omits legends from the exported SVG
--noPk Omits pseudoknot archs from the exported SVG
Note: this has no effect on Stockholm alignments (use --noLabels and --noInsets instead)
--noLabels Omits Stockholm annotation labels (SS_cons lines) from the exported SVG
--noInsets Omits inset panels for non-nested interactions in Stockholm alignments from the exported SVG
--incSsEnds Includes single-stranded 5'/3' ends in Stockholm structures