It wokred. Thank you Matthias Zepper !🙏
• 0 views
•
link
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.
Maybe try without the geom_text_repel() layer?
I would suppose those small blue and red dots are in reality tiny gene name labels and the connecting lines the lines that connect the actual position with the label.
It wokred. Thank you Matthias Zepper !🙏
You are welcome! Good luck with your analysis!
Log in to answer this question.
change the
geom_text_repeltogeom_text_repel(size = 4). Adjust the font size as per the graph.