R/methylationGLM_T1_steps.R
plotMethylationGLM_T1Diagnostics.RdCreate Q-Q and residual-diagnostic plots from the CpG summary tables returned
by summarizeMethylationGLM_T1Models().
plotMethylationGLM_T1Diagnostics(
modelSummaries,
preparedData,
fdrThreshold = 0.05,
padjmethod = "fdr",
outputDir = NULL,
plotWidth = 2000L,
plotHeight = 1000L,
plotDPI = 150L,
display = FALSE,
verbose = FALSE,
logs = FALSE,
log_dir = NULL,
log_file = "log_methylationGLM_T1.txt"
)Object returned by summarizeMethylationGLM_T1Models().
Object returned by prepareMethylationGLM_T1Data().
Numeric. False-discovery-rate threshold used to highlight CpGs in the diagnostic plots.
Character. P-value adjustment method passed to
stats::p.adjust().
Character or NULL. Directory used for TIFF files. When
NULL, plots are returned in memory only.
Integer. TIFF width in pixels when plots are written to disk.
Integer. TIFF height in pixels when plots are written to disk.
Integer. TIFF resolution in DPI when plots are written to disk.
Logical. If TRUE, draw plots on the active graphics device.
Logical. If TRUE, emit progress messages with message().
Logical. If TRUE, write the same messages to a log file.
Character or NULL. Directory used for the log file when
logs = TRUE.
Character. File name used when logs = TRUE.
A list with class "dnaEPICO_methylationGLM_T1_diagnostic_plots"
containing the generated ggplot2 objects, genomic inflation factors, and
any saved TIFF file paths.
ex <- dnaEPICO:::exampleMethylationGLMStateDnaEpico()
diagnostic_plots <- plotMethylationGLM_T1Diagnostics(
modelSummaries = ex$modelSummaries,
preparedData = ex$preparedData,
display = FALSE,
verbose = FALSE,
logs = FALSE
)
names(diagnostic_plots$plots)
#> NULL