stlearn.pl.deconvolution_plot

stlearn.pl.deconvolution_plot(adata: AnnData, library_id: str | None = None, use_label: str = 'leiden', cluster: int | str | None = None, celltype: str | None = None, celltype_threshold: float = 0, data_alpha: float = 1.0, threshold: float = 0.0, cmap: str = 'tab20', colors: list[tuple[float, float, float, float]] | None = None, spot_size: float | int = 10, show_axis: bool = False, show_legend: bool = True, show_donut: bool = True, cropped: bool = True, margin: int = 100, name: str | None = None, dpi: int = 150, output: str | None = None, figsize: tuple = (6.4, 4.8), show=True) None[source]

Clustering plot for sptial transcriptomics data. Also, it has a function to display trajectory inference.

Parameters:
  • adata – Annotated data matrix.

  • library_id – Library id stored in AnnData.

  • use_label – Use label result of cluster method.

  • cluster – Choose a cluster (in adata.obs[use_label]) that will display in the plot.

  • data_alpha – Opacity of the spot.

  • tissue_alpha – Opacity of the tissue.

  • cmap – Color map to use.

  • spot_size – Size of the spot.

  • show_axis – Show axis or not.

  • show_legend – Show legend or not.

  • show_donut – Whether to show the donut plot or not.

  • show_trajectory – Show the spatial trajectory or not. It requires stlearn.spatial.trajectory.pseudotimespace.

  • show_subcluster – Show subcluster or not. It requires stlearn.spatial.trajectory.global_level.

  • name – Name of the output figure file.

  • dpi – DPI of the output figure.

  • output – Save the figure as file or not.

  • copy – Return a copy instead of writing to adata.

Return type:

Nothing