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,
  lmeTab = NULL,
  modelSections = c("glm", "lme"),
  logTab = outputDir,
  verbose = FALSE,
  logs = FALSE,
  projectName = "dnaEPICO",
  detPPath = NULL,
  detPThreshold = 0.01,
  cpgDetectionPath = NULL,
  sampleDetectionPath = NULL,
  logoPath = system.file("extdata", "dnaEPICORM.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. XLSX workbook shown in the GLM Analysis tab. When NULL, the path is inferred from the Makefile output layout. Report sidecars produced by methylationGLM() are read from this report project's assets/results/glm_results directory when available.

lmeTab

Character or NULL. XLSX workbook shown in the LME Analysis tab. When NULL, the path is inferred from the Makefile output layout. Report sidecars produced by methylationLME() are read from this report project's assets/results/lme_results directory when available.

modelSections

Character vector containing any of 'glm' and 'lme'. The report includes the corresponding model pages, logs, and summary sections. Use character(0) for a preprocessing-only report. The default preserves the complete GLM-and-LME report.

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 navigation-panel logo. Defaults to the packaged inst/extdata/dnaEPICORM.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'.

Details

The Quarto command-line interface is required to render the website. It is not required to install or load dnaEPICO, or to use the package's preprocessing and statistical-modeling functions.

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"