enrichplot
enrichplot copied to clipboard
NA values as Cluster in dotplot
Hi, hope this is the right place to post this. My apologies if not.
I'm trying to use dotplot with the results of compareCluster from clusterProfiler. As you can see in the plot I get NA value for the cluster value in the last column.

Looking into the dotplot result, there are indeed NA values for those entries as Cluster

however the same entries of the compareCluster result do not have NA values as Cluster value.

Honestly I don't understand why this is happening.
Thanks in advance for your help and time.
Giulio
check whether your input list that contains element without name.

Thanks for the quick feedback. I checked that, and the list contains names, as you'll see below.

I went through the function dotplot.compareClusterResult in https://github.com/YuLab-SMU/enrichplot/blob/master/R/dotplot.R and noticed that the NAs are introduced by the fortify function. You can see the output below

Hope this helps. Thanks again!
can you send the
ckobject as ack.rdafile to[email protected]?I will check it.
Hello,I have the same problem, "NA" as a cluster. How can we address it.
I did not get a feedback but I noticed that specifying the option by solved the problem.
Either by='GeneRatio' (with capital G) or by='count' made disappear the NAs. Beware that by='geneRatio' instead doesn't work, so I guess there might be a bug there
How do add options to the compareCluster? I am getting an error compareCluster(g3list, fun= "enrichGO", OrgDb = org.Hs.eg.db, pvalueCutoff=1, by='count') Error in fun(i, ...) : unused argument (by = "count")
How do add options to the compareCluster? I am getting an error compareCluster(g3list, fun= "enrichGO", OrgDb = org.Hs.eg.db, pvalueCutoff=1, by='count') Error in fun(i, ...) : unused argument (by = "count")
You can only use the parameters of the function specified by fun. Specifically, you can only use the parameters of enrichGO() here