Visualizing data

With your data loaded using an RNAvigate Sample object, you can start creating visualizations and analyses. This document will show you what types of plots can be created and where to find more information.

Contents:

[1]:
import rnavigate as rnav
from rnavigate.examples import tpp, rnasep_1, rnasep_2, rnasep_3

Alignment plots

full guide

Alignment plots visualize how two sets data will be positionally aligned in RNAvigate plots. It is a good idea to check the automatic alignment if two sequences differ significantly. For the most part, this is not necessary for deletion or point mutants or subsequences.

[2]:
plot = rnav.plot_alignment(
    data1=(tpp, "dmsmap"),
    data2=(tpp, "pdb"),
    )

../_images/get_started_visualizing_data_3_0.png

Skyline plots

full guide

Skyline plots flexibly display and compare per-nucleotide data sets.

[3]:
plot = rnav.plot_skyline(
    samples=[tpp],
    profile="dmsmap",
    columns=["Modified_rate", "Untreated_rate"])

../_images/get_started_visualizing_data_5_0.png
../_images/get_started_visualizing_data_5_1.png

Profile plots

full guide

Profile plots display per-nucleotide data as colored bar graphs similar to ShapeMapper style bar graphs, but very flexible.

[4]:
plot = rnav.plot_profile(
    samples=[tpp],
    profile="dmsmap",
    )

../_images/get_started_visualizing_data_7_0.png
../_images/get_started_visualizing_data_7_1.png

Arc plots

full guide

Arc plots flexibly display inter-nucleotide relationships and secondary structures as arcs. Per-nucleotide measurements and sequence annotations can also be displayed without over-crowding.

[5]:
plot = rnav.plot_arcs(
    samples=[tpp],
    sequence="pdb",
    structure="ss",
    profile="dmsmap",
    profile_scale_factor=5,
    )

../_images/get_started_visualizing_data_9_0.png
../_images/get_started_visualizing_data_9_1.png

Arc compare plots

full guide

Arc compare plots are the same as arc plots above, but compare two samples on the same axes.

[6]:
plot = rnav.plot_arcs_compare(
    samples=[rnasep_1, rnasep_2],
    sequence="pdb",
    interactions="ringmap",
)

../_images/get_started_visualizing_data_11_0.png
../_images/get_started_visualizing_data_11_1.png

Circle plots

full guide

Circle plots are similar to arc plots, but display nucleotides in a circle so that any size RNA fits in a square area.

[7]:
plot = rnav.plot_circle(
    samples=[tpp],
    sequence="pdb",
    structure="ss",
    profile="dmsmap",
    colors={"sequence": "contrast",
            "nucleotides": "profile"},
    )

../_images/get_started_visualizing_data_13_0.png
../_images/get_started_visualizing_data_13_1.png

Secondary structure diagrams

full guide

Secondary structure diagrams display per-nucleotide and inter-nucleotide measurements and sequence annotations on a secondary structure diagram.

[8]:
plots = rnav.plot_ss(
    samples=[tpp],
    structure="ss",
    profile="dmsmap",
    colors={"nucleotides": "profile"},
    nt_ticks=20
    )

../_images/get_started_visualizing_data_15_0.png
../_images/get_started_visualizing_data_15_1.png

Interactive 3D molecule renderings

full guide

These renderings display per-nucleotide and inter-nucleotide data on 3D RNA molecular structures.

[9]:
plot = rnav.plot_mol(
    samples=[tpp],
    structure="pdb",
    colors="sequence",
    rotation={'x': -110, 'z': -30, 'y':-10},
    )

3Dmol.js failed to load for some reason. Please check your browser console for error messages.

Distance distribution histograms

full guide

Distance distribution histograms display the 3D distance distribution of sets of inter-nucleotide measurements.

[10]:
plot = rnav.plot_disthist(
    samples=[tpp],
    structure="pdb",
    interactions="ringmap"
    )

../_images/get_started_visualizing_data_19_0.png

Heatmaps and contour maps

full guide

Heatmaps and contour maps are useful for displaying dense inter-nucleotide measurements or inter-nucleotide data density while highlighting defined regions such as helices or 3D interactions.

[11]:
plot = rnav.plot_heatmap(
    samples=[tpp],
    sequence="ss",
    structure="ss",
    interactions="ringmap",
    )

../_images/get_started_visualizing_data_21_0.png

Linear regression plots

full guide

Linear regression plots quickly compare multiple sets of per-nucleotide data and display slope, R^2, and density.

[12]:
plot = rnav.plot_linreg(
    samples=[rnasep_1, rnasep_2, rnasep_3],
    profile="shapemap",
    scale="log",
    )

../_images/get_started_visualizing_data_23_0.png
../_images/get_started_visualizing_data_23_1.png

Receiver operator characteristic curves

full guide

ROC curves are a way to determine how well per-nucleotide data predict a classifier, such as base-paired vs. unpaired status.

[13]:
plot = rnav.plot_roc(
    samples=[rnasep_1, rnasep_2, rnasep_3],
    profile="shapemap",
    structure="ss_ct",
    )

../_images/get_started_visualizing_data_25_0.png

ShapeMapper2 quality control plots

full guide

ShapeMapper2 QC plots display useful quality control metrics from ShapeMapper2 analyses.

[14]:
plot = rnav.plot_qc(
    samples=[rnasep_1],
    profile="shapemap")

../_images/get_started_visualizing_data_27_0.png

ShapeMapper2 profiles

full guide

ShapeMapper2 profiles display normalized SHAPE profiles, mutation rates, and/or read depths in ShapeMapper2’s default layout.

[15]:
plot = rnav.plot_shapemapper(
    sample=rnasep_1,
    profile="shapemap",
    )

../_images/get_started_visualizing_data_29_0.png