% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methylationGLM_steps.R
\name{collectSignificantCpGsMethylationGLM}
\alias{collectSignificantCpGsMethylationGLM}
\title{Collect significant CpG coefficient tables from fitted one-timepoint GLMs}
\usage{
collectSignificantCpGsMethylationGLM(
  modelResults,
  pvalThreshold = 0.05,
  interactionTerm = NULL,
  excludeNonConverged = FALSE,
  verbose = FALSE,
  logs = FALSE,
  log_dir = NULL,
  log_file = "log_methylationGLM.txt"
)
}
\arguments{
\item{modelResults}{Object returned by \code{fitMethylationGLMModels()}.}

\item{pvalThreshold}{Numeric. Threshold applied to phenotype main-effect or
interaction p-values.}

\item{interactionTerm}{Character or \code{NULL}. Optional interaction term.}

\item{excludeNonConverged}{Logical. If \code{TRUE}, do not collect CpGs whose GLM
did not converge; their rows and reasons remain in diagnostic and annotated
output.}

\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_significant_cpgs'}.
}
\description{
Collect the raw coefficient tables for CpGs whose phenotype main effect or
interaction p-value passes the requested threshold.
}
\examples{
ex <- dnaEPICO:::exampleMethylationGLMStateDnaEpico()
significant_cpgs <- collectSignificantCpGsMethylationGLM(
    modelResults = ex$modelResults,
    pvalThreshold = 1,
    verbose = FALSE,
    logs = FALSE
)
names(significant_cpgs)

}
