stlearn.pl.lr_result_plot

stlearn.pl.lr_result_plot(adata: AnnData, use_lr: Optional[str] = None, use_result: Optional[str] = 'lr_sig_scores', title: Optional[str] = None, figsize: Optional[Tuple[float, float]] = None, cmap: Optional[str] = 'Spectral_r', ax: Optional[Axes] = None, fig: Optional[Figure] = None, show_plot: Optional[bool] = True, show_axis: Optional[bool] = False, show_image: Optional[bool] = True, show_color_bar: Optional[bool] = True, zoom_coord: Optional[float] = None, crop: Optional[bool] = True, margin: Optional[float] = 100, size: Optional[float] = 7, image_alpha: Optional[float] = 1.0, cell_alpha: Optional[float] = 1.0, use_raw: Optional[bool] = False, fname: Optional[str] = None, dpi: Optional[int] = 120, contour: bool = False, step_size: Optional[int] = None, vmin: Optional[float] = None, vmax: Optional[float] = None)[source]

Plots the per spot statistics for given LR.

Parameters:
  • adata (AnnData) – Data on which st.tl.cci.run has been performed

  • use_lr (str) – LR to show results for.

  • use_result (str) – LR matrix in data.obsm; ‘lr_scores’, ‘lr_sig_scores’, ‘p_vals’, ‘p_adjs’ ‘-log10(p_adjs)’.

  • title (str) – Plot title.

  • figsize (tuple) – Figure size.

  • cmap (str) – Color of points.

  • ax (Axes) – Axes on which to plot.

  • fig (Figure) – Figure associated with axes.

  • show_plot (bool) – Whether to show plot or not.

  • show_axis (bool) – Whether to show axis or not.

  • show_image (bool) – Whether to plot the image.

  • show_color_bar (bool) – Whether to show the color bar.

  • crop (bool) – Whether to crop the image down to match spatial coordinates of gene spot present.

  • margin (float) – Margin around the points for the image.

  • size (float) – Size of the points.

  • image_alpha (float) – Transparency of image.

  • cell_alpha (float) – Transparency of points.

  • use_raw (bool) – Whether to use adata.raw or not.

  • fname (str) – Name of file to save plot to.

  • dpi (int) – Plot saving quality.

  • contour (bool) – Whether to plot as contour.

  • step_size (int) – Step size of contour==True

  • vmin (float) – Minimum value of scale bar.

  • vmax (float) – Maximum value of scale bar.