Hi everyone, Just a quick question. I want to perform GSEA on my geneList using clusterProfiler. Since I have a lot of genes and for some of them the logFC is small, I would like to perform GSEA only on the genes that have a logFC > 2. How do I do that in R?
I am following the recommended steps to prepare the geneList:
geneList = d[,2]
names(geneList) = as.character(d[,1])
geneList = sort(geneList, decreasing = TRUE)
followed by:
gene <- names(geneList)[abs(geneList) > 2]
but then I do not understand how to "filter" the gene list that will be submitted to GSEA? Maybe I am not supposed to do it, and I should only run GSEA with the whole geneList set? The code for GSEA I am using is:
kkGSEA <- gseKEGG(geneList=geneList, organism = "hsa", nPerm = 1000, pvalueCutoff = pvalue_gsea, minGSSize = 5)
Any help would be much much appreciated. Thanks :D
Thanks Ludwig for the clear explanation! I see what you mean. I’ll carry the over-representation test then
Thanks Luca