R/preprocessingMinfiEwasWater_steps.R
readRGSetMinfiEwasWater.RdRead methylation-array IDAT files with minfi::read.metharray.exp(), set
sample names from the phenotype table, apply the requested annotation, and
return the resulting RGChannelSet.
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"
)Character. Directory containing the IDAT files.
Data frame returned by readPhenotypeTargets() or an
equivalent phenotype table.
Character. Name of the phenotype column containing sample
identifiers used to label the RGChannelSet.
Character. Array name passed to
Biobase::annotation(RGSet), for example
"IlluminaHumanMethylationEPICv2".
Character. Annotation build passed to
Biobase::annotation(RGSet), for example "20a1.hg38" for EPIC v2 hg38
annotations or "ilmn12.hg19" for 450K hg19 annotations.
Logical. Passed to minfi::read.metharray.exp(). Use TRUE
only after confirming that the selected IDAT files should be read together.
Logical. If TRUE, emit progress messages with message().
Logical. If TRUE, write the same messages to a log file.
Character or NULL. Directory used for the log file when
logs = TRUE.
Character. File name used when logs = TRUE.
An annotated RGChannelSet.
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)
}
#> [1] "RGChannelSet"
#> attr(,"package")
#> [1] "minfi"