pycallingcards.plotting.dotplot_bulk#
- pycallingcards.plotting.dotplot_bulk(adata_cc, rna, selected_list, num_list, xticklabels=None, group=None, figsize=(12, 15), dotsize=5, cmap='Reds', title='DE binding & RNA', topspace=0.977, sort_by_chrom=False, bysample=False, legend=False, cax=[0.05, 0.085, 0.2, 0.03], save=False)[source]#
Plot ranking of peaks.
- Parameters:
adata_cc (
AnnData
) – Anndata of peak.rna (
DataFrame
) – pd.DataFrame of RNA expression.selected_list (
list
) – A list of peak to be shown.num_list (
list
) – The distribution of samples in RNA. eg. the first three columns for RNA is female and the following two columns is male data, then num_list should be [3,2]xticklabels (
Optional
[list
] (default:None
)) – xticklabels for the column. If None, it will be the index of adata_cc.obs.group (
Optional
[str
] (default:None
)) – The group information in anndata object if (sample*peak). It will read anndata.obs[group].figsize (
Tuple
[int
,int
] (default:(12, 15)
)) – The size of the figure.dotsize (
float
(default:5
)) – The relative size of dots.cmap (
str
(default:'Reds'
)) – The colormap of the plot.title (
str
(default:'DE binding & RNA'
)) – The title of the plot.topspace (
float
(default:0.977
)) – Parameter to control the title position.sort_by_chrom (
bool
(default:False
)) – If True, it would sort by chr1, chr2, etc. sort_by_chrom can not be applied to yeast data.bysample (
bool
(default:False
)) – If True, it display one column as a sample. If False, it display one column as a group.legend (
bool
(default:False
)) – If True, it would show the legend.cax (
list
(default:[0.05, 0.085, 0.2, 0.03]
)) – The position of the legend for.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 >>> adata_cc = cc.datasets.mouse_brd4_data(data = "CC") >>> rna = cc.datasets.mouse_brd4_data(data = "RNA") >>> cc.pl.dotplot_bulk(adata_cc,rna, selected_list = ['chr1_72823300_72830641', 'chr1_174913218_174921560', 'chr4_68545354_68551370', 'chr5_13001870_13004057', 'chr5_13124523_13131816', 'chr5_13276480_13283561', 'chr5_16764617_16770523', 'chr5_17080322_17085124', 'chr7_55291506_55293906', 'chr7_56523379_56528437', 'chr8_102778665_102784309', 'chr10_57783900_57788071', 'chr11_46057069_46059464', 'chr12_56507583_56514677', 'chr14_88460574_88466755', 'chr14_88898126_88902522', 'chr15_11743635_11745457', 'chr15_11781285_11785784', 'chr15_11823522_11836910', 'chr19_59158212_59161670', 'chrY_1241882_1246464', 'chrY_1282449_1287505'] , num_list = [3,3],figsize = [12,8])