gseGO for multiple groups
0
0
Entering edit mode
2.8 years ago

I would like to perform the gseGO on DEGs belonging to multiple groups. I am using gseGO within clusterprofiler package . I prepared the input as per the requirement and sorted geneList based on foldchange.

mydf <- data1

mydf1 <- data.frame(Entrez=names(mydf), FC=mydf)

mydf1 <- mydf1[abs(mydf1$FC) > 1,]

mydf1$group <- "upregulated"

mydf1$group[mydf1$FC < 0] <- "downregulated"

mydf1$othergroup <- "1"

mydf_2 <- data2

mydf_2 <- data.frame(Entrez=names(mydf_2), FC=mydf_2)

mydf_2 <- mydf_2[abs(mydf_2$FC) > 1,]

mydf_2$group <- "upregulated"

mydf_2$group[mydf_2$FC < 0] <- "downregulated"

mydf_2$othergroup <- "2"

rlist <- rbind(mydf1,mydf_2)

rlist <- rlist[order(rlist$FC, decreasing = TRUE),]

formula_res <- compareCluster(Entrez~group+othergroup, data=rlist, fun="gseGO", OrgDb = "org.Hs.eg.db")

**But I am getting following error :

formula_res <- compareCluster(Entrez~group+othergroup, data=rlist, fun="gseGO", OrgDb = "org.Hs.eg.db") Error in GSEA_internal(geneList = geneList, exponent = exponent, minGSSize = minGSSize, : geneList should be a decreasing sorted vector...**

I would appreciate all the suggestions.

clusterProfiler gseKEGG gseGO • 1.7k views
ADD COMMENT
0
Entering edit mode

You might need to update your clusterProfiler package and have a look at your formula which is not the one requested in the vignette : https://rdrr.io/github/GuangchuangYu/clusterProfiler/man/compareCluster.html

ADD REPLY
0
Entering edit mode

Thanks alot. I updated my clusterProfiler and got significant gseGO terms by using

res <- compareCluster(geneClusters=inputList, fun = "gseGO") .

Next, I tried to develop enrichplot from the output by using :

test.out <- enrichplot::pairwise_termsim(res)

emapplot(test.out)

BUt it gives "Error in $<-.data.frame(*tmp*, "Cluster", value = NA_integer_) : replacement has 1 row, data has 0"

But my output consist of various enriched terms as you see in the text below :

$ ID : chr "GO:0002377" "GO:0050853" "GO:0050871" "GO:0016064" ... $ Description : chr "immunoglobulin production" "B cell receptor signaling pathway" "positive regulation of B cell activation" "immunoglobulin mediated immune response" ...

$ setSize : int 68 51 53 68 69 84 72 193 119 28 ...

$ enrichmentScore: num 0.754 0.772 0.718 0.668 0.663 ...

$ NES : num 2.87 2.75 2.58 2.54 2.53 ...

$ pvalue : num 1e-10 1e-10 1e-10 1e-10 1e-10 ...

$ p.adjust : num 5.84e-08 5.84e-08 5.84e-08 5.84e-08 5.84e-08 ...

$ qvalues : num 5.35e-08 5.35e-08 5.35e-08 5.35e-08 5.35e-08 ...

$ rank : num 827 581 749 842 842 581 526 777 599 581 ...

$ leading_edge : chr "tags=65%, list=14%, signal=57%" "tags=59%, list=10%, ....

I tried various option but every time I am getting same error and not able to fix it.
I would appreciate your suggestion.

ADD REPLY

Login before adding your answer.

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