Plotting Fst
Hello,
I have a huge SNP dataset of 25 millions SNP genome wide. I have divided it into different chromosomes and this FST plot is for chromosome 1. To generate this plot and for it to be visually tractable, I have chosen SNPs every 50 bp. But the plot is still not very good and there are many many SNPs with the same overall FST value. I was wondering is there any way to reduce the noise in this plot, kind of taking down most points, something like logarithm. Any help is very much appreciated.
Thanks a lot in advance.
• 6,396 views
•
link
1 answer
Here, I think that jitter helps with that line of constant values
require(ggplot2)
require(Cairo)
require(grid)
data = data.frame(x=c(runif(15000)*1e+08,runif(450)*1e+08),
y=c(runif(15000),rep(0.3,450)))
p <- ggplot(data, aes(x, y))
p1 <- p + geom_point(cex=0.9)
p2 <- p + geom_jitter(position = position_jitter(w = 0.01, h = 0.02),
colour="darkorchid3", alpha=0.3,cex=0.9)
Cairo(width = 800, height = 400, file="test.png")
print(grid.arrange(p1, p2, ncol=2))
dev.off()

• 611 views
•
link
Log in to answer this question.
Seems like you are using
ggplotto plot these, did you try to use jitter and addalphavalue to your dots, so they will be semi-transparent?