This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How To Obtain/Plot This Kind Of Distribution Of Association Analysis

Hello, dear friends,

I am very interesting about the figures [5-8] ploted in paper of D Ruano et. al, which is also displayed in other papers.

enter image description here

While I am not very familiar with this kind of analysis, could anyone tell me how to plot this kind of figure?

What does the plot in the figure present?

gwas association

3 answers

See wikipedia: QQPlot

In statistics, a Q-Q plot[1] ("Q" stands for quantile) is a probability plot, which is a graphical method for comparing two probability distributions by plotting their quantiles against each other.

See also: R http://stat.ethz.ch/R-manual/R-patched/library/stats/html/qqnorm.html

Thank you very much, this is really helpful to me.

Its a qqplot. It is used to check, in general, if the distribution of p-values are normally distributed. From the p-values, the percentiles are obtained and then they are plotted against a standard normal distribution. If your p-value follows a normal distribution, then, it will be lined across the diagonal.

Of course, by changing the base from standard normal distribution to any other distribution, you can verify if your p-values (or any other values) follow that given distribution. For qqplot on normal distribution, for example, in R the function I think is qqnorm.

Thank you very much, this is really helpful to me.

It's really just plotting the expected, which is a uniform distribution between 0 and 1, vs the observed, which is your observed p-values. The trick is that they are sorted, then they are -log10'd. Here's some example R code:

expected = 1:1000 / 1000
observed = expected

# make some of the lower p-values lower
observed[1:100] = sort(observed[1:100] / runif(100, 1, 2))

#plot expected vs observed
plot(-log10(expected), -log10(observed))
abline(0, 1)

That makes this plot: qqplot

Thank you very much, this is really helpful to me.

Log in to answer this question.