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

how can i change the colour of category node of my own choice in cnetplot #282

Open
Sidragull57 opened this issue Jul 24, 2024 · 1 comment

Comments

@Sidragull57
Copy link

No description provided.

@guidohooiveld
Copy link

Use the argument category (to change it from its default value #E5C494).


> ## load required libaries
> library(clusterProfiler)
> library(enrichplot)
> library(org.Hs.eg.db)
> 
> ## using the example dataset.
> data(geneList, package="DOSE")
> genes <- names(geneList)[abs(geneList) > 2]
> 
> ego <- enrichGO(gene          = genes,
+                 universe      = names(geneList),
+                 OrgDb         = org.Hs.eg.db,
+                 ont           = "ALL",
+                 pAdjustMethod = "BH",
+                 pvalueCutoff  = 0.01,
+                 qvalueCutoff  = 0.05,
+                 readable      = TRUE)
> 
> ## prepare cnetplot, but color gene sets green, 
> ## and genes by log2FC.
> color.params = list(category = "green", foldChange = geneList)
> p1 <- cnetplot(ego, color.params=color.params)
> print(p1)
>

image

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