snapatac2.pp.call_doublets#
- snapatac2.pp.call_doublets(adata, threshold='gmm', random_state=0, inplace=True)[source]#
Find doublet score threshold for calling doublets.
pp.scrublet
must be run first.- Parameters
adata (
AnnData
) – AnnData objectthreshold (
str
|float
) –Mannually specify a threshold or use one of the default methods to automatically identify a threshold:
’gmm’: fit a 2-component gaussian mixture model.
’scrublet’: the method used in the scrublet paper (not implemented).
random_state (
int
) – Random stateinplace (
bool
) – Whether update the AnnData object inplace
- Returns
- if
inplace = True
, it updates adata with the following fields: adata.obs["is_doublet"]
: boolean maskadata.uns["scrublet"]["threshold"]
: saved threshold
- if
- Return type
tuple[np.ndarray, float] | None