stlearn.pl.lr_diagnostics

stlearn.pl.lr_diagnostics(adata, highlight_lrs: list | None = None, n_top: int | None = None, color0: str = 'turquoise', color1: str = 'plum', figsize: tuple = (10, 4), lr_text_fp: dict | None = None, show: bool = True)[source]

Diagnostic plot looking at relationship between technical features of lrs and lr rank. Two plots generated: left is the average of the median for nonzero expressing spots for both the ligand and the receptor on the y-axis, & LR-rank by no. of significant spots on the x-axis. Right is the average of the proportion of zeros for the ligand and receptor gene on teh y-axis.

Parameters:
  • (AnnData) (adata) – The data object on which st.tl.cci.run has been applied.

  • (list) (highlight_lrs) – List of LRs to highlight, will add text and change point color for these LR pairs.

  • (int) (n_top) – The number of LRs to display. If None shows all.

  • (str) (color0) – The color of the nonzero-median scatter plot.

  • (dict) (axis_text_fp) – Font dict for the LR text if highlight_lrs not None.

  • (dict) – Font dict for the axis text labels.

Returns:

Figure and axes of the plot, if show=False.

Return type:

Figure, Axes