lib5c.plotters.boxplots module

Module for plotting locus boxplots that show the distribution of 5C counts at each locus across a region.

lib5c.plotters.boxplots.plot_regional_locus_boxplot(regional_counts, color='darkgray', median_color='firebrick', median_linewidth=5.0, logged=True, sort=True, figsize=None, scaling_factor=0.05, dpi=300, despine=False, **kwargs)[source]

Plots a locus boxplot visualization showing the distribution of 5C counts at each locus across a region.

Parameters
  • regional_counts (np.ndarray) – The matrix of counts for this region.

  • color (str) – Color to fill the boxplots.

  • median_color (str) – Color to mark the medians of the boxplots with.

  • median_linewidth (str) – Linewidth to draw the medians of the boxplots with.

  • logged (bool) – Pass True to use a log-scale counts axis.

  • sort (bool) – Pass True to sort the boxplots from left to right in order of increasing median value.

  • figsize (Optional[Tuple[float, float]]) – Pass a tuple of the form (width, height) to force the size of the figure. If this kwarg is not passed, the figure size will be determined automatically as scaling_factor times the number of loci in the region.

  • scaling_factor (float) – If figsize is not passed, the figure size will be determined automatically as scaling_factor times the number of loci in the region.

  • dpi (int) – DPI to save figure at if auto-saving to a raster format.

  • kwargs (kwargs) – Typical plotter kwargs.

Returns

The axis plotted on.

Return type

pyplot axis