Different p_val_adj manually and Seurat #10063
-
Hi, I’m experiencing an issue with the p_val_adj. I noticed that the adjusted p-values returned by FindMarkers() are not the same as those I obtain when applying the correction manually using p.adjust(p_raw, method = "fdr"). I ran the analysis using all genes (min.pct = 0), but I still get different adjusted p-values (p_val_adj) between the two approaches. In fact, I obtained more significant genes and DARs when doing the correction manually than when using FindMarkers(). How is this possible? According to the FindMarkers() manual, FDR-based correction methods are not recommended because Seurat pre-filters genes using parameters such as logfc.threshold = 0.25 or min.pct = 0.1, which reduces the number of tests performed. This reduced test set should still be accounted for, but FDR-based methods cannot properly handle this. My question is: does FindMarkers() filter the genes first (by min.pct = 0.1 and logfc.threshold = 0.25) before calculating the adjusted p-values (p_val_adj)? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi, So first just as note the results would not match when using code you provided because Seurat doesn't use FDR correction but bonferroni. Second, as has been discussed on GitHub a bunch, Seurat corrects vs. all genes present in object which you can see in raw code here: seurat/R/differential_expression.R Lines 627 to 631 in e44cb2c Best, |
Beta Was this translation helpful? Give feedback.
-
Here you go I did the analysis using the default filtering and then removing the filtering and applying the filtering afterwards.
|
Beta Was this translation helpful? Give feedback.
Hi,
So first just as note the results would not match when using code you provided because Seurat doesn't use FDR correction but bonferroni. Second, as has been discussed on GitHub a bunch, Seurat corrects vs. all genes present in object which you can see in raw code here:
seurat/R/differential_expression.R
Lines 627 to 631 in e44cb2c
Best,
Sam