pycallingcards.plotting.GWAS_adata_sc#

pycallingcards.plotting.GWAS_adata_sc(adata, number=100, bindings=['Chr', 'Start', 'End'], clusters=None, cluster_name='cluster', figsize=(8, 40), cmap1='BuPu', cmap2=None, font_scale=1, pad=0.01, rotation=0, title=None, title_top=0.97, title_fontsize=5, save=False)[source]#

Plot GWAS results for the different cell types in single-cell calling cards data. It considers the relative number of insertions in each cell type. GWAS data is downloaded from GWAS Catalog.

Parameters:
  • adata (AnnData) – The anndata object of scCC data.

  • number (int (default: 100)) – The minimum total number for each SNP.

  • bindings (list (default: ['Chr', 'Start', 'End'])) – The name for binding information.

  • clusters (Optional[list] (default: None)) – The cluster to consider. If None, it will use all the clusters in adata.obs[cluster_name]/

  • cluster_name (str (default: 'cluster')) – The name of cluster in adata.obs.

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

  • cmap1 (str (default: 'BuPu')) – The colormap of the first heatmap which is the total count of each SNP.

  • cmap2 (Optional[str] (default: None)) – The colormap of the second heatmap which is the relative number of insertions in each cell type.

  • font_scale (float (default: 1)) – The font_scale of the words on the plot (except fot title).

  • pad (float (default: 0.01)) – The distance of the color bar from the bottom of the heatmap.

  • rotation (int (default: 0)) – The angle of the bottom label of the second heatmap

  • title (Optional[str] (default: None)) – The title of the plot.

  • title_top (str (default: 0.97)) – Control the distance of the title from the top of the heatmap.

  • title_fontsize (float (default: 5)) – Default is title_fontsize. The fontsize of the title.

  • save (bool (default: False)) – Could be bool or str indicating the file name it would be saved as. 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.mousecortex_data(data="CC")
>>> adata_cc = cc.tl.liftover(adata_cc, bindings = ['Chr_liftover', 'Start_liftover', 'End_liftover'])
>>> cc.pl.GWAS_adata_sc(adata_cc, bindings = ['Chr_liftover', 'Start_liftover', 'End_liftover'])