I wanted to make some dotplots using ggplot2, but I need to specify the color for my data and label some of them.
Here is part of my data set looks like:
FactorA Gene P-value logFC
a A 0.01 2
a B 0.07 3
b A 0.05 -1
b B 0.03 -0.5
So what I want is
- If my P-value > 0.05, then the dot is grey color,
- If P-value < 0.05 and logFC>0, the dot is red color, and
- If P-value < 0.05 and logFC < 0, the dot is green color.
Then I also want the dots look like circle with black outline and fill as above. Then I only want to label the Genes with P-value <0.05. Then I want my dotplots facet_wrap by FactorA.
How should I specify these in ggplot2?