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)


clusterProfiler GSEA • 3.0k views
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!

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!

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.

0
Entering edit mode

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

0
Entering edit mode

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

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

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

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
ont  gene
1 KEGG_GLYCOLYSIS_GLUCONEOGENESIS ACSS2
2 KEGG_GLYCOLYSIS_GLUCONEOGENESIS   GCK

gsea <- GSEA(gfc, TERM2GENE = genesets, minGSSize = 10,
pvalueCutoff = 0.1,nPerm = 1000,
gsea <- as.data.frame(gsea)
dim(gsea)

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?

Traffic: 1743 users visited in the last hour
FAQ
API
Stats

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