clusterProfiler GSEA function set seed
1
0
Entering edit mode
5.7 years ago
mthuang.nj • 0

Hi, everyone, I am using R clusterProfiler package to do GSEA analysis. Following is my code,

        GSEA_GO_BP <- GSEA(cor_sort, 
                exponent = 1, 
                nPerm = 1000, 
                minGSSize = 10, 
                maxGSSize = 500, 
                pvalueCutoff = 1, 
                pAdjustMethod = "BH",
                seed=FALSE,
                TERM2GENE=GO_BP)

I got one question. No matter whether I set seed TRUE or FALSE, GSEA results always changed. I just can't get a reproducible result. Did i set seed in a wrong way? I also see someone else posted the same question, but still no answer.

Thanks in advance.

R clusterProfiler • 4.7k views
ADD COMMENT
0
Entering edit mode

Have you been able solve it? I am having the same issue, and I think it's really important. Every time I run it GSEA using GO and cluster profiler, it give me a different set of enrichment. Please let me know if you figured it out. That will be a great help! Thank you!

ADD REPLY
0
Entering edit mode

Sorry, I still don't know how to figure it out.

ADD REPLY
0
Entering edit mode
5.4 years ago
brivero • 0

hey! I had the same issue and I fixed it by adding set.seed(1234) before the function, and then seed = T within the function. You should get the same results now.

set.seed(1234)
GSEA_GO_BP <- GSEA(cor_sort, 
                exponent = 1, 
                nPerm = 1000, 
                minGSSize = 10, 
                maxGSSize = 500, 
                pvalueCutoff = 1, 
                pAdjustMethod = "BH",
                seed=TRUE,
                TERM2GENE=GO_BP)
ADD COMMENT
0
Entering edit mode

If this doesn't solve the issue, I strongly recommend to alert the author of the package directly. Actually, I suspect it's a problem with the fgsea algorithm, according to this issue, the solution proposed by brivero should hold up.

ADD REPLY

Login before adding your answer.

Traffic: 1609 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6