dandelion.external.scanpy.recipe_scanpy_qc

dandelion.external.scanpy.recipe_scanpy_qc(adata, layer=None, mito_startswith='MT-', max_genes=2500, min_genes=200, mito_cutoff=5, run_scrublet=True, pval_cutoff=0.1, min_counts=None, max_counts=None, blacklist=None, vdj_pattern='^TR[AB][VDJ]|^IG[HKL][VDJC]')[source]

Recipe for running a standard scanpy QC workflow.

Parameters:
  • adata (AnnData) – annotated data matrix of shape n_obs × n_vars. Rows correspond to cells and columns to genes.

  • layer (str | None, optional) – name of layer to run scrublet on if supplied.

  • mito_startswith (str, optional) – string pattern used for searching mitochondrial genes.

  • max_genes (int, optional) – maximum number of genes expressed required for a cell to pass filtering

  • min_genes (int, optional) – minimum number of genes expressed required for a cell to pass filtering

  • mito_cutoff (int | None, optional) – maximum percentage mitochondrial content allowed for a cell to pass filtering.

  • run_scrublet (bool, optional) – whether or not to run scrublet for doublet detection.

  • pval_cutoff (float, optional) – maximum Benjamini-Hochberg corrected p value from doublet detection protocol allowed for a cell to pass filtering. Default is 0.1.

  • min_counts (int | None, optional) – minimum number of counts required for a cell to pass filtering.

  • max_counts (int | None, optional) – maximum number of counts required for a cell to pass filtering.

  • blacklist (list[str] | None, optional) – if provided, will exclude these genes from highly variable genes list.

  • vdj_pattern (str, optional) – string pattern for search VDJ genes to exclude from highly variable genes.

Raises:

ImportError – if scrublet not installed.