pycallingcards.plotting.volcano_plot#

pycallingcards.plotting.volcano_plot(adata_cc, figsize=(10, 6), font_size=1, pvalue_cutoff=0.01, lfc_cutoff=4, colorleft='indianred', colorright='lightseagreen', title='Volcano plot', name='fisher_exact', label=None, labelleft=None, labelright=None, pvalue_name='pvalues', lfc_name='logfoldchanges', save=False)[source]#

Plot the volcano plot comparing two sample/cluster. Please make sure that alternative equals to ‘two-sided’ for the differential binding analysis.

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

  • font_size (int (default: 1)) – The font of the words on the plot.

  • colorleft (str (default: 'indianred')) – The color of the dot for the left group.

  • colorright (str (default: 'lightseagreen')) – The color of the dot for the right group.

  • pvalue_cutoff (float (default: 0.01)) – The pvalue cutoff.

  • lfc_cutoff (float (default: 4)) – The log fold change cutoff.

  • title (str (default: 'Volcano plot')) – The title of the plot.

  • label (Optional[str] (default: None)) – The name of label. If None, it will use the top two index.

  • labelleft (Optional[List[float]] (default: None)) – The exact place for left label. Default will automatically give it a place on left top of the plot.

  • labelright (Optional[List[float]] (default: None)) – The exact place for left label. Default will automatically give it a place on right top of the plots.

  • pvalue_name (str (default: 'pvalues')) – The name The name stored in for pvalue/pvalue_adj in adata_cc.uns[name][pvalue_name].

  • lfc_name (str (default: 'logfoldchanges')) – The name The name stored in for lfc/lfc_adj in adata_cc.uns[name][lfc_name].

  • save (Union[bool, str] (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
>>> adata_cc = cc.datasets.mouse_brd4_data(data = "CC")
>>> cc.pl.volcano_plot(adata_cc,figsize = (6,10),labelright = (5,220),labelleft = (-9,220))