dynamo.pp.filter_genes_by_pattern¶
- dynamo.pp.filter_genes_by_pattern(adata, patterns=('MT-', 'RPS', 'RPL', 'MRPS', 'MRPL', 'ERCC-'), drop_genes=False)[source]¶
Utility function to filter mitochondria, ribsome protein and ERCC spike-in genes, etc.
- Parameters:
adata (
AnnData) – an AnnData object.patterns (
Tuple[str] (default:('MT-', 'RPS', 'RPL', 'MRPS', 'MRPL', 'ERCC-'))) – the patterns used to filter genes. Defaults to (“MT-”, “RPS”, “RPL”, “MRPS”, “MRPL”, “ERCC-“).drop_genes (
bool(default:False)) – whether inplace drop the genes from the AnnData object. Defaults to False.
- Return type:
- Returns:
A list of indices of matched genes if drop_genes is False. Otherwise, returns none.