alphagenome.visualization.plot_components.ContactMapsDiff#

class alphagenome.visualization.plot_components.ContactMapsDiff(tdata, track_height=10.0, vmin=-1.0, vmax=1.0, ylabel_horizontal=True, ylabel_template='{name}', cmap='RdBu_r', max_num_tracks=10, **kwargs)[source]#

Component for visualizing contact map differences.

This component visualizes the difference between two contact maps. It uses a diverging red-blue color map with the center white color pinned to a value of zero, with negative values being blue and positive values being red.

The vmin and vmax parameters control the color scaling of the heatmap. Values outside this range will be clipped to vmin or vmax.

Attributes#

Table

ContactMapsDiff.num_axes#

Returns the number of matplotlib axes required by the component.

ContactMapsDiff.total_height#

Returns the total figure height.

Methods#

Table

get_ax_height(axis_index)

Returns the height of the axis.

plot_ax(ax, axis_index, interval)

Plots the contact map on the given axis.

ContactMapsDiff.get_ax_height(axis_index)[source]#

Returns the height of the axis.

Return type:

float

ContactMapsDiff.plot_ax(ax, axis_index, interval)[source]#

Plots the contact map on the given axis.

Parameters:
  • ax (Axes) – The matplotlib axis to plot on.

  • axis_index (int) – The index of the axis.

  • interval (Interval) – The genomic interval to plot.