lib5c.plotters.distance_dependence module¶
Module for plotting distance dependence curves.
-
lib5c.plotters.distance_dependence.
plot_distance_dependence
(counts_superdict, primermap, region=None, bins=None, labels=None, levels=None, colors=None, hue_order=None, **kwargs)[source]¶ Plots distance dependence curves.
- Parameters
counts_superdict (counts_superdict) – The data to plot curves for.
primermap (primermap) – The primermap associated with the counts_superdict.
region (str or None) – Pass None to combine distance dependence information across all regions. Pass a region name to plot only that region’s distance dependence curve.
bins (list of numeric) – Bins to use to stratify interactions into distance groups. Should be in units of basepairs.
labels (dict or None) – Pass a dict mapping the keys of counts_superdict to labels for plotting, or pass None to use the keys of counts_superdict as the labels.
levels (dict or None) – Pass a dict mapping labels to levels to color-code the replicates by level. Pass None to give each replicate its own level.
colors (dict or None) – Pass a dict mapping levels to matplotlib colors to decide what color to plot each level with. Pass None to automatically choose colors.
hue_order (list of str or None) – Pass a list of the level names to determine their order in the legend.
kwargs (kwargs) – Typical plotter kwargs.
- Returns
The axis plotted on.
- Return type
pyplot axis
-
lib5c.plotters.distance_dependence.
plot_distance_dependence_parallel
(counts_superdict, primermap, region=None, bins=None, labels=None, levels=None, colors=None, hue_order=None, **kwargs)¶ Plots distance dependence curves.
- Parameters
counts_superdict (counts_superdict) – The data to plot curves for.
primermap (primermap) – The primermap associated with the counts_superdict.
region (str or None) – Pass None to combine distance dependence information across all regions. Pass a region name to plot only that region’s distance dependence curve.
bins (list of numeric) – Bins to use to stratify interactions into distance groups. Should be in units of basepairs.
labels (dict or None) – Pass a dict mapping the keys of counts_superdict to labels for plotting, or pass None to use the keys of counts_superdict as the labels.
levels (dict or None) – Pass a dict mapping labels to levels to color-code the replicates by level. Pass None to give each replicate its own level.
colors (dict or None) – Pass a dict mapping levels to matplotlib colors to decide what color to plot each level with. Pass None to automatically choose colors.
hue_order (list of str or None) – Pass a list of the level names to determine their order in the legend.
kwargs (kwargs) – Typical plotter kwargs.
- Returns
The axis plotted on.
- Return type
pyplot axis