When setting the pvalueCutoff (0.01) for any of the enrich functions in clusterprofiler/DOSE the resulting object sitll contains results that have a p value >0.01 all the way up to 1.00! The same is also true for qvalueCutoff.
cnet <- enrichKEGG(cnet_list,
pvalueCutoff = 0.01,
pAdjustMethod = 'BH',
minGSSize = 10)
cnet_desc <- cnet@result[order(cnet@result$pvalue, decreasing = TRUE), ]
Note that I have removed multiple columns in cnet_desc to show the issues
head(cnet_desc)
GeneRatio BgRatio pvalue p.adjust qvalue
105/5239 298/8840 1 1 0.5525544
82/5239 368/8840 1 1 0.5525544
28/5239 453/8840 1 1 0.5525544
15/5239 73/8840 1 1 0.5525544
127/5239 312/8840 1 1 0.5525544
15/5239 71/8840 1 1 0.5525544
This is seriously impacting my analysis and I'm not sure how to fix it. Any help or suggesting would be appreciated!
2 answers
If I am not mistaken, all the cut offs are applied on the @result matrix to find pathways. So if you want to know which genes have been used in your KEGG enrichment, you have to filter yourself the @result matrix.
I recently found this other post where they explain how to solve this issue (which, in fact, is not an error, but an incorrect way of extracting the results dataframe from the original object): https://github.com/YuLab-SMU/clusterProfiler/issues/710
Log in to answer this question.