A question on Volacano Plot
I was trying to make a volcano plot with some real data, using log2(ratio) vs. Z-value significance. However the scatter of the points is too less contrary to 'normal' volcano plots and I'm getting a sharp 'V' shaped plot.
I understand that scatter occurs if one has different Y values for the Same X values. But what I'm missing here?
The plot looks strange: http://img402.imageshack.us/i/volcanoi.jpg/
The data(ratio) is available from pastebin or the file attached: http://pastebin.com/m2Jss3qF
The R Code:Am I doing something wrong here?
data <- read.table(开发者_JAVA技巧"data.txt",header=FALSE)
ratio <- data$V1
ratio.mean <- mean(ratio)
ratio.sd <- sd(ratio)
ratio.log <- log2(ratio)
z <- (ratio-ratio.mean)/(ratio.sd)
z.sig <- 2*pnorm(-abs(z))
z.tsig <- 2*pt(-abs(z),df=length(ratio)-1) ## sig from t-dist
op <- par(mfrow=c(1,4))
plot(ratio.log,-log10(z.sig))
plot(ratio.log, -log10(z.tsig))
plot(ratio.log,z.sig)
plot(ratio,z)
par(op)
I'm bit confused with what your data means and why you are generating the p-values in this way.
Anyway, a volcano plot usually has the fold difference on the x-axis and the p-value on the y-axis. You are getting a strange shape because essentially you generate your p-value for a particular data point based on how far away it is from the mean of the data (which is a bit odd).
Consider the data above the mean value. As the data point gets closer to the mean value, the associated p-value monotonically increases. Conversely, the fold change also monotonically decreases.
精彩评论