An object of class qq includes all the needed information for producing a
quantile-quantile plot of p-values. The goal is to seperate the
pre-processing of the quantile-quantile plot elements from the graphical
rendaring of the object, which could be done using any graphical device
including plot_ly
and plot
in
base R
.
qqr(x, p = "P", snp, gene, annotation1, annotation2, ...)
A data.frame
which must contain at least the following
column:
a p-value, must be numeric
A string denoting the column name for the p-values. Default is
p = "P"
. This column must be numeric
or integer
.
Should not have missing, NA, NaN, or NULL values and should be between 0
and 1.
A string denoting the column name for the SNP names (e.g. rs
number). More generally, this column could be anything that identifies each
point being plotted. For example, in an Epigenomewide association study
(EWAS) this could be the probe name or cg number. This column should be a
character
. This argument is optional, however it is necessary to
specify if you want to highlight points on the plot using the
highlight
argument in the qqly
function
A string denoting the column name for the GENE names. This column
could be a character
or numeric
. More generally this could be
any annotation information that you want to include in the plot. This
argument is optional.
A string denoting the column name for an annotation. This
column could be a character
or numeric
. This could be any
annotation information that you want to include in the plot (e.g. zscore,
effect size, minor allele frequency). This argument is optional.
A string denoting the column name for an annotation. This
column could be a character
or numeric
. This could be any
annotation information that you want to include in the plot (e.g. zscore,
effect size, minor allele frequency). This argument is optional.
currently ignored
An list object of class qqr
with the following elements
processed data to be used for plotting the Q-Q plot including the observed and expected p-values on the -log10 scale
The names
of the columns corresponding to the data provided. This information is used
for annotating the plot in the qqly
function
# NOT RUN {
library(manhattanly)
qqrObj <- qqr(HapMap, snp = "SNP", highlight = significantSNP)
class(qqrObj)
head(qqrObj[["data"]])
# }
Run the code above in your browser using DataLab