scrnatools.qc.scrublet

scrnatools.qc.scrublet(adata: AnnData, raw_counts_layer: str, doublet_threshold: float = 0.2, batch_key: str | None = None, subset: bool = False) AnnData[source]

Filters out doublets using scrublet.

Parameters:
  • adata (AnnData) – The dataset to process

  • raw_counts_layer (str) – A key in ‘adata.layers’ pointing to the raw counts data.

  • doublet_threshold (float, optional) – The doublet score threshold to call doublets/singlets on. Defaults to 0.2.

  • batch_key (str, optional) – A column in ‘adata.obs’ annotating different batches of data. If ‘None’ treats all cells as coming from the same batch. Defaults to None.

  • subset (bool, optional) – Whether to filter the doublets in place or just annotate them.

Returns:

The dataset provided with doublets filtered/labeled based on doublet_threshold

Return type:

AnnData