R/methylationGLMM_T1T2_steps.R
plotMethylationGLMM_T1T2Diagnostics.RdCreate Q-Q and standard-error diagnostic plots from the mixed-effects summary
tables returned by summarizeMethylationGLMM_T1T2Models().
plotMethylationGLMM_T1T2Diagnostics(
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_methylationGLMM_T1T2.txt"
)Object returned by summarizeMethylationGLMM_T1T2Models().
Object returned by prepareMethylationGLMM_T1T2Data().
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_methylationGLMM_T1T2_diagnostic_plots"
containing the generated ggplot2 objects, genomic inflation factors, and
any saved TIFF file paths.
ex <- dnaEPICO:::exampleMethylationGLMMStateDnaEpico()
diagnostic_plots <- plotMethylationGLMM_T1T2Diagnostics(
modelSummaries = ex$modelSummaries,
preparedData = ex$preparedData,
display = FALSE,
verbose = FALSE,
logs = FALSE
)
names(diagnostic_plots$plots)
#> [1] "score"