Error when runing dotplot with enrichGO results
I used to run the exactly same commands in Rstudio and no errors occured.
ego <- enrichGO(gene=gene_EntrezID,OrgDb = org.Hs.eg.db,keytype = "ENTREZID", ont="BP",readable = T,pvalueCutoff = 0.001,qvalueCutoff = 0.001)
dotplot(ego,colorBy = "pvalue",showCategory = 10)
But now this error jumps out:
Error in unique.default(x, nmax = nmax) :
unique() applies only to vectors
I can't find out the reason, could someone help me please ? Thx !
• 8,627 views
•
link
1 answer
To avoid the error, use DOSE::dotplot instead of dotplot.
The error occurs when you use the lattice package, which may have been loaded by another package you were using:
The following object is masked from ‘package:clusterProfiler’:
dotplot
• 0 views
•
link
Log in to answer this question.
Another question, anyone know how to set compareCluster results readable ? (I mean transfer ENTREZID to GENE SYMBOL) ? Thx again !
Hi,
I never used this package, but looking at your error only, it seems to indicate that your "ego" object is not a vector. Can you see what "ego" is?
or
I found if I use plot() instead of dotplot() , then no errors . Wierd ! Maybe some bugs when authors updating the clusterprofiler package.
or
class(ego). My money is on an unexpected factor.