scviva.tools.harreman.tools.compute_interacting_cell_scores#
- scviva.tools.harreman.tools.compute_interacting_cell_scores(adata, center_counts_for_np_test=False, test='both', restrict_significance='both', compute_significance='both', M=1000, seed=42, check_analytic_null=False, device='auto', verbose=False)[source]#
Compute interacting cell scores for gene pairs and metabolites.
- Parameters:
- adata
str|AnnData AnnData object containing: -
uns['model']anduns['mean'](expression normalization model) -uns['gene_pairs'],uns['gene_pairs_per_metabolite']-obsp['weights']: sparse spatial weight matrix -uns['ccc_results'](for significance filtering)- center_counts_for_np_test
bool|None If True, center/normalize counts prior to the non-parametric test.
- test
Union[Literal['parametric'],Literal['non-parametric'],Literal['both'],None] Which interacting cell score tests to compute.
- restrict_significance
Union[Literal['gene pairs'],Literal['metabolites'],Literal['both'],None] Use only significant gene pairs/metabolites from CCC results.
- compute_significance
Union[Literal['parametric'],Literal['non-parametric'],Literal['both'],None] Whether to compute significance (p-values, FDR) in each test.
- M
int|None Number of permutations for the non-parametric test.
- seed
int|None Random seed for permutation reproducibility.
- check_analytic_null
bool|None If True, evaluate the analytic null distribution during permutations.
- device
device|str CPU or GPU device for tensor operations.
- verbose
bool|None Print status updates.
- adata
- Return type:
- Returns:
None Results are stored in
adata.uns['interacting_cell_results'].