Entering edit mode
4.5 years ago
n.tear
▴
80
Hello,
I am trying to make an MA plot of all the genes and colour in red all those that have a padj value of <0.05 AND have a >1 OR <-1 LFC
I cant find what syntax to use
res.sLFCdf
ggplot(res.sLFCdf,
aes(x = log2(baseMean), y=log2FoldChange, col= res.sIHW$padj<0.05 & res.sIHW$shrunkLFC > 1 or res.sIHW$shrunkLFC < -1 ))
+ geom_point(alpha=0.4)
+ scale_colour_manual(values=c("grey","red"))
+ xlab("Log2 mean of normalized counts")
+ ylab("Log2 fold change") + geom_hline(yintercept=c(-1,1), linetype="dashed", color = "black")
+ theme_minimal()
Many thanks for any help
Nathan
Btw, is there any reason for taking color values from a different frame /data?
Add another field that reflects if the conditions are satisfied and color based on that field?