Entering edit mode
2.6 years ago
VenGeno
▴
100
Hi,
I am using ggplot2 to visualize a differentially expressed gene set generated using ballgown. When I visualize it I see these weird connecting lines (blue) and small blue and tiny red dots. Link to the image :
I don't understand why it is happening. Following is the code I used,
options(ggrepel.max.overlaps = Inf)
ggplot(data=results_genes[results_genes$diffexpressed != "No",], aes(x=de, y=-log10(pval), label=gene_label, color = diffexpressed)) +
xlab("log2Foldchange") +
scale_color_manual(name = "Differentially expressed", values=c("blue", "red")) +
geom_point() +
theme_minimal() +
geom_text_repel() +
geom_vline(xintercept=c(-1, 1), col="red") +
geom_hline(yintercept=-log10(0.05), col="red") +
guides(colour = guide_legend(override.aes = list(size=5))) +
geom_point(data = results_genes[results_genes$diffexpressed == "No",], aes(x=de, y=-log10(pval)), colour = "black")
Thank you in advance.
change the
geom_text_repel
togeom_text_repel(size = 4)
. Adjust the font size as per the graph.