scviva.tools.harreman.hotspot.calculate_super_module_scores#
- scviva.tools.harreman.hotspot.calculate_super_module_scores(adata, super_module_dict=None, device='auto', verbose=False)[source]#
Calculate super-module scores for gene super-modules across cells.
- Parameters:
- adata
AnnData Annotated data object (AnnData). Required fields in
adata.uns: - ‘layer_key’: name of the layer from which to extract the expression matrix - ‘model’: statistical model used to normalize expression (e.g., ‘DANB’, ‘normal’) - ‘umi_counts’: total UMI counts per cell - ‘gene_modules’: dictionary mapping module IDs (as strings) to lists of gene names- super_module_dict
dict Dictionary with super-module IDs (integers) as keys and lists of associated modules (as integers) as values.
- device
device|str Device to use for computation (e.g., CUDA or CPU). Defaults to GPU if available.
- verbose
bool|None Whether to print progress and status messages.
- adata
- Return type:
- Returns:
None The following results are stored in the
AnnDataobject:adata.obsm['super_module_scores']: (cells x super-modules) DataFrame with per-cell super-module activity scoresadata.varm['gene_loadings_sm']: (genes x super-modules) DataFrame with gene loadings for each super-moduleadata.uns['gene_modules_sm']: dictionary mapping super-module names to gene lists