% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/preprocessingMinfiEwasWater_steps.R
\name{assessSamplesMinfiEwasWater}
\alias{assessSamplesMinfiEwasWater}
\title{Assess sample quality before sample filtering}
\usage{
assessSamplesMinfiEwasWater(
  rawData,
  RGSet,
  qcCutoff = 10.5,
  detPtype = "m+u",
  detPThreshold = 0.05,
  verbose = FALSE,
  logs = FALSE,
  log_dir = NULL,
  log_file = "log_assessSamplesMinfiEwasWater.txt"
)
}
\arguments{
\item{rawData}{Object returned by \code{buildRawMinfiEwasWater()}.}

\item{RGSet}{An \code{RGChannelSet} aligned with \code{rawData}.}

\item{qcCutoff}{Numeric. Cutoff passed to \code{minfi::plotQC()} when the QC plot
is drawn.}

\item{detPtype}{Character. Detection P-value mode passed to
\code{minfi::detectionP()}. Common values in minfi workflows are \code{'m+u'} and
\code{'negative'}. The default used here is \code{'m+u'}.}

\item{detPThreshold}{Numeric. Samples with mean detection P value above this
threshold are marked as failed.}

\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_minfiEwasWater_assessment'} containing
the QC object, detection P matrix, mean detection P values, and failed
sample identifiers.
}
\description{
Compute minfi QC metrics and detection P values, identify failed samples
using the requested threshold, and return the assessment as a single object.
}
\examples{
\dontshow{if (requireNamespace("minfiData", quietly = TRUE)) withAutoprint(\{ # examplesIf}
ex <- dnaEPICO:::exampleMinfiBaseDataDnaEpico()
raw_data <- buildRawMinfiEwasWater(ex$RGSet, verbose = FALSE, logs = FALSE)
assessment <- assessSamplesMinfiEwasWater(
    rawData = raw_data,
    RGSet = ex$RGSet,
    detPThreshold = 1,
    verbose = FALSE,
    logs = FALSE
)
names(assessment)
\dontshow{\}) # examplesIf}
}
