pycallingcards.plotting.heatmap#

pycallingcards.plotting.heatmap(adata_cc, rna=None, figsize=(28, 8), font_scale=1, cmap='BuPu', rnalabels=None, group=None, cclabels=None, log=True, normalize_cc=True, title='Relative calling cards and RNA information', save=False)[source]#

Plot ranking of peaks.

Parameters:
  • adata_cc (AnnData) – Annotated data matrix.

  • ran – pd.DataFrame. pd.DataFrame for RNA data (genes*sample). Make sure the sample is in the same order as adata_cc.obs

  • figsize (Tuple[int, int] (default: (28, 8))) – The size of the figure.

  • font_scale (float (default: 1)) – The scale of the font size.

  • cmap (str (default: 'BuPu')) – Color map of the plot.

  • rnalabels (Optional[list] (default: None)) – The labels of the RNA data to be displayed. Be sure the length of list match the number of samples in RNA file.

  • group (Optional[str] (default: None)) – The group information in anndata object if (sample*peak). It will read anndata.obs[group].

  • cclabels (Optional[list] (default: None)) – The labels of the CC data to be displayed. Be sure the length of list match the number of samples in CC file.

  • log (bool (default: True)) – Whether to log transform the gene expression or not.

  • title (str (default: 'Relative calling cards and RNA information')) – The title of the plot.

  • save (Union[bool, str] (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
>>> adata_cc = cc.datasets.mouse_brd4_data(data = "CC")
>>> rna = cc.datasets.mouse_brd4_data(data = "RNA")
>>> cc.pl.heatmap(adata_cc,rna, rnalabels = ["Female1", "Female2", "Female3","Male1", "Male2","Male3"])