qqplot  R Documentation 
Functions for visualizing association test results by means of a quantilequantile (QQ) plot
## 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", ..., conf.level=NULL, conf.args=NULL) ## 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", ..., conf.level=NULL, conf.args=NULL)
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 
conf.level 
dummy argument for compatibility with the new version of the function in the stats package; currently unused 
conf.args 
dummy argument for compatibility with the new version of the function in the stats package; currently unused 
... 
all other arguments are passed to

If qqplot
is called for an
AssocTestResultRanges
object without specifying the second argument y
,
a QQ plot of the raw pvalues in x
against a uniform
distribution of expected pvalues is created, where the theoretical
pvalues are computed using the ppoints
function.
In this case, the logtransformed observed pvalues contained in x
are plotted on the vertical axis and the logtransformed expected
pvalues 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 pvalues are plotted on the vertical axis.
If qqplot
is called for two
AssocTestResultRanges
object x
and
y
, the logtransformed raw pvalues of x
and y
are plotted against each other, where the pvalues of x
are plotted on
the horizontal axis and the pvalues 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 pvalues.
Ulrich Bodenhofer bodenhofer@bioinf.jku.at
http://www.bioinf.jku.at/software/podkat
AssocTestResultRanges
## 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.