| R Documentation |
Creates a quantile-quantile plot from p-values from an association study,
e.g. a genome wide association study (GWAS). We compare
the data quantile with a theoretical quantile from a uniform distribution.
This code is mostly adapted from the qqman package, but improved
for speed. A graph with a hundred million points should only take a few
seconds to generate.
qq(pvector, zero_action = NULL, ...)
pvector |
A numeric vector of p-values. |
zero_action |
A numeric value to substitute for p-values of exactly
zero before plotting. If |
... |
Other arguments passed to |
No return value, called for plotting side effects.
qq(stats::runif(1e6))
# Handle p-values of zero by substituting a small finite value
pvec <- c(stats::runif(1e4), 0, 0)
qq(pvec, zero_action = 1e-300)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.