GSEA results change in clusterProfiler
1
3
Entering edit mode
3.4 years ago
sugus ▴ 80

Hi there,

Actually I have two questions,

First, how to extract detail information from a GSEA object derived from GSEA() {clusterPorfiler R package}. Like the cmd:

GSEA.RES <- GSEA(geneList = geneList,TERM2GENE=MSigDB,seed = 111,verbose=F)


I have to use gseaplot and point the interested pathway ID to show the figure, but I want the detail txt information, how to get that?

Second, why GSEA results changed whatever I set seed or not? If I re-run the cmd above, I will get totally different res data.frame with different number of enrichmenet pathways.

res <- as.data.frame(GSEA.RES)


Thanks advanced!

clusterProfiler GSEA • 3.0k views
ADD COMMENT
1
Entering edit mode

Did you figure out why the results change? I am having the same issue and seem to have no idea how to fix this. Thanks!

ADD REPLY
0
Entering edit mode

Yeah, it is true that the result would change no matter what seed you set. But try to set the nPerm = 10000 instead of 1000 by default, and that would quite stable just like you set a seed!

ADD REPLY
0
Entering edit mode

About your second question, the manual stats that seed is logical. So I don't understand why you are getting different results and why a numeric value is even accepted.

gesaplot should take the output of GSEA (which is a gseaResult object) directly.

ADD REPLY
0
Entering edit mode

OMG it should be logical, how stupid I am.... Thanks for pointing out that and let me try.

ADD REPLY
0
Entering edit mode

Actually nothing happened when I set logical seed. The results still change.

ADD REPLY
0
Entering edit mode
3.4 years ago
Guangchuang Yu ★ 2.5k

as.data.frame also works for clusterProfiler's GSEA output.

ADD COMMENT
1
Entering edit mode

Hi Yu, I have come up to a problem and have googled for so long and still don't know why. Here is my question: my result change everytime I run GSEA and had a huge different from hypergeometric test. Could you point out the fatal mistake here or ...?

>head(gfc)
RPL27A    RPL36     TOP1    RPL19    CISD2    SRSF3
9.542637 9.536003 9.192850 9.173334 9.131146 8.986254
> head(genesets,2)
ont  gene
1 KEGG_GLYCOLYSIS_GLUCONEOGENESIS ACSS2
2 KEGG_GLYCOLYSIS_GLUCONEOGENESIS   GCK

gsea <- GSEA(gfc, TERM2GENE = genesets, minGSSize = 10,
pAdjustMethod = "BH",
pvalueCutoff = 0.1,nPerm = 1000,
verbose=FALSE); head(gsea)
gsea <- as.data.frame(gsea)
dim(gsea)

ADD REPLY
0
Entering edit mode

Thanks Yu, but how to get detailed information for each pathway.

For example, GSEA output could be summary to a data frame with a lot of pathways, but gseaplot shall extract information from one of these pathway to plot figure, how to get this kind of information?

Thanks advanced.

ADD REPLY

Login before adding your answer.

Traffic: 1557 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