omicverse.bulk2single.bulk2single_plot_correlation#
- omicverse.bulk2single.bulk2single_plot_correlation(single_data, generate_single_data, celltype_key, return_table=False, figsize=(6, 6), cmap='RdBu_r')[源代码]#
Plot correlation matrix between reference and generated single-cell data.
Compares expression patterns of cell types between original single-cell reference and bulk2single generated data using marker gene correlations.
- 参数:
single_data (anndata.AnnData) – Original single-cell reference AnnData.
generate_single_data (anndata.AnnData) – Generated single-cell AnnData for comparison.
celltype_key (str) – Cell-type column used to group cells before correlation.
return_table (bool) – If
True, return numeric correlation matrix instead of plotting.figsize (tuple) – Figure size passed to matplotlib.
cmap (str) – Colormap used for heatmap rendering.
- 返回:
Correlation matrix when
return_table=True; otherwise figure and axes.- 返回类型:
numpy.ndarray or Tuple[matplotlib.figure.Figure,matplotlib.axes.Axes]