kevinblighe / EnhancedVolcano

Publication-ready volcano plots with enhanced colouring and labeling
397 stars 81 forks source link

background label #100

Closed lmanchon closed 2 years ago

lmanchon commented 2 years ago

-Hi, is there an option to set background color of boxedLabels ? thank you --

kevinblighe commented 2 years ago

Hi, there is not currently a way to do this. However, I have implemented it in my other package, PCAtools - please see lines: https://github.com/kevinblighe/PCAtools/blob/master/R/biplot.R#L20-L23 https://github.com/kevinblighe/PCAtools/blob/master/R/biplot.R#L213 https://github.com/kevinblighe/PCAtools/blob/master/R/biplot.R#L437-L450

To add it to your volcanos, it should be as easy as: EnhancedVolcano(...) + geom_label_repel(fill = 'pink')

lmanchon commented 2 years ago

EnhancedVolcano(...) + geom_label_repel(fill = 'pink')

failed, it doesn't work:

Error in check_required_aesthetics(): ! geom_label_repel requires the following missing aesthetics: label Run rlang::last_error() to see where the error occurred.

kevinblighe commented 2 years ago

Please try to replicate the entire code chunk, adding it as geom_label_repel() in the way that I have shown. https://github.com/kevinblighe/PCAtools/blob/master/R/biplot.R#L437-L450

lmanchon commented 2 years ago

why not to add 'fill' parameter to geom_text_repel in EnhancedVolcano.R (line 814) and then recompile the package ?

kevinblighe commented 2 years ago

I have no funding for these packages, and, irrespective of that, neither have time, despite working literally every day for the past ~8 years.

You are welcome to implement the fix yourself via a Pull Request.

lmanchon commented 2 years ago

Of course, I'll see what I can do. Thank you.