Plotting Fst
1
0
Entering edit mode
10.9 years ago
thjnant ▴ 160

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.enter image description here

fst • 5.8k views
ADD COMMENT
0
Entering edit mode

Seems like you are using ggplot to plot these, did you try to use jitter and add alpha value to your dots, so they will be semi-transparent?

ADD REPLY
1
Entering edit mode
10.9 years ago
Pavel Senin ★ 1.9k

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()

enter image description here

ADD COMMENT

Login before adding your answer.

Traffic: 2154 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6