troutpy.pl.rank_factor_genes_loadings_matrixplot

troutpy.pl.rank_factor_genes_loadings_matrixplot#

troutpy.pl.rank_factor_genes_loadings_matrixplot(sdata, layer, n_genes=5, cmap='Pinks', vmin=None, vmax=None, show=True, save=None, figsize=None)#

Plot ranking of genes using a matrixplot based on factor loadings.

Parameters:
  • sdata (spatialdata.SpatialData) – The spatial data object containing gene expression information.

  • layer (str) – The layer in sdata that contains the AnnData object.

  • n_genes (int) – Number of top genes to plot per factor, by default 20.

  • cmap (str) – Colormap for visualization, by default “bwr”.

  • vmin (float) – Color scaling limits.

  • vmax (float) – Color scaling limits.

  • show (bool) – Whether to display the plot, by default True.

  • save (str) – Path to save the figure, by default None.