scdrs.method.test_gearysc#
- scdrs.method.test_gearysc(adata: AnnData, df_full_score: DataFrame, groupby: str, opt='control_distribution_match') DataFrame [source]#
Compute significance level for Geary’s C statistics.
- Parameters:
- adataanndata.AnnData
Must contain connectivities to compute the Geary’s C statistic.
- df_full_scoreDataFrame
DataFrame with the scores of the cells, contains columns zscore, norm_score, ctrl_norm_score_{i}
- groupbystr
Column name of the groupby variable.
- optstr
- Options:
- “control_distribution_match”:
The distribution of the scores of the control scores is similar to the distribution of the scores of the disease scores.
- Returns:
- df_rlsDataFrame
DataFrame with the results of the test with n_group rows and 4 columns:
pval: significance level of Geary’s C
trait: Geary’s C test statistic of the trait scores
ctrl_mean: mean of the control scores
ctrl_sd: standard deviation of the control scores