When running a volcano plot I get the following warning
1: ggrepel: 18 unlabeled data points (too many overlaps). Consider increasing max.overlaps
Where can i set the max.overlap
parameter in the function?
thanks
Assa
When running a volcano plot I get the following warning
1: ggrepel: 18 unlabeled data points (too many overlaps). Consider increasing max.overlaps
Where can i set the max.overlap
parameter in the function?
thanks
Assa
Hi Assa,
I recently updated EnhancedVolcano to adjust for recent underlying changes in ggrepel.
You should download the GitHub version of EnhancedVolcano (https://github.com/kevinblighe/EnhancedVolcano), for now, and set a value for maxoverlapsConnectors
, which is the equivalent of max.overlap
:
remotes::install_github('kevinblighe/EnhancedVolcano')
General aesthetics have improved in this latest version, which will be released with the next Bioconductor official release, and I will recommend to always enable drawConnectors
in the future.
Kevin
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Thanks for this. I had the same issue as the above user and this install fixed it. However, it created a new issue where connectors are not rendered for every labeled point (only ~50% of data points show a connector), whereas in the old version it works perfectly.
Hey Charles, yes, thank you for bringing this up. You can set the following parameter so that it will draw connectors to everything:
...or, perhaps you tried this? At some point, I think, it will simply not have space to render everything.
Are you noticing the function giving any other messages about unused parameters?
Hi Kevin, thanks for your reply.
Just to clarify, the "unlabeled data points" error message is presented in the old version which lacks the maxoverlapsConnectors argument.
When I use the newer version from your github link in order to make use of this argument (which I set it to 100, despite only having 18 labels to show), it gives no error message and shows all labels, but only renders a few of the actual connectors (i.e. many points have a label on the plot, but show no visible connector).
In the old version, every label that is rendered has its corresponding connector, but it I lose a few labels as a consequence of not having the "maxoverlapsConnectors" argument.
No other error messages from either old or new versions
Hi, I see what you mean - thanks for clarifying. I have no explicit parameter that results in the rendering of all connectors. The function uses a mixture of connectors and no connectors to fit as many labels as possible. If you want connectors for everything, you could try to modify
lengthConnectors
and/ordirectionConnectors
Ok I understand. I'll play around with these. Thank you!
Sorry, one more quick reply. So, changing lengthConnectors and/or directionConnectors doesn't let me render any more connectors, but I found a quick fix for the old version.
If you load ggrepel separately and re-set its default options for your R session using something like options(ggrepel.max.overlaps=Inf), this change gets applied when EnhancedVolcano calls ggrepel, letting your render more labels.
Thanks - that is interesting to know.