Hi Everyone,
I would like to ask a question:
I have the following dataset, "data", generated after GSEA enrichment analysis in the following format:
and ran the following code
data <- read.table(file.path(working_dir,"data.csv"),header = TRUE, sep = ",", quote="\"", stringsAsFactors = FALSE)
s1<- ggplot(data, aes(x="Groups", y=Pathways, size=NES, color=padj)) + geom_point(alpha = 0.8) + facet_wrap(Group ~ .) + theme_classic()
s1 = s1+scale_color_gradient(low = "red2", high = "mediumblue", space = "Lab", limit = c(0.001, 0.05))
s1+scale_size(range = c(2, 8))
the resulting output is
I understand the size of the dots correspond to the NES, however, it is not very informative at one glance (hard to distinguish between positive and negative NES).
What I want to change is that negative NES to show a downwards pointing arrow or triangle, and a positive NES to show an upwards pointing arrow/triangle. Of course the arrows will keep the color of the padj.
Can anyone teach me how to do that, please?
Thank you in advance!