Added box.padding argument to allow connector length to be increased easily; matchLabelColorsToSig argument to color text labels by significance #126
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull adds the
box.padding
argument fromggrepel::geom_text_repel()
(link to the documentation here) to theEnhancedVolcano
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 I cannot increase the length of the connectors #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 I cannot increase the length of the connectors #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.