scmorph.tl.get_ks

Contents

scmorph.tl.get_ks#

scmorph.tl.get_ks(adata, batch_key=None, treatment_key='Treatment', well_key='Well', control='DMSO', control_wells=None)[source]#

Performs the KS test for all treatments and establishes a KS cutoff based on control wells FDR.

Parameters:
adata AnnData

The AnnData object containing the data.

treatment_key str (default: 'Treatment')

The column name for treatments, by default “Treatment”.

well_key str (default: 'Well')

The column name for wells, by default “Well”.

control str (default: 'DMSO')

The negative control treatment, by default “DMSO”. Either neg_control or neg_wells must be provided.

control_wells list | None (default: None)

The negative control wells, by default None.

Return type:

tuple[DataFrame, DataFrame]

Returns:

A tuple containing the reference KS results and the treatment KS results.