I am trying to show gene enrichment with modules on the y-axis, enrichment score on the x-axis, number of genes in the dataset based on point size, and p-value based on color. I haven't been able to get the gradient color scale to represent the full range of p-values. I've tried to look for existing sample code to adjust the limits of the gradient scale, but still haven't been able to get it to represent what I'm hoping for. Can anyone please help? Thanks very much in advance.
Here is the basic code (I've tried several iterations on the gradient scale, but no luck):
ggplot(test, aes(x=combined, y=order, colour=p.adjust, size=count)) +
geom_point() +
scale_colour_gradient(low="red", high="blue") +
theme_bw()
And a table of sample data:
count p.adjust combined order
15 4.81E-09 67 1
92 6.83E-15 57 2
88 1.15E-15 54 3
79 1.07E-09 54 4
89 8.95E-13 44 5
81 1.58E-10 41 6
61 1.75E-09 40 7
61 1.75E-09 40 8
117 1.57E-13 38 9
85 3.99E-11 37 10
162 7.81E-18 37 11
86 1.69E-11 36 12
51 2.17E-08 36 13
53 2.68E-09 36 14
53 2.68E-09 35 15
53 2.83E-08 33 16
83 2.24E-10 32 17
50 6.43E-08 32 18
81 1.24E-09 29 19
51 5.87E-06 29 20
80 2.47E-09 28 21
15 7.87E-05 27 22
55 1.31E-06 26 23
78 1.12E-08 25 24