scmagnify.plotting.stripplot

Contents

scmagnify.plotting.stripplot#

scmagnify.plotting.stripplot(data, modal='GRN', key='network_score', sortby='degree_centrality', n_top=30, cmap='Reds', selected_genes=None, values=None, hue='mean_activity', colorbar=True, wspace=0.4, context=None, default_context=None, theme='darkgrid', font_scale=1, show=None, save=None, **kwargs)#

Plot a PairGrid of the top n-th genes with high-network scores, with isolated plotting parameters and italicized gene labels.

Parameters:
  • data (AnnData | MuData | GRNMuData) – Single cell data object. Can be an anndata.AnnData, mudata.MuData, scmagnify.GRNMuData

  • modal (Literal['GRN', 'RNA', 'ATAC'] (default: 'GRN')) – Modality key (e.g., ‘RNA’, ‘ATAC’) when using multi-modal data. mudata.MuData or scmagnify.GRNMuData must be provided.

  • key (str (default: 'network_score')) – Key in .varm to retrieve the DataFrame.

  • sortby (str (default: 'degree_centrality')) – Column name in the DataFrame to sort genes by.

  • n_top (int (default: 30)) – Number of top genes to display based on the sortby column.

  • cmap (str (default: 'Reds')) – Colormap name or object. See matplotlib.cm.

  • selected_genes (Optional[list[str]] (default: None)) – List of gene names to highlight in the plot. These genes will be colored differently and bolded.

  • values (Optional[list[str]] (default: None)) – List of column names in the DataFrame to plot. If None, all columns except hue will be used.

  • hue (str (default: 'mean_activity')) – Column name in the DataFrame to use for coloring the points.

  • colorbar (bool (default: True)) – Whether to display a colorbar for the hue.

  • wspace (float | None (default: 0.4)) – Width space between subplots.

  • context (Optional[str] (default: None)) – Seaborn context, e.g., ‘notebook’, ‘paper’. See seaborn.set_context().

  • default_context (Optional[dict] (default: None)) – If True, reset to default seaborn context before plotting.

  • theme (str | None (default: 'darkgrid')) – Theme name or rcParams overrides. See seaborn.set_theme().

  • font_scale (float | None (default: 1)) – Scale factor applied to fonts for the plot. See seaborn.set_context().

  • show (Optional[bool] (default: None)) – Whether to display the figure. If None, the figure will be shown by default.

  • save (Optional[str] (default: None)) – Whether to save the figure. If True, the figure is saved to a file using the writekey. If a str is provided, it is used as the filename, potentially overriding other settings. If None or False, the figure is not saved.

  • **kwargs – Additional keyword arguments passed to seaborn.stripplot.

Returns:

None Displays the PairGrid plot.