pycallingcards.plotting.signal_heatmap#

pycallingcards.plotting.signal_heatmap(signalmtx, before=10000, after=10000, nbins=100, figsize=(4, 15), fontsize=10, colormap='Reds', pad=0.03, belowlength=0, colormap_vmin=0, colormap_vmax=5, title='Log2(FC) Chip-seq Signal Heatmap', save=False)[source]#

Plot the heatmap plot the Chip-seq signal of peaks.

Parameters:
  • signalmtx (array) – The signal calculated from cc.pl.calculate_signal

  • before (int (default: 10000)) – The length(bp) calculated before the middle point of the peak.

  • after (int (default: 10000)) – The length(bp) calculated after the middle point of the peak.

  • nbins (int (default: 100)) – The number of bins calculated.

  • figsize (default: (4, 15)) – The size of the figure.

  • font_size – The font of the words on the plot.

  • color – The color of the plot, the same as Colormaps in Matplotlib.

  • pad (float (default: 0.03)) – Control the distance between plot and the colormap.

  • belowlength (float (default: 0)) – Control the distance between plot and the text below.

  • colormap_vmin (float (default: 0)) – vmin value of the colormap.

  • colormap_vmax (float (default: 5)) – vmax value of the colormap.

  • title (str (default: 'Log2(FC) Chip-seq Signal Heatmap')) – The title of the plot.

  • save (bool (default: False)) – Could be bool or str indicating the file name it would be saved. If True, a default name will be given and the plot would be saved as a png file.

Example:

>>> import pycallingcards as cc
>>> exp_ccf = cc.datasets.SP1_K562HCT116_data(data = 'HCT116_SP1_ccf')
>>> bg_ccf = cc.datasets.SP1_K562HCT116_data(data = 'HCT116_brd4_ccf')
>>> peak_data = cc.pp.callpeaks(exp_ccf, bg_ccf, method = 'ccf_tools', reference = 'hg38', pvalue_cutoffbg = 0.0001, window_size = 2000, step_size = 500,
          pvalue_cutoffTTAA = 0.0000001, lam_win_size = None)
>>> # If "https://www.encodeproject.org/files/ENCFF587ZMX/@@download/ENCFF587ZMX.bigWig" could not work, please download it and read the local path.
>>> mtx = cc.pl.calculate_signal(peak_data,"https://www.encodeproject.org/files/ENCFF587ZMX/@@download/ENCFF587ZMX.bigWig")
>>> cc.pl.signal_heatmap(mtx, pad = 0.035)