scHopfield.plotting.plot_network_centrality_rank
- scHopfield.plotting.plot_network_centrality_rank(adata: AnnData, metric: str = 'degree_centrality_all', clusters: str | List[str] | None = None, cluster_key: str = 'cell_type', n_genes: int = 50, colors: Dict[str, str] | None = None, skip_first_n: int = 0, figsize: tuple | None = None, ax: Axes | None = None) Axes[source]
Plot top genes ranked by network centrality score.
- Parameters:
adata (AnnData) – Annotated data object with computed centrality metrics
metric (str, optional (default: 'degree_centrality_all')) – Centrality metric to plot. Available: ‘degree_all’, ‘degree_centrality_all’, ‘degree_in’, ‘degree_centrality_in’, ‘degree_out’, ‘degree_centrality_out’, ‘betweenness_centrality’, ‘eigenvector_centrality’
clusters (str or list, optional) – Cluster(s) to plot. If None, plots all clusters
cluster_key (str, optional (default: 'cell_type')) – Key in adata.obs for cluster labels
n_genes (int, optional (default: 50)) – Number of top genes to show
colors (dict, optional) – Colors for each cluster
skip_first_n (int, optional (default: 0)) – Skip top N genes
figsize (tuple, optional) – Figure size
ax (plt.Axes, optional) – Axes to plot on
- Returns:
Axes with plot
- Return type:
plt.Axes