Description Usage Arguments Details Value Author(s) References See Also Examples
Functions for visualizing association test results by means of a quantile-quantile (Q-Q) plot
1 2 3 4 5 6 7 8 9 10 | ## S4 method for signature 'AssocTestResultRanges,missing'
qqplot(x, y,
xlab=deparse(substitute(x)), ylab=deparse(substitute(y)),
common.scale=TRUE, preserveLabels=FALSE, lwd=1,
lcol="red", ...)
## S4 method for signature 'AssocTestResultRanges,AssocTestResultRanges'
qqplot(x, y,
xlab=deparse(substitute(x)), ylab=deparse(substitute(y)),
common.scale=TRUE, preserveLabels=FALSE, lwd=1,
lcol="red", ...)
|
x,y |
objects of class
|
xlab |
if |
ylab |
if |
common.scale |
if |
preserveLabels |
if |
lwd |
line width for drawing the diagonal line which theoretically corresponds to the equality of the two distributions; if zero, no diagonal line is drawn. |
lcol |
color for drawing the diagonal line |
... |
all other arguments are passed to
|
If qqplot is called for an
AssocTestResultRanges
object without specifying the second argument y,
a Q-Q plot of the raw p-values in x against a uniform
distribution of expected p-values is created, where the theoretical
p-values are computed using the ppoints function.
In this case, the log-transformed observed p-values contained in x
are plotted on the vertical axis and the log-transformed expected
p-values are plotted
on the horizontal axis. If preserveLabels is TRUE,
xlab and ylab are used as axis labels as usual.
However, if preserveLabels is FALSE, which is the
default, xlab is interpreted as object label for x, i.e.
the object whose p-values are plotted on the vertical axis.
If qqplot is called for two
AssocTestResultRanges object x and
y, the log-transformed raw p-values of x and y
are plotted against each other, where the p-values of x are plotted on
the horizontal axis and the p-values of x are plotted on the
vertical axis.
like the standard qqplot function from
the stats package, qqplot returns an invisible list
containing the two sorted vectors of p-values.
Ulrich Bodenhofer bodenhofer@bioinf.jku.at
http://www.bioinf.jku.at/software/podkat
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## load genome description
data(hgA)
## partition genome into overlapping windows
windows <- partitionRegions(hgA)
## load genotype data from VCF file
vcfFile <- system.file("examples/example1.vcf.gz", package="podkat")
Z <- readGenotypeMatrix(vcfFile)
## read phenotype data from CSV file (continuous trait + covariates)
phenoFile <- system.file("examples/example1lin.csv", package="podkat")
pheno <-read.table(phenoFile, header=TRUE, sep=",")
## train null model with all covariates in data frame 'pheno'
nm.lin <- nullModel(y ~ ., pheno)
## perform association tests
res.p <- assocTest(Z, nm.lin, windows, kernel="linear.podkat")
res.s <- assocTest(Z, nm.lin, windows, kernel="linear.SKAT")
## plot results
qqplot(res.p)
qqplot(res.p, res.s, xlab="PODKAT results", ylab="SKAT results")
qqplot(res.p, res.s, xlab="PODKAT results", ylab="SKAT results",
preserveLabels=TRUE)
qqplot(res.p, res.s, common.scale=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.