Closed Marlon751 closed 1 year ago
Hi, not sure I fully understand - might be useful to post some of your code. In general, it is definitely possible to change the fill/color of links, for example:
gggenomes(emale_genes) %>% add_clusters(emale_cogs) +
geom_link(aes(fill=cluster_id))
Assuming you know that and tried something with add_clusters()
, one issue you might have come across is that the following doesn't work, i.e. metadata associated with clusters is not added to links. Then you would be quite right, that should work. I'll try to add that soon.
emale_cogs
gggenomes(emale_genes) %>% add_clusters(emale_cogs) +
geom_link(aes(fill=cluster_size))
### FAILS
A quick workaround could be to replace cluster_id
in your cluster data.frame with whatever labels you want to color your links by:
# just randomly assign for coloring example
emale_cogs2 <- emale_cogs %>%
mutate(cluster_id = sample(c("many", "single"), length(cluster_id), replace = T))
gggenomes(emale_genes) %>% add_clusters(emale_cogs2) +
geom_link(aes(fill=cluster_id))
Thank you very much!
Hi. I was wondering is it possible to change the color of the geom_link(). I would like to achieve something like this: