snapatac2.pp.filter_doublets#
- snapatac2.pp.filter_doublets(adata, probability_threshold=0.5, score_threshold=None, inplace=True, n_jobs=8, verbose=True)[source]#
Remove doublets.
scrublet()must be ran first in order to use this function.- Parameters:
adata (
AnnData|list[AnnData]) – The (annotated) data matrix of shapen_obsxn_vars. Rows correspond to cells and columns to regions.probability_threshold (
Optional[float]) – Threshold for doublet probability.score_threshold (
Optional[float]) – Threshold for doublet score.inplace (
bool) – Perform computation inplace or return result.n_jobs (
int) – Number of jobs to run in parallel.verbose (
bool) – Whether to print progress messages.
- Returns:
If
inplace = True, directly subsets the data matrix. Otherwise return a boolean index mask that does filtering, whereTruemeans that the cell is kept,Falsemeans the cell is removed.- Return type:
np.ndarray | None