qqplot.pvalues {milorGWAS} | R Documentation |
Stratified QQ-plot of p-values
Description
Draws a QQ plot of p-values
Usage
qqplot.pvalues(
p,
snp.cat,
col.cat,
col.abline = "red",
CB = TRUE,
col.CB = "gray80",
CB.level = 0.95,
thinning = TRUE,
...
)
Arguments
p |
vector of p-values, or a data.frame with a column named |
snp.cat |
(optional) A factor giving the SNP categories. |
col.cat |
(optional) A vector of colors used to plot the SNP categories. |
col.abline |
Color of the line of slope 1. Set to |
CB |
|
col.CB |
The color of the confidence band. |
CB.level |
The level of the confidence band. |
thinning |
|
... |
Graphical parameters to be passed to |
Details
This function draws a QQ plot of p
-values, stratified by categories.
If the parameter snp.cat
is missing, the function falls back on gaston::qqplot.pvalues
.
Value
Returns a 'NULL'
See Also
SNP.category
, qqplot.pvalues
(in gaston)
Examples
# a random vector of categories
ca <- sample(c("A","B","C"), 1e6, TRUE, c(0.05, 0.9, 0.05))
# a vector of p-values, with different distribution depending on the strata
p <- runif(1e6)**ifelse(ca == "A", .8, ifelse(ca == "B", 1, 1.2))
qqplot.pvalues(p, ca)
[Package milorGWAS version 0.7 Index]