This function is used by EWAS_QC to generate
quantile-quantile (QQ) and Manhattan plots. It can also be
called by users. Note that it does not generate the histogram
or volcano plot - this is done by EWAS_QC
itself.
EWAS_plots(dataset,
plot_QQ = TRUE,
plot_Man = TRUE,
plot_cutoff_p = 0.05,
plot_QQ_bands = FALSE,
high_quality_plots = FALSE,
save_name = "dataset",
header_translations)EWAS_plots' most important output are the two graphs.
However, it also returns a single, invisible, numeric value,
representing the lambda calculated over the p-values.
either a vector of p-values, or a data frame containing the
columns CHR (chromosome number), MAPINFO
(base-pair position), and P_VAL (p-value). If
different columnnames are used, the
header_translations argument can be used to translate
these. CHR and MAPINFO are only required for
generating a Manhattan plot. Note that, unlike
EWAS_QC, this function does not accept filenames,
only data frames or vectors.
logicals determining whether a QQ and Manhattan plot are made.
numeric: the threshold of p-values to be shown in the QQ and Manhattan plots. Higher (less significant) p-values are excluded from the plot. The default setting is 0.05, which excludes 95% of data-points. It's NOT recommended to increase the value above 0.05, as this may dramatically increase running time and memory usage.
logical, if TRUE, probability bands are added to the
QQ plot.
logical. Setting this to TRUE will save the graphs as high-resolution tiff images.
character string, the name used for the plot files (do not
add an extension: EWAS_plots will do this
automatically).
a table that translates the column names of dataset
to the standard names. See translate_header
for details.
EWAS_plots is a fairly straightforward function. It
accepts a data table or a vector of p-values, and generates
QQ and (when chromosome and position data are included)
Manhattan plots from these.