Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Emapplot category node size increase with CompareCluster results #308

Open
KR-15 opened this issue Jan 31, 2025 · 1 comment
Open

Comments

@KR-15
Copy link

KR-15 commented Jan 31, 2025

Hi,

I would like to follow-up on this issue #304.

I am currently using enrichplot v1.27.4.

The size node are now proportional to number of gene present inside (pie = "Count" is now working well) but Is it possible to increase proportionally the size of the node ? On my side, changing the size_category parameter does not improve/change anything.

Reproducible example:

data(gcSample)

GO <- compareCluster(geneCluster = gcSample, 
                                  fun = enrichGO,
                                  ont = "MF",
                                  OrgDb ="org.Hs.eg.db",
                                  pAdjustMethod = "BH",
                                  keyType = "ENTREZID",
                                  pvalueCutoff  = 0.05,
                                  qvalueCutoff  = 0.05,
                                  minGSSize = 10,
                                  maxGSSize = 500,
                                  readable=TRUE)

GO_sim <- pairwise_termsim(GO) 
 
emapplot(GO_sim, pie="Count", 
         size_edge = 1.5,
         size_category = 0.5,
         showCategory = 8)

emapplot(GO_sim, pie="Count", 
         size_edge = 1.5,
         size_category = 1.0,
         showCategory = 8)

emapplot_size_categoery_0.5:

Image

emapplot_size_categoery_1.0:

Image

Thank you,

KR

@guidohooiveld
Copy link

guidohooiveld commented Feb 6, 2025

I can reproduce your issue. That is, changing the value of the argument size_category has no impact at all.

As far as I can see it happens at this line of the code:

p <- add_node_pie(p, gg$data, pie, pie_scale=size_category)

Moreover, argument size_category also doesn't work with cnetplot on the same compareClusterResult object... ??

p <- add_node_pie(p, d, pie, pie_scale=size_category)

Both call the internal function add_node_pie.
https://github.com/YuLab-SMU/enrichplot/blob/2ee77c68af4717856a0fabe50302fc5c28bd722c/R/cnetplot.R#L123C1-L145C1

@GuangchuangYu : could you please have a look at this? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants