Question: Q-Q plots with GWAS p-values using R (needs confidence band)
1
gravatar for joshf
3.2 years ago by
joshf20
Netherlands
joshf20 wrote:

I'm trying to create Q-Q plots with GWAS p-values using R but it hasn't really been working out. I need for them to be on a -log10 scale, and for them to have a confidence band/interval.

I tried out:

  • qqman - works great and it's simple but it does not provide a confidence interval function> code: qq(*P-values*)
  • snpStats - has the confidence interval but the X and Y axis are chi-squared values. I'm not sure if there's a way to get -log10 P-values? The plots look great though. code: qq.chisq(-2 * log(*P-values*), df = 2, pvals= TRUE, conc=c(0.05, 0.95))​
  • car - the plot looks a little....odd. Maybe I'm just using it wrong but I don't like the distribution of the dots. Why does the X-axis start at -4 instead of 0? code: qqPlot(-log10(*P-values*), envelope=0.95)

I'm hoping the colorful examples would help me get a detailed answer lol

gwas R q-q plots • 3.5k views
ADD COMMENTlink modified 7 months ago by Kevin Blighe41k • written 3.2 years ago by joshf20
0
gravatar for Kevin Blighe
7 months ago by
Kevin Blighe41k
Kevin Blighe41k wrote:

Old thread but some tips for others arriving here:

There is indeed something wrong with your distribution. Possible problems:

  • your dataset is unbalanced
  • your dataset is under-powered
  • the statistical test that you employed is not suited to the data distribution that you have
  • any combination of the above

Kevin

PS - the bottom plot has X-axis starting at -4 because it is plotting quantiles.

ADD COMMENTlink written 7 months ago by Kevin Blighe41k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 717 users visited in the last hour