scrnatools.qc.filter_cells
- scrnatools.qc.filter_cells(adata: AnnData, genes_thresholds: Tuple[int, int], counts_thresholds: Tuple[int, int], mt_threshold: int = 10) AnnData[source]
Filters cells based on gene number, total counts, and % mitochondrial reads.
- Parameters:
adata (AnnData) – The AnnData with the data to filter.
genes_thresholds (Tuple[int, int]) – A Tuple of thresholds for the number of genes per cell with ‘gene_thresholds[0]’ being the lower bound and ‘gene_thresholds[1]’ being the upper bound (both exclusive).
counts_thresholds (Tuple[int, int]) – A Tuple of thresholds for the number of total counts per cell with ‘count_thresholds[0]’ being the lower bound and ‘count_thresholds[1]’ being the upper bound (both exclusive).
mt_threshold (int, optional) – The maximum percent mitochondrial reads per cell. Defaults to 10.
- Returns:
The dataset filtered on cells that don’t pass the thresholds.
- Return type:
AnnData