% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methylationGLM_steps.R
\name{summarizeMethylationGLMModels}
\alias{summarizeMethylationGLMModels}
\title{Summarize CpG-wise Gaussian GLM fits for one-timepoint analyses}
\usage{
summarizeMethylationGLMModels(
  modelResults,
  preparedData,
  summaryResidualSD = TRUE,
  summaryPval = NA,
  excludeNonConverged = FALSE,
  nCores = 1L,
  libPath = NULL,
  glmLibs = "glm2",
  chunkSize = NULL,
  verbose = FALSE,
  logs = FALSE,
  log_dir = NULL,
  log_file = "log_methylationGLM.txt"
)
}
\arguments{
\item{modelResults}{Object returned by \code{fitMethylationGLMModels()}.}

\item{preparedData}{Object returned by \code{prepareMethylationGLMData()}.}

\item{summaryResidualSD}{Logical. If \code{TRUE}, add residual standard deviations
to each CpG summary row.}

\item{summaryPval}{Numeric or \code{NA}. Optional p-value filter applied to the
returned summary tables. \code{NA} keeps all rows.}

\item{excludeNonConverged}{Logical. If \code{TRUE}, retain non-converged CpG rows
and their reasons but set their inferential p-values to \code{NA}.}

\item{nCores}{Integer. Number of worker processes to use while extracting
summary rows.}

\item{libPath}{Character vector or \code{NULL}. Optional library paths forwarded
to worker processes.}

\item{glmLibs}{Character vector or comma-separated string of package names to
check on worker processes. The default is \code{'glm2'}.}

\item{chunkSize}{Integer or \code{NULL}. Number of CpGs to process per parallel
chunk. \code{NULL} chooses a value automatically.}

\item{verbose}{Logical. If \code{TRUE}, emit progress messages with \code{message()}.}

\item{logs}{Logical. If \code{TRUE}, write the same messages to a log file.}

\item{log_dir}{Character or \code{NULL}. Directory used for the log file when
\code{logs = TRUE}.}

\item{log_file}{Character. File name used when \code{logs = TRUE}.}
}
\value{
A list with class \code{'dnaEPICO_methylationGLM_summaries'}
containing the optionally filtered summary tables in \code{summaries} and the
complete CpG-level tables in \code{diagnosticSummaries}. Diagnostics,
annotation, and report output use the complete tables so \code{summaryPval}
does not remove CpGs from those outputs.
}
\description{
Extract phenotype-specific CpG coefficient tables from the fitted model
object returned by \code{fitMethylationGLMModels()}.
}
\examples{
ex <- dnaEPICO:::exampleMethylationGLMStateDnaEpico()
summary_results <- summarizeMethylationGLMModels(
    modelResults = ex$modelResults,
    preparedData = ex$preparedData,
    summaryResidualSD = TRUE,
    summaryPval = NA,
    nCores = 1,
    verbose = FALSE,
    logs = FALSE
)
names(summary_results$summaries)

}
