ggmaplot error: Unlabeled data points (too many overlaps). Consider increasing max.overlaps
1
0
Entering edit mode
3.2 years ago
jaqx008 ▴ 110

Hello All. I am trying to create a differential expression with ggmaplot. I am using this because its more convenient for me to add specific gene labels. The issue is the labels are overlapping and some of them are being excluded from the plot. I am trying to add a label repel for this particular plot so all labels can be shown on the plot. See my command below.

ggmaplot(cts_NEGvsDBR, main = expression("WT vs DBR"),
         fdr = 0.05, fc = 2, size = 0.4,
         palette = c("#B31B21", "#1465AC", "darkgray"),
         genenames = as.vector(cts_NEGvsDBR$MiRTS),
         legend = "top", top = 20,
         font.label = c("bold", 11), label.rectangle = TRUE,
         font.legend = "bold",
         font.main = "bold",
         ggtheme = ggplot2::theme_minimal())

Please how can I add the repel command to the above? Thanks

MAplot r ggplot2 ggmaplot • 51k views
ADD COMMENT
4
Entering edit mode
3.2 years ago
slanciano ▴ 70

You should use options(ggrepel.max.overlaps = Inf) to set this globally for your entire session.

options(ggrepel.max.overlaps = Inf)

ggmaplot(cts_NEGvsDBR, main = expression("WT vs DBR"), fdr = 0.05, fc = 2, size = 0.4, palette = c("#B31B21", "#1465AC", "darkgray"), genenames = as.vector(cts_NEGvsDBR$MiRTS), legend = "top", top = 20, font.label = c("bold", 11), label.rectangle = TRUE, font.legend = "bold", font.main = "bold", ggtheme = ggplot2::theme_minimal())

ADD COMMENT

Login before adding your answer.

Traffic: 1498 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6