pairot.pp.filter_genes_ova#
- pairot.pp.filter_genes_ova(de_res, logfc_threshold=1.0, aucroc_threshold=0.6, adj_pval_threshold=0.05, gene_filtering=True)#
Sort and filter DEGs for the OVA (one vs all) setting.
Sort differentially expressed genes (DEGs) by logFC and filter them based on logFC, AUROC, and adjusted p-value thresholds. Additionally, uninformative genes can be filtered out. This functions processes the DE results from the OVA (one = vs. all) setting from
pairot.pp.rank_genes_limma().- Parameters:
de_res (
dict[str,DataFrame]) – OVA (one vs. all) DE results frompairot.pp.rank_genes_limma().logfc_threshold (
float(default:1.0)) – Minimum logFC threshold to consider a gene as differentially expressed. Genes with a smaller logFC will be filtered out.aucroc_threshold (
float(default:0.6)) – Minimum AUROC threshold. Genes with a smaller AUROC will be filtered out.adj_pval_threshold (
float(default:0.05)) – Maximum adjusted p-value threshold to consider a gene as differentially expressed. Genes with a larger adjusted p-value will be filtered out.gene_filtering (
bool(default:True)) – If true, remove uninformative genes, e.g., mitochondrial, ribosomal, IncRNA, TCR and BCR genes.
- Return type:
- Returns:
top_de_genes_ova Dictionary containing the filtered and sorted (by logFC) DE results for each cluster.
Examples
>>> import pairot as pr >>> >>> de_res_ova, de_res_ava = pr.pp.rank_genes_limma( >>> adata, >>> cluster_label="cell_type_col", >>> sample_label="sample_col", >>> ) >>> de_res_ova_sorted_and_filtered = pr.pp.filter_genes_ova( >>> de_res_ova, >>> logfc_threshold=1.0, >>> aucroc_threshold=0.6, >>> adj_pval_threshold=0.05, >>> gene_filtering=True, >>> ) >>> de_res_ova_sorted_and_filtered