troutpy.pl.intra_extra_density#
- troutpy.pl.intra_extra_density(sdata, genes, layer='transcripts', gene_key='feature_name', coord_keys=None, intra_kde_kwargs=None, extra_kde_kwargs=None, figsize=None)#
Plot KDEs of the spatial distribution of intracellular and extracellular transcripts for a list of genes.
Each gene is displayed in a separate row with intracellular and extracellular KDEs in side-by-side subplots.
- Parameters:
sdata (
SpatialData) – Spatial data object containing transcript locations and metadata.layer (
str(default:'transcripts')) – Layer withinsdatawhere transcripts are stored.gene_key (
str(default:'feature_name')) – Column name where the gene name is stored.coord_keys (
Optional[list[str]] (default:None)) – Column names for spatial coordinates. IfNone, defaults to["x", "y"].intra_kde_kwargs (
Optional[dict] (default:None)) – Optional arguments forseaborn.kdeplot()for intracellular data.extra_kde_kwargs (
Optional[dict] (default:None)) – Optional arguments forseaborn.kdeplot()for extracellular data.figsize (
Optional[tuple[float,float]] (default:None)) – Size of the figure. IfNone, computed automatically based on the number of genes.
- Return type:
- Returns:
None