omicverse.pp.qc¶
- omicverse.pp.qc(adata, **kwargs)[source]¶
Perform quality control on a dictionary of AnnData objects.
- Parameters:
adata – AnnData object
mode – The filtering method to use. Valid options are ‘seurat’
'seurat'. (and 'mads'. Default is)
min_cells – The minimum number of cells for a sample to pass QC. Default is 3.
min_genes – The minimum number of genes for a cell to pass QC. Default is 200.
max_cells_ratio – The maximum number of cells ratio for a sample to pass QC. Default is 1.
max_genes_ratio – The maximum number of genes ratio for a cell to pass QC. Default is 1.
nmads – The number of MADs to use for MADs filtering. Default is 5.
doublets – Whether to perform doublet detection. Default is True.
doublets_method – The doublet detection method to use. Options are ‘scrublet’ or ‘sccomposite’. Default is ‘scrublet’.
filter_doublets – Whether to filter out doublets (True) or just flag them (False). Default is True.
path_viz – The path to save the QC plots. Default is None.
tresh – A dictionary of QC thresholds. The keys should be ‘mito_perc’,
'nUMIs' – Only used if mode is ‘seurat’. Default is None.
'detected_genes'. (and) – Only used if mode is ‘seurat’. Default is None.
mt_startswith – The prefix of mitochondrial genes. Default is ‘MT-‘.
mt_genes – The list of mitochondrial genes. Default is None.
None (if mt_genes is not)
ignored. (mt_startswith will be)
- Returns:
An AnnData object containing cells that passed QC filters.
- Return type:
adata
Examples
>>> import omicverse as ov >>> adata = ov.pp.qc(adata, tresh={'mito_perc': 0.2, 'nUMIs': 500, 'detected_genes': 250}) >>> adata = ov.pp.qc(adata, mode='mads', nmads=5, doublets=True)