scHopfield.tools.get_eigenanalysis_table
- scHopfield.tools.get_eigenanalysis_table(adata: AnnData, cluster_key: str = 'cell_type', n_genes: int = 20, order: List[str] | None = None) DataFrame[source]
Create formatted table with top genes from extreme eigenvectors.
- Parameters:
adata (AnnData) – Annotated data object with computed eigenanalysis
cluster_key (str, optional (default: 'cell_type')) – Key in adata.obs for cluster labels
n_genes (int, optional (default: 20)) – Number of top genes to include per cluster
order (list, optional) – Order of clusters in table. If None, uses all clusters
- Returns:
DataFrame with MultiIndex columns (cluster, [‘+EV gene’, ‘+EV value’, ‘-EV gene’, ‘-EV value’])
- Return type:
pd.DataFrame