sc_reconstruction.metrics.metric_deg#
- sc_reconstruction.metrics.metric_deg(adata_true, adata_pred, *, ref_true, ref_pred, method='wilcoxon', dice_k=(100,), min_cells=20, set_neg_to_zero=False, fdr_threshold=0.05)[source]#
Differential-expression recovery vs a reference (e.g. control) condition.
The Wilcoxon and t-test calls are forwarded to scanpy [Wolf et al., 2018]. The metric computes DEGs of (true vs ref_true) and (pred vs ref_pred), then reports overlap (Dice@k) and rank-correlation on the log-fold-changes. Wraps
DegCalculator.compute_deg().- Parameters:
ref_true (anndata.AnnData) – Reference (e.g. control) condition’s true and predicted expression.
ref_pred (anndata.AnnData) – Reference (e.g. control) condition’s true and predicted expression.
method (str) –
"wilcoxon"or"t-test". Forwarded to scanpy [Wolf et al., 2018].dice_k (Sequence[int]) – K values at which to compute Dice overlap of top-K DEGs.
adata_true (anndata.AnnData)
adata_pred (anndata.AnnData)
min_cells (int)
set_neg_to_zero (bool)
fdr_threshold (float | None)
- Return type: