pycallingcards.plotting.dotplot_sc#

pycallingcards.plotting.dotplot_sc(adata_cc, adata, result, rate=50, figsize=(10, 120), size=1, cmap1='Reds', cmap2='BuPu', title='DE binding & RNA', topspace=0.977, legend=False, cax1=[-0.05, -0.2, 0.03, 0.25], cax2=[0.0, -0.2, 0.03, 0.25], save=False)[source]#

Plot ranking of peaks.

Parameters:
  • adata_cc (AnnData) – Anndata of peak.

  • adata (AnnData) – Anndata of RNA.

  • result (DataFrame) – pd.DataFrame of result gain from cc.tl.pair_peak_gene_sc with ‘Peak’ and ‘Gene’ columns.

  • rate (float (default: 50)) – Rate to control the dot size.

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

  • size (int (default: 1)) – The size of relative size of text.

  • cmap – The colormap of the plot for bindings.

  • cmap – The colormap of the plot for genes.

  • title (str (default: 'DE binding & RNA')) – The title of the plot.

  • topspace (float (default: 0.977)) – Parameter to control the title position.

  • legend (bool (default: False)) – If True, it would show the legend.

  • cax1 (list (default: [-0.05, -0.2, 0.03, 0.25])) – The position of the legend for genes.

  • cax2 (list (default: [0.0, -0.2, 0.03, 0.25])) – The position of the legend for bindings.

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

Example:

>>> import pycallingcards as cc
>>> import scanpy as sc
>>> adata_cc = cc.datasets.mousecortex_data(data="CC")
>>> adata = cc.datasets.mousecortex_data(data="RNA")
>>> qbed_data = cc.datasets.mousecortex_data(data="qbed")
>>> peak_data = cc.pp.callpeaks(qbed_data, method = "CCcaller", reference = "mm10",  maxbetween = 2000, pvalue_cutoff = 0.01,
            lam_win_size = 1000000,  pseudocounts = 1, record = True)
>>> peak_annotation = cc.pp.annotation(peak_data, reference = "mm10")
>>> peak_annotation = cc.pp.combine_annotation(peak_data,peak_annotation)
>>> sc.tl.rank_genes_groups(adata,'cluster')
>>> result = cc.tl.pair_peak_gene_sc(adata_cc,adata,peak_annotation)
>>> cc.pl.dotplot_sc(adata_cc,adata,result)