stlearn.pl.lr_summary

stlearn.pl.lr_summary(adata, n_top: int = 50, highlight_lrs: Optional[list] = None, y: str = 'n_spots_sig', color: str = 'gold', figsize: Optional[tuple] = None, highlight_color: str = 'red', max_text: int = 50, lr_text_fp: Optional[dict] = None, ax: Optional[Axes] = None, show: bool = True)[source]

Plotting the top LRs ranked by number of significant spots.

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

  • n_top (int) – The no. of LRs to plot.

  • highlight_lrs (list) – A list of LRs to highlight on the plot, will added text and change color of points for these LRs. Useful for highlighting LRs of interest.

  • y (str) – The way to rank the LRs, default is by the no. of signifcant spots, but can be any column in adata.uns[‘lr_summary’].

  • color (str) – The color of the points.

  • figsize (tuple) – Size of the figure; (width, height).

  • highlight_color (str) – Only relevant if highlight_lrs specified; controls colour of LRs to highlight.

  • max_text (int) – If the no. of n_top is above this limit, stop showing text to indicate the LR names. Allows to see global shape without crowding with LR name text.

  • lr_text_fp (dict) – Matplotlib font dictionary specifying text details, eg fontsize.

  • ax (Axes) – Axes on which to draw the scatter plot; if not inputted constructs own.

  • show (bool) – Whether to show the plot, if False will return the ax.

Returns:

If show=False, returns the ax for additional modification.

Return type:

Axes