sctk.calculate_qc
- sctk.calculate_qc(adata, flags={'hb': '^HB', 'mito': '^MT-', 'ribo': '^RP[LS]'}, extra_flags={}, flag_only=False, suffix='', **kwargs) None
Calculate quality control (QC) metrics for an AnnData object. The object is modified in-place.
- Parameters:
adata – AnnData object to calculate QC metrics for.
flags – Dictionary of QC flags and regular expression patterns to match gene names against.
extra_flags – Additional QC flags and patterns to add to flags.
flag_only – If True, only calculate QC flags and do not calculate other metrics.
suffix – Suffix to append to QC metric names.
**kwargs – Additional keyword arguments to pass to
scanpy.pp.calculate_qc_metrics()
.
- Returns:
None.
- Raises:
None. –
Examples
>>> import scanpy as sc >>> import sctk >>> adata = sc.datasets.pbmc3k() >>> sctk.calculate_qc(adata)