% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dnamReport.R
\name{dnamReport}
\alias{dnamReport}
\title{Generate a DNA methylation dashboard report}
\usage{
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,
  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{
\item{outputDir}{Character. Directory where the Quarto project is written.}

\item{phenoTab}{Character or \code{NULL}. CSV file shown in the Data tab.
When \code{NULL}, the path is inferred from the Makefile output layout.}

\item{enmixTab}{Character. Directory containing ENmix quality-control
figures.}

\item{qcTab}{Character. Directory containing Quality Control figures.}

\item{svaTab}{Character. Directory containing Batch Effect or SVA figures.}

\item{metricTab}{Character. Directory containing Metrics figures.}

\item{glmTab}{Character or \code{NULL}. XLSX workbook shown in the GLM Analysis
tab.
When \code{NULL}, the path is inferred from the Makefile output layout. Report
sidecars produced by \code{methylationGLM()} are read from this report project's
\code{assets/results/glm_results} directory when available.}

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

\item{logTab}{Character. Directory containing workflow logs shown in the Logs
tab.}

\item{verbose}{Logical. If \code{TRUE}, emit progress messages.}

\item{logs}{Logical. If \code{TRUE}, write a report log.}

\item{projectName}{Character. Name used for the generated Quarto project.}

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

\item{detPThreshold}{Numeric. Detection P-value threshold used when
summarising the \code{detP} matrix.}

\item{cpgDetectionPath}{Character or \code{NULL}. Optional fallback CpG detection
summary CSV.}

\item{sampleDetectionPath}{Character or \code{NULL}. Optional fallback sample
detection summary CSV.}

\item{logoPath}{Character. Path to the navbar logo. Defaults to the packaged
\code{inst/extdata/dnaEPICO.svg} asset.}

\item{imagePattern}{Character. Regular expression used to identify image
files inside the section directories.}

\item{recursive}{Logical. If \code{TRUE}, search section directories recursively.}
}
\value{
A list with class \code{'dnaEPICO_dnamReport'}.
}
\description{
Generate a DNA methylation dashboard report
}
\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

}
