Skyline plots

Skyline plots are useful for comparing multiple sets of per-nucleotide data. Values are displayed using a stepped line graph (skyline) with sequence and sequence annotations along the x-axis.

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

plot = rnav.plot_skyline(
    samples=[rnasep_1, rnasep_2],
    profile="shapemap",
)

../_images/plot_options_skyline_1_0.png
../_images/plot_options_skyline_1_1.png
[2]:
help(rnav.plot_skyline)

Help on function plot_skyline in module rnavigate.plotting_functions:

plot_skyline(samples, profile, sequence=None, annotations=None, domains=None, labels=None, nt_ticks=(20, 5), columns=None, errors=None, annotations_mode='track', seqbar=True, region='all', plot_kwargs=None)
    Plots multiple per-nucleotide datasets on a single axis.

    Parameters
    ----------
    samples : list of rnavigate Samples
        samples used to retrieve data
    profile : data keyword string or data object
        Profile from which values will be plotted
    sequence : data keyword str, data obj, or sequence str, defaults to `profile`
        All data are mapped to this sequence before plotting
        If a data keyword, data from the first sample will be used
    annotations : list of data keyword strings or data objects, defaults to []
        Annotations used to highlight regions or sites of interest
    domains : data keyword string or data object, defaults to None
        domains to label along x-axis
    labels : list of str, defaults to sample.sample for each sample
        list containing Labels to be used in plot legends
    nt_ticks : tuple of two integers, defaults to (20, 5)
        first integer is the gap between major tick marks
        second integer is the gap between minor tick marks
    columns : string or list of strings, defaults to profile.metric
        columns names of values from profile to plot
    errors : string or list of strings, defaults to None (no error bars)
        column names of error values for plotting error bars
    annotations_mode : "track" or "bars", defaults to "track"
        "track" will highlight annotations along the x-axis
        "bars" will use a vertical transparent bar over the plot
    seqbar : bool, defaults to ``True``
        whether to display the sequence along the x-axis
    region : list of 2 integers, defaults to [1, length of sequence]
        start and end positions to plot. 1-indexed, inclusive.
    plot_kwargs : dictionary, defaults to {}
        Keyword-arguments passed to matplotlib.pyplot.subplots

    Returns
    -------
    rnavigate.plots.Skyline
        the skyline plot object