simba.pl.entity_metrics

simba.pl.entity_metrics(adata_cmp, x, y, show_texts=True, show_cutoff=False, show_contour=True, levels=4, thresh=0.05, cutoff_x=0, cutoff_y=0, n_texts=10, size=8, texts=None, text_size=10, text_expand=(1.05, 1.2), fig_size=None, save_fig=None, fig_path=None, fig_name='entity_metrics.pdf', pad=1.08, w_pad=None, h_pad=None, **kwargs)[source]

Plot entity metrics

Parameters:
  • adata_cmp (AnnData) – Anndata object from compare_entities

  • x (str) – Variables that specify positions on the x and y axes. Possible values: - max (The average maximum dot product of top-rank reference entities, based on normalized dot product) - std (standard deviation of reference entities, based on dot product) - gini (Gini coefficients of reference entities, based on softmax probability) - entropy (The entropy of reference entities, based on softmax probability)

  • y (str) – Variables that specify positions on the x and y axes. Possible values: - max (The average maximum dot product of top-rank reference entities, based on normalized dot product) - std (standard deviation of reference entities, based on dot product) - gini (Gini coefficients of reference entities, based on softmax probability) - entropy (The entropy of reference entities, based on softmax probability)

  • show_texts (bool, optional (default: True)) – If True, text annotation will be shown.

  • show_cutoff (bool, optional (default: False)) – If True, cutoff of x and y will be shown.

  • show_contour (bool, optional (default: True)) – If True, the plot will overlaid with contours

  • texts (list optional (default: None)) – Entity names to plot

  • text_size (int, optional (default: 10)) – The text size

  • text_expand (tuple, optional (default: (1.05, 1.2))) – Two multipliers (x, y) by which to expand the bounding box of texts when repelling them from each other/points/other objects.

  • cutoff_x (float, optional (default: 0)) – Cutoff of axis x

  • cutoff_y (float, optional (default: 0)) – Cutoff of axis y

  • levels (int, optional (default: 6)) – Number of contour levels or values to draw contours at

  • thresh (float, optional ([0, 1], default: 0.05)) – Lowest iso-proportion level at which to draw a contour line.

  • pad (float, optional (default: 1.08)) – Padding between the figure edge and the edges of subplots, as a fraction of the font size.

  • h_pad (float, optional (default: None)) – Padding (height/width) between edges of adjacent subplots, as a fraction of the font size. Defaults to pad.

  • w_pad (float, optional (default: None)) – Padding (height/width) between edges of adjacent subplots, as a fraction of the font size. Defaults to pad.

  • fig_size (tuple, optional (default: None)) – figure size. If None, mpl.rcParams[‘figure.figsize’] will be used.

  • fig_ncol (int, optional (default: 1)) – the number of columns of the figure panel

  • save_fig (bool, optional (default: False)) – if True,save the figure.

  • fig_path (str, optional (default: None)) – If save_fig is True, specify figure path.

  • fig_name (str, optional (default: ‘plot_umap.pdf’)) – if save_fig is True, specify figure name.

Return type:

None