% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/preprocessingMinfiEwasWater_steps.R
\name{readRGSetMinfiEwasWater}
\alias{readRGSetMinfiEwasWater}
\title{Read IDAT files into an annotated RGChannelSet}
\usage{
readRGSetMinfiEwasWater(
  idatFolder,
  targets,
  SampleID = "Sample_Name",
  arrayType = "IlluminaHumanMethylationEPICv2",
  annotationVersion = "20a1.hg38",
  force = FALSE,
  verbose = FALSE,
  logs = FALSE,
  log_dir = NULL,
  log_file = "log_readRGSetMinfiEwasWater.txt"
)
}
\arguments{
\item{idatFolder}{Character. Directory containing the IDAT files.}

\item{targets}{Data frame returned by \code{readPhenotypeTargets()} or an
equivalent phenotype table.}

\item{SampleID}{Character. Name of the phenotype column containing sample
identifiers used to label the \code{RGChannelSet}.}

\item{arrayType}{Character. Array name passed to
\code{Biobase::annotation(RGSet)}, for example
\code{'IlluminaHumanMethylationEPICv2'}.}

\item{annotationVersion}{Character. Annotation build passed to
\code{Biobase::annotation(RGSet)}, for example \code{'20a1.hg38'} for EPIC v2 hg38
annotations or \code{'ilmn12.hg19'} for 450K hg19 annotations.}

\item{force}{Logical. Passed to \code{minfi::read.metharray.exp()}. Use \code{TRUE}
only after confirming that the selected IDAT files should be read together.}

\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{
An annotated \code{RGChannelSet}.
}
\description{
Read methylation-array IDAT files with \code{minfi::read.metharray.exp()}, set
sample names from the phenotype table, apply the requested annotation, and
return the resulting \code{RGChannelSet}.
}
\examples{
if (requireNamespace("minfiData", quietly = TRUE) &&
    requireNamespace("IlluminaHumanMethylation450kmanifest", quietly = TRUE) &&
    requireNamespace("IlluminaHumanMethylation450kanno.ilmn12.hg19", quietly = TRUE)) {
    ex <- dnaEPICO:::exampleMinfiIdatInputsDnaEpico(n = 4)
    rgset <- readRGSetMinfiEwasWater(
        idatFolder = ex$idatFolder,
        targets = ex$targets,
        SampleID = "Sample_Name",
        arrayType = ex$arrayType,
        annotationVersion = ex$annotationVersion
    )
    class(rgset)
}

}
