flotilla.visualize.splicing module

Splicing-specific visualization classes and methods

class flotilla.visualize.splicing.ModalitiesViz[source]

Bases: object

Visualize results of modality assignments

bar(counts, phenotype_to_color=None, ax=None, percentages=True)[source]

Draw barplots grouped by modality of modality percentage per group

colors = [u'#4c72b0', u'#ccb974', u'#8172b2', u'#55a868', u'#c44e52']
event_estimation(event, logliks, logsumexps, renamed='')[source]

Show the values underlying bayesian modality estimations of an event

modality = 'included'
modality_colors = {'included': u'#c44e52', 'middle': u'#55a868', 'bimodal': u'#8172b2', 'excluded': u'#4c72b0', 'uniform': u'#ccb974'}
modality_order = ['excluded', 'uniform', 'bimodal', 'middle', 'included']
plot_reduced_space(binned_reduced, modality_assignments, ax=None, title=None, xlabel='', ylabel='')[source]
flotilla.visualize.splicing.hist_single_vs_pooled_diff(diff_from_singles, diff_from_singles_scaled, color=None, title='', nbins=50, hist_kws=None)[source]

Plot a histogram of both the original difference difference of psi scores from the pooled to the singles, and the scaled difference

flotilla.visualize.splicing.lavalamp(psi, color=None, x_offset=0, title='', ax=None, switchy_score_psi=None, marker='o', plot_kws=None, yticks=None)[source]

Make a ‘lavalamp’ scatter plot of many splicing events

Useful for visualizing many splicing events at once.

Parameters:

psi : array

A (n_events, n_samples) matrix either as a numpy array or as a pandas DataFrame

color : matplotlib color

Color of the scatterplot. Defaults to a dark teal

x_offset : numeric or None

How much to offset the x-values off of 1. Useful for plotting several celltypes at once.

title : str

Title of the plot. Default ‘’

ax : matplotlib.Axes object

The axes to plot on. If not provided, will be created

switchy_score_psi : pandas.DataFrame

The psi scores to sort on for the plotting order. By default use the psi provided, but sometimes you want to plot multiple psi scores on the same plot, with the same events.

marker : str

A valid matplotlib marker. Default is ‘d’ (thin diamond)

plot_kws : dict

Keyword arguments to supply to plot()

Returns:

fig : matplotlib.Figure

A figure object for saving.

flotilla.visualize.splicing.lavalamp_pooled_inconsistent(singles, pooled, pooled_inconsistent, color=None, percent=None)[source]
Olga B. Botvinnik is funded by the NDSEG fellowship and is a NumFOCUS John Hunter Technology Fellow.
Michael T. Lovci was partially funded by a fellowship from Genentech.
Partially funded by NIH grants NS075449 and HG004659 and CIRM grants RB4-06045 and TR3-05676 to Gene Yeo.