omicverse.single.DCT#
- class omicverse.single.DCT(adata, condition, ctrl_group, test_group, cell_type_key, method='sccoda', sample_key=None, use_rep=None)[source]#
Differential cell-type abundance testing wrapper.
- Parameters:
- __init__(adata, condition, ctrl_group, test_group, cell_type_key, method='sccoda', sample_key=None, use_rep=None)[source]#
Initialize differential cell-type abundance analysis.
- Parameters:
adata (AnnData) – Single-cell AnnData object.
condition (str) – Obs column containing condition labels.
ctrl_group (str) – Control condition label.
test_group (str) – Test condition label.
cell_type_key (str) – Obs column containing cell-type annotations.
method (str, default='sccoda') – Differential abundance method:
'sccoda','milo', or'milopy'.sample_key (str or None, default=None) – Obs column containing sample IDs (required for Milo methods).
use_rep (str or None, default=None) – Embedding key in
adata.obsmused for neighborhood graph in Milo.
- Return type:
None
Methods
__init__(adata, condition, ctrl_group, ...)Initialize differential cell-type abundance analysis.
get_results([mix_threshold])Retrieve differential abundance results.
run(**kwargs)Run differential abundance testing.