Closed davidbmorse closed 3 years ago
Hey davidbmorse, most of the repel functionality is [unfortunately] controlled by the default parameters of ggrepel's functions that are used by EnhancedVolcano, except for these parameters: https://github.com/kevinblighe/EnhancedVolcano/blob/master/R/EnhancedVolcano.R#L894-L908
So, we are somewhat at the mercy of how ggrepel lays out the labels. In most cases, I do not notice any specific pattern in how they are labeled, instead being somewhat random / arbitrary (?).
When labels extend beyond axes, I just extend the x-axis manually via xlim.
Hi Kevin, thanks a lot for getting back to me and explaining this. Also, thanks for pointing me to the lines of your script that adjust some of the repel parameters.
Hey david, sure, no problem. Yes, you can technically just copy the entire script and edit it on your side - this is just a single function package, after all.
It's not just those lines, per se, but anywhere where there's a geom_text_repel or geom_label_repel. Some of the code is admittedly redundant.
Hi Kevin, thanks so much for this amazing resource!
Is it possible to control a label repelling variable or add x-axis limits to labels within Enhanced Volcano? For instance, could one make all labels of negative log2FC points be labeled on the left side of the plot and all labels of positive log2FC points be labeled on the right side of the plot?
Within a custom ggplot object, one could imaging doing something like this: