alphagenome.visualization.plot.plot_contact_map

alphagenome.visualization.plot.plot_contact_map#

alphagenome.visualization.plot.plot_contact_map(contact_map, vmin=None, vmax=None, square=True, cbar_shrink=0.4, ax=None, **kwargs)[source]#

Visualize a contact map.

A contact map is a 2D array of values, where each value represents the probability that two DNA bases are in contact.

The array is symmetric, i.e., the (i, j) values and the (j, i) values of contact_map are equal.

Parameters:
  • contact_map (DataFrame) – Contact map to visualize.

  • vmin (Optional[float] (default: None)) – Minimum value for the colorbar.

  • vmax (Optional[float] (default: None)) – Maximum value for the colorbar.

  • square (bool (default: True)) – If True, plots the contact map as a square. If False, plots the contact map as a rectangle with a shorter height than width.

  • cbar_shrink (float (default: 0.4)) – Fraction by which to multiply the size of the colorbar.

  • ax (default: None) – Matplotlib axis to add the heatmap to.

  • **kwargs – Additional keyword arguments passed to sns.heatmap.