Error when runing dotplot with enrichGO results
1
2
Entering edit mode
4.7 years ago
dingailuma ▴ 20

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 !

ClusterProfier dotplot • 4.0k views
ADD COMMENT
0
Entering edit mode

Another question, anyone know how to set compareCluster results readable ? (I mean transfer ENTREZID to GENE SYMBOL) ? Thx again !

ADD REPLY
0
Entering edit mode
ego@result
ADD REPLY
0
Entering edit mode

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?

head(ego)

or

str(ego)
ADD REPLY
0
Entering edit mode

I found if I use plot() instead of dotplot() , then no errors . Wierd ! Maybe some bugs when authors updating the clusterprofiler package.

ADD REPLY
0
Entering edit mode

or class(ego). My money is on an unexpected factor.

ADD REPLY
2
Entering edit mode
4.2 years ago
Anthony ▴ 20

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
ADD COMMENT

Login before adding your answer.

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