eroor mssage using gseKEGG
2
0
Entering edit mode
@brunosaubamea-13693
Last seen 7.3 years ago

Can someone please help to debug this error using the gseKEGG function in clusterProfiler ?

This is how I prepare the ranked gene list

> y=geneset$log2FoldChange
> names(y)=as.character(geneset$Entrez_Gene_ID)
> y<-sort(y, decreasing=TRUE)

> head(y)
  362893    29219   116568    83585    83500   366957
7.763638 7.740288 7.731271 7.630551 7.594507 7.535680

and this is what I get from gseKEGG

> kk2 <- gseKEGG(geneList     = y,
+                organism     = 'rno',
+                keyType="ncbi-geneid",
+                nPerm        = 1000,
+                minGSSize    = 120,
+                pvalueCutoff = 0.05,
+                verbose      = TRUE)
preparing geneSet collections...
GSEA analysis...
Error in data.frame(ID = as.character(tmp_res$pathway), Description = Description,  :
  arguments imply differing number of rows: 0, 1

Thank you

 

clusterprofiler • 2.9k views
ADD COMMENT
0
Entering edit mode
Guido Hooiveld ★ 4.1k
@guido-hooiveld-2020
Last seen 9 days ago
Wageningen University, Wageningen, the …

You very likely have to decrease minGSSize to a lower number...

 

Using the provided, human sample dataset:

>library(clusterProfiler)
>data(geneList)

> kk <- gseKEGG(geneList     = geneList,
+                 organism     = 'hsa',
+                 keyType="ncbi-geneid",
+                 nPerm        = 1000,
+                 minGSSize    = 500,
+                 pvalueCutoff = 0.05,
+                 verbose      = TRUE)
preparing geneSet collections...
GSEA analysis...
Error in data.frame(ID = as.character(tmp_res$pathway), Description = Description,  :
  arguments imply differing number of rows: 0, 1
In addition: Warning messages:
1: In min(p) : no non-missing arguments to min; returning Inf
2: In max(p) : no non-missing arguments to max; returning -Inf
3: In min(p) : no non-missing arguments to min; returning Inf
4: In max(p) : no non-missing arguments to max; returning -Inf

> kk <- gseKEGG(geneList     = geneList,
+                 organism     = 'hsa',
+                 keyType="ncbi-geneid",
+                 nPerm        = 1000,
+                 minGSSize    = 100,
+                 pvalueCutoff = 0.05,
+                 verbose      = TRUE)
preparing geneSet collections...
GSEA analysis...
leading edge analysis...
done...
>

 

ADD COMMENT
0
Entering edit mode

thanks for your comments. I think I need to update the code to throw more informative error in this case.

ADD REPLY
0
Entering edit mode
@brunosaubamea-13693
Last seen 7.3 years ago

That's it! Thank you

ADD COMMENT

Login before adding your answer.

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