EnhancedVolcano icon indicating copy to clipboard operation
EnhancedVolcano copied to clipboard

Added box.padding argument to allow connector length to be increased easily; matchLabelColorsToSig argument to color text labels by significance

Open benjibromberg opened this issue 1 year ago • 1 comments

This pull adds the box.padding argument from ggrepel::geom_text_repel() (link to the documentation here) to the EnhancedVolcano function to allow convenient manipulation of the connector length by changing the padding of the text labels.

Notes

  • I tried adding in nudge_x and nudge_y according to the suggestion from @geneyology in #125, but I found that this sometimes made text labels disappear and it seemed much simpler to just implement box.padding to EnhancedVolcano.

  • If you want to add more user customizability to the ggrepel::geom_text_repel() functionality of EnhancedVolcano, you could pass the dot-dot-dot argument (as suggested in the linked Stack Overflow response in #125) to all instances of the ggrepel::geom_text_repel() function in the source code. Could make things messy though when writing the function definition to explicitly that the dot-dot-dot argument is only for the ggrepel::geom_text_repel() functionality so I didn't add that here.

  • Also, I did not add any example usage of the box.padding argument to the package, as I wasn't exactly sure how I should format that.

benjibromberg avatar Jan 09 '24 17:01 benjibromberg

I added a new argument to EnhancedVolcano() called matchLabelColorsToSig that is a logical (set to FALSE by default) that indicates whether or not a user wants to match the color of the text of the labels to the corresponding significance level of the point being labeled.

benjibromberg avatar Jan 17 '24 23:01 benjibromberg