EnhancedVolcano
EnhancedVolcano copied to clipboard
Added box.padding argument to allow connector length to be increased easily; matchLabelColorsToSig argument to color text labels by significance
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
andnudge_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 implementbox.padding
toEnhancedVolcano
. -
If you want to add more user customizability to the
ggrepel::geom_text_repel()
functionality ofEnhancedVolcano
, you could pass thedot-dot-dot
argument (as suggested in the linked Stack Overflow response in #125) to all instances of theggrepel::geom_text_repel()
function in the source code. Could make things messy though when writing the function definition to explicitly that thedot-dot-dot
argument is only for theggrepel::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.
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.