smftools.analysis.plot.heatmaps

smftools.analysis.plot.heatmaps#

heatmaps.py — Pearson correlation and covariance heatmap rendering.

Functions

plot_pearson_heatmap(mat, coords, output_path)

Render a position × position Pearson correlation matrix and save to disk.

smftools.analysis.plot.heatmaps.plot_pearson_heatmap(mat, coords, output_path, title='', n_ticks=10, dpi=300, figsize=(3.5, 3.0), cmap='seismic')#

Render a position × position Pearson correlation matrix and save to disk.

Return type:

None

Parameters#

mat : (n_pos × n_pos) Pearson matrix from smftools.analysis.compute.pearson.nan_pearson_matrix(). coords : 1-D int array of TSS-centred coordinates; length must equal mat.shape[0]. output_path : file to write (PNG or PDF). title : axes title string. n_ticks : number of x/y axis ticks. dpi : output resolution. figsize : figure size in inches. cmap : diverging colormap; "seismic" or "RdBu_r" recommended.