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
0
Entering edit mode

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

0
Entering edit mode
ego@result

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)

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.

0
Entering edit mode

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

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


Traffic: 1059 users visited in the last hour
FAQ
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.