Create phenotype, factor-variable, and numeric-covariate distribution plots from the object returned by prepareMethylationGLM_T1Data().

plotMethylationGLM_T1Distributions(
  preparedData,
  plotWidth = 2000L,
  plotHeight = 1000L,
  plotDPI = 150L,
  outputDir = NULL,
  display = FALSE,
  verbose = FALSE,
  logs = FALSE,
  log_dir = NULL,
  log_file = "log_methylationGLM_T1.txt"
)

Arguments

preparedData

Object returned by prepareMethylationGLM_T1Data().

plotWidth

Integer. TIFF width in pixels when plots are written to disk.

plotHeight

Integer. TIFF height in pixels when plots are written to disk.

plotDPI

Integer. TIFF resolution in DPI when plots are written to disk.

outputDir

Character or NULL. Directory used for TIFF files. When NULL, plots are returned in memory only.

display

Logical. If TRUE, draw plots on the active graphics device.

verbose

Logical. If TRUE, emit progress messages with message().

logs

Logical. If TRUE, write the same messages to a log file.

log_dir

Character or NULL. Directory used for the log file when logs = TRUE.

log_file

Character. File name used when logs = TRUE.

Value

A list with class "dnaEPICO_methylationGLM_T1_distribution_plots" containing the generated ggplot2 objects and any saved TIFF file paths.

Examples

ex <- dnaEPICO:::exampleMethylationGLMStateDnaEpico()
distribution_plots <- plotMethylationGLM_T1Distributions(
  preparedData = ex$preparedData,
  display = FALSE,
  verbose = FALSE,
  logs = FALSE
)
names(distribution_plots)
#> [1] "phenotypes" "factors"    "covariates" "files"