enrichplot icon indicating copy to clipboard operation
enrichplot copied to clipboard

NA values as Cluster in dotplot

Open gbonifazi opened this issue 3 years ago • 7 comments

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.

Screenshot from 2022-06-08 19-22-26

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

Screenshot from 2022-06-08 19-24-22

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

Screenshot from 2022-06-08 19-32-21

Honestly I don't understand why this is happening.

Thanks in advance for your help and time.

Giulio

gbonifazi avatar Jun 08 '22 23:06 gbonifazi

check whether your input list that contains element without name.

image

GuangchuangYu avatar Jun 09 '22 02:06 GuangchuangYu

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

Screenshot from 2022-06-09 00-58-24

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

Screenshot from 2022-06-09 00-56-46

Hope this helps. Thanks again!

gbonifazi avatar Jun 09 '22 05:06 gbonifazi

can you send the ck object as a ck.rda file to [email protected]?

I will check it.

GuangchuangYu avatar Jun 10 '22 06:06 GuangchuangYu

can you send the ck object as a ck.rda file to [email protected]?

I will check it.

Hello,I have the same problem, "NA" as a cluster. How can we address it.

yiranzhimo avatar Oct 13 '22 14:10 yiranzhimo

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

gbonifazi avatar Oct 13 '22 15:10 gbonifazi

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")

Shankav avatar Jan 27 '23 00:01 Shankav

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

huerqiang avatar Feb 03 '23 15:02 huerqiang