scHopfield.plotting.plot_gene_correlation_scatter
- scHopfield.plotting.plot_gene_correlation_scatter(adata: AnnData, clus1: str, clus2: str, energy: str = 'total', cluster_key: str = 'cell_type', ax: Axes | None = None, annotate: int | None = None, clus1_low: float = -0.5, clus1_high: float = 0.5, clus2_low: float = -0.5, clus2_high: float = 0.5) Axes[source]
Plot scatter of gene correlations between two clusters.
Creates a scatter plot comparing the gene correlations with energy landscapes between two clusters, highlighting genes with divergent behavior (strongly positive in one cluster, strongly negative in the other).
- Parameters:
adata (AnnData) – Annotated data object with computed correlations
clus1 (str) – First cluster name (x-axis)
clus2 (str) – Second cluster name (y-axis)
energy (str, optional (default: 'total')) – Energy type: ‘total’, ‘interaction’, ‘degradation’, or ‘bias’
cluster_key (str, optional (default: 'cell_type')) – Key in adata.obs for cluster labels
ax (plt.Axes, optional) – Axes to plot on. If None, creates new figure
annotate (int, optional) – If provided, annotates top N divergent genes
clus1_low (float, optional (default: -0.5)) – Lower threshold for clus1 to identify divergent genes
clus1_high (float, optional (default: 0.5)) – Upper threshold for clus1 to identify divergent genes
clus2_low (float, optional (default: -0.5)) – Lower threshold for clus2 to identify divergent genes
clus2_high (float, optional (default: 0.5)) – Upper threshold for clus2 to identify divergent genes
- Returns:
Axes with plot
- Return type:
plt.Axes