Generate a DNA methylation dashboard report

dnamReport(
  outputDir = "reports",
  phenoTab = NULL,
  enmixTab = file.path("figures", "preprocessingMinfiEwasWater", "enmix"),
  qcTab = file.path("figures", "preprocessingMinfiEwasWater", "qc"),
  svaTab = file.path("figures", "svaEnmix"),
  metricTab = file.path("figures", "preprocessingMinfiEwasWater", "metrics"),
  glmTab = NULL,
  lmerTab = NULL,
  logTab = outputDir,
  verbose = FALSE,
  logs = FALSE,
  projectName = "dnaEPICO",
  detPPath = NULL,
  detPThreshold = 0.01,
  cpgDetectionPath = NULL,
  sampleDetectionPath = NULL,
  logoPath = system.file("extdata", "dnaEPICO.svg", package = "dnaEPICO"),
  imagePattern = "\\.(png|jpg|jpeg|gif|webp|svg|tif|tiff)$",
  recursive = TRUE
)

Arguments

outputDir

Character. Directory where the Quarto project is written.

phenoTab

Character or NULL. CSV file shown in the Data tab. When NULL, the path is inferred from the Makefile output layout.

enmixTab

Character. Directory containing ENmix quality-control figures.

qcTab

Character. Directory containing Quality Control figures.

svaTab

Character. Directory containing Batch Effect or SVA figures.

metricTab

Character. Directory containing Metrics figures.

glmTab

Character or NULL. CSV file shown in the GLM Analysis tab. When NULL, the path is inferred from the Makefile output layout.

lmerTab

Character or NULL. CSV file shown in the LMER Analysis tab. When NULL, the path is inferred from the Makefile output layout.

logTab

Character. Directory containing workflow logs shown in the Logs tab.

verbose

Logical. If TRUE, emit progress messages.

logs

Logical. If TRUE, write a report log.

projectName

Character. Name used for the generated Quarto project.

detPPath

Character or NULL. RData file containing the detection P-value matrix object detP, used to build the quality-control tables. When NULL, the path is inferred from the Makefile output layout.

detPThreshold

Numeric. Detection P-value threshold used when summarising the detP matrix.

cpgDetectionPath

Character or NULL. Optional fallback CpG detection summary CSV.

sampleDetectionPath

Character or NULL. Optional fallback sample detection summary CSV.

logoPath

Character. Path to the navbar logo. Defaults to the packaged inst/extdata/dnaEPICO.svg asset.

imagePattern

Character. Regular expression used to identify image files inside the section directories.

recursive

Logical. If TRUE, search section directories recursively.

Value

A list with class "dnaEPICO_dnamReport".

Examples

report_root <- file.path(tempdir(), "dnaepico-dnam-report")
pheno_file <- file.path(
  report_root,
  "data",
  "model1",
  "preprocessingMinfiEwasWater",
  "phenoLC.csv"
)
dir.create(dirname(pheno_file), recursive = TRUE, showWarnings = FALSE)
utils::write.csv(
  data.frame(
    UID = c("sample1", "sample2"),
    Timepoint = c(1, 2),
    Sex = c("F", "M")
  ),
  pheno_file,
  row.names = FALSE
)

result <- dnamReport(
  outputDir = file.path(report_root, "reports", "model1"),
  phenoTab = pheno_file,
  enmixTab = file.path(
    report_root,
    "figures",
    "model1",
    "preprocessingMinfiEwasWater",
    "enmix"
  ),
  qcTab = file.path(
    report_root,
    "figures",
    "model1",
    "preprocessingMinfiEwasWater",
    "qc"
  ),
  svaTab = file.path(report_root, "figures", "model1", "svaEnmix"),
  metricTab = file.path(
    report_root,
    "figures",
    "model1",
    "preprocessingMinfiEwasWater",
    "metrics"
  ),
  logTab = file.path(report_root, "logs", "model1")
)
result$status
#> [1] "rendered"