scHopfield.plotting.plot_top_affected_genes_bar
- scHopfield.plotting.plot_top_affected_genes_bar(adata: AnnData, n_genes: int = 20, cluster: str | None = None, cluster_key: str = 'cell_type', figsize: Tuple[float, float] = (10, 8), ax: Axes | None = None) Axes[source]
Bar plot of top affected genes showing direction and magnitude.
- Parameters:
adata (AnnData) – Annotated data object with simulation results
n_genes (int, optional (default: 20)) – Number of genes to show
cluster (str, optional) – Specific cluster to analyze. If None, uses all cells.
cluster_key (str, optional (default: 'cell_type')) – Key in adata.obs for cluster labels
figsize (tuple, optional) – Figure size
ax (plt.Axes, optional) – Axes to plot on
- Returns:
Axes with plot
- Return type:
plt.Axes