scdrs.method.downstream_corr_analysis#

scdrs.method.downstream_corr_analysis(adata: AnnData, df_full_score: DataFrame, var_cols: List[str]) DataFrame[source]#

scDRS cell-level correlation analysis.

For a given individual cell-level annotation (e.g., T cell effectorness gradient), assess association between disease and the individual cell-level variable (control-score-based Monte Carlo tests using Pearson’s correlation).

Parameters:
adataanndata.AnnData

Single-cell data of shape (n_cell, n_gene). Assumed to be size-factor-normalized and log1p-transformed.

df_full_scorepd.DataFrame

scDRS .full_score file for a given trait.

var_colsList[str]

List of column names in adata.obs for continous cell-level variables.

Returns:
df_respd.DataFrame

Correlation results (n_var, n_stats).