metaseq.minibrowser.SignalMiniBrowser

class metaseq.minibrowser.SignalMiniBrowser(genomic_signal_objs, local_coverage_kwargs=None, plotting_kwargs=None)[source]

Bases: metaseq.minibrowser.BaseMiniBrowser

Base class for plotting genomic signal.

Plots genomic signal over a particular area of the genome. Designed to be extended by subclasses, but can stand alone if all you want is a simple one-panel browser.

Parameters:
  • genomic_signal_objs – list of genomic signal objects (e.g., metaseq.genomic_signal.BamSignal instances).
  • local_coverage_kwargs

    a dictionary of kwargs to send to each genomic signals’ local_coverage() method, e.g.:

    local_coverage_kwargs = dict(fragment_size=200).
    
  • plotting_kwargs

    a list of dictionaries, one for each genomic signals object, e.g,:

    plotting_kwargs = [dict(color='r', label='IP', dict(color='k',
        label='input')]
    

Methods

close_all() Close all figures spawned by this class.
example_panel(ax, feature) A example panel that just prints the text of the feature.
make_fig() Figure constructor, called before self.plot()
panels() Add a single panel to the figure
plot(feature) Spawns a new figure showing data for feature.
signal_panel(ax, feature) Plots each genomic signal as a line using the corresponding

Methods

__init__(genomic_signal_objs[, ...]) Base class for plotting genomic signal.
close_all() Close all figures spawned by this class.
example_panel(ax, feature) A example panel that just prints the text of the feature.
make_fig() Figure constructor, called before self.plot()
panels() Add a single panel to the figure
plot(feature) Spawns a new figure showing data for feature.
signal_panel(ax, feature) Plots each genomic signal as a line using the corresponding
__init__(genomic_signal_objs, local_coverage_kwargs=None, plotting_kwargs=None)[source]

Base class for plotting genomic signal.

Plots genomic signal over a particular area of the genome. Designed to be extended by subclasses, but can stand alone if all you want is a simple one-panel browser.

Parameters:
  • genomic_signal_objs – list of genomic signal objects (e.g., metaseq.genomic_signal.BamSignal instances).
  • local_coverage_kwargs

    a dictionary of kwargs to send to each genomic signals’ local_coverage() method, e.g.:

    local_coverage_kwargs = dict(fragment_size=200).
    
  • plotting_kwargs

    a list of dictionaries, one for each genomic signals object, e.g,:

    plotting_kwargs = [dict(color='r', label='IP', dict(color='k',
        label='input')]
    
close_all()

Close all figures spawned by this class.

example_panel(ax, feature)

A example panel that just prints the text of the feature.

make_fig()

Figure constructor, called before self.plot()

panels()[source]

Add a single panel to the figure

plot(feature)

Spawns a new figure showing data for feature.

Parameters:feature – A pybedtools.Interval object

Using the pybedtools.Interval feature, creates figure specified in BaseMiniBrowser.make_fig() and plots data on panels according to self.panels().

signal_panel(ax, feature)[source]

Plots each genomic signal as a line using the corresponding plotting_kwargs