lib5c.plotters.extendable.domain_extendable_heatmap module¶
Module for the DomainExtendableHeatmap class, which adds domain outlining functionality for the extendable heatmap system.
-
class
lib5c.plotters.extendable.domain_extendable_heatmap.
DomainExtendableHeatmap
(array, grange_x, grange_y=None, colorscale=None, colormap='obs', norm=None)[source]¶ Bases:
lib5c.plotters.extendable.base_extendable_heatmap.BaseExtendableHeatmap
ExtendableHeatmap mixin class providing ChIP-seq domain outlining functionality.
-
outline_domain
(domain, color='green', linewidth=2, upper=True)[source]¶ Outlines a contact domain on the heatmap.
- Parameters
domain (dict) –
A genomic feature dict describing the domain to be outlinerd. Should be a dict with at least the following keys:
{ 'chrom': str, 'start': int, 'end': int }
’start’ and ‘end’ should be in units of base pairs (this function will handle the conversion to heatmap pixel units).
color (matplotlib color) – The color to outline the domain with.
linewidth (float) – The line width to use when outlining the domain. Pass a larger number for a thicker, more visible outline.
upper (bool) – Pass True to draw the outline in the upper triangle of the heatmap. Pass False to draw it in the lower triangle.
-
outline_domains
(domains, color='green', linewidth=2, upper=True)[source]¶ Outlines a set of contact domains on the heatmap by repeatedly calling
outline_domain()
.- Parameters
domains (list of dict) –
A list of domains, where each domain is represented as genomic feature dict with at least the following keys:
{ 'chrom': str, 'start': int, 'end': int }
’start’ and ‘end’ should be in units of base pairs (this function will handle the conversion to heatmap pixel units).
color (matplotlib color) – The color to outline the domains with.
linewidth (float) – The line width to use when outlining the domains. Pass a larger number for a thicker, more visible outline.
upper (bool) – Pass True to draw the outlines in the upper triangle of the heatmap. Pass False to draw them in the lower triangle.
-