sccloud.qc_metrics¶
-
sccloud.qc_metrics(data, mito_prefix='MT-', min_genes=500, max_genes=6000, min_umis=100, max_umis=600000, percent_mito=10.0, percent_cells=0.05)[source]¶ Generate Quality Control (QC) metrics on the dataset.
- Parameters
data (
anndata.AnnData) – Annotated data matrix with rows for cells and columns for genes.mito_prefix (
str, optional, default:"MT-") – Prefix for mitochondrial genes.min_genes (
int, optional, default:500) – Only keep cells with at leastmin_genesgenes.max_genes (
int, optional, default:6000) – Only keep cells with less thanmax_genesgenes.min_umis (
int, optional, default:100) – Only keep cells with at leastmin_umisUMIs.max_umis (
int, optional, default:600,000) – Only keep cells with less thanmax_umisUMIs.percent_mito (
float, optional, default:10.0) – Only keep cells with percent mitochondrial genes less thanpercent_mito% of total counts.percent_cells (
float, optional, default:0.05) – Only assign genes to berobustthat are expressed in at leastpercent_cells% of cells.
- Return type
None- Returns
NoneUpdate
data.obs–n_genes: Total number of genes for each cell.n_counts: Total number of counts for each cell.percent_mito: Percent of mitochondrial genes for each cell.passed_qc: Boolean type indicating if a cell passes the QC process based on the QC metrics.
Update
data.var–n_cells: Total number of cells in which each gene is measured.percent_cells: Percent of cells in which each gene is measured.robust: Boolean type indicating if a gene is robust based on the QC metrics.highly_variable_features: Boolean type indicating if a gene is a highly variable feature. By default, set all robust genes as highly variable features.
Examples
>>> scc.qcmetrics(adata)