-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pairwise_termsim Throws Error if No Significant Gene Sets #269
Comments
Could you please add the upstream-code that results in this error? |
Yes, certainly. I thought this was by design and expected. To me, it is undesirable and rigid. I show a self-contained example. library(enrichplot)
library(DOSE)
library(clusterProfiler)
library(msigdbr)
library("org.Hs.eg.db", character.only = TRUE)
hallmarks <- msigdbr(category = "H")
hallmarks <- split(hallmarks[["gene_symbol"]], hallmarks[["gs_name"]])
geneSet <- hallmarks[["HALLMARK_ANDROGEN_RESPONSE"]]
all <- unlist(hallmarks)
result <- enrichGO(gene = geneSet, ont = "BP", keyType = "SYMBOL", universe = all, OrgDb = "org.Hs.eg.db")
similarities <- pairwise_termsim(result) This causes |
Thanks for providing the code. I could reproduce the error.
On one hand I do understand that because of reasons of automation/scripting you would like that To be honest, I cannot think of an easy way to have @huerqiang : do you have any ideas on this? |
The input is not empty. It is not a case of "no gene sets present in the input". There are many present. > head(result@result)
ID Description GeneRatio BgRatio pvalue p.adjust qvalue
GO:0070972 protein localization to endoplasmic reticulum 5/100 24/4306 0.0001828789 0.308324 0.303
GO:0003006 developmental process involved in reproduction 17/100 302/4306 0.0004847255 0.308324 0.303
GO:0008299 isoprenoid biosynthetic process 4/100 17/4306 0.0005166236 0.308324 0.303
GO:0030521 androgen receptor signaling pathway 4/100 19/4306 0.0008118204 0.308324 0.303
GO:0000003 reproduction 22/100 480/4306 0.0011720568 0.308324 0.303
GO:0008610 lipid biosynthetic process 15/100 269/4306 0.0011891493 0.308324 0.303
|
My supervisor has asked me to plot the top ten ranked sets if none are significant, but that does not seem to be possible.
The text was updated successfully, but these errors were encountered: