scviva.tools.harreman.tools.select_significant_interactions#

scviva.tools.harreman.tools.select_significant_interactions(adata, ct_aware=False, test='parametric', use_FDR=True, threshold=0.05)[source]#

Select significant gene pairs or metabolite-mediated interactions.

Selection is based on FDR/p-value thresholds and optional cell-type-aware tests.

Parameters:
adata AnnData

AnnData object containing:

  • uns['ccc_results'] or uns['ct_ccc_results'], each of which includes:

    • cell_com_df_gp: DataFrame with statistics for gene pairs

    • cell_com_df_m: DataFrame with statistics for metabolites

ct_aware bool | None

If True, use cell-type–aware CCC results (uns['ct_ccc_results']). If False, use cell-type-agnostic CCC results (uns['ccc_results']).

test Union[Literal['parametric'], Literal['non-parametric'], None]

Determines which statistical columns to use: - Parametric: Z_FDR / Z_pval, C_p - Non-parametric: FDR_np / pval_np, C_np

use_FDR bool | None

If True, threshold significance using FDR values. If False, use raw p-values.

threshold float | None

Significance cutoff applied to the selected statistic (FDR or p-value).

Return type:

None