R/preprocessingMinfiEwasWater_steps.R
predictSexMinfiEwasWater.RdPredict sample sex from a genome-mapped methylation object, align the predictions with phenotype data, and return a structured object that can be plotted or merged into downstream phenotype tables.
predictSexMinfiEwasWater(
rawData,
targets,
SampleID = "Sample_Name",
sexColumn = "Sex",
verbose = FALSE,
logs = FALSE,
log_dir = NULL,
log_file = "log_predictSexMinfiEwasWater.txt"
)Object returned by buildRawMinfiEwasWater().
Filtered phenotype data frame aligned with rawData.
Character. Name of the sample identifier column in targets.
Character. Name of the phenotype column containing reported sex.
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.
A list with class "dnaEPICO_minfiEwasWater_sex" containing the sex
prediction result, aligned phenotype data, plotting data, and mismatch
table.
ex <- dnaEPICO:::exampleMinfiWorkflowStateDnaEpico()
sex_data <- predictSexMinfiEwasWater(
rawData = ex$rawFiltered,
targets = ex$sampleData$targets,
SampleID = "Sample_Name",
sexColumn = "Sex",
verbose = FALSE,
logs = FALSE
)
names(sex_data)
#> [1] "pSex" "targets" "sexPlotData" "mismatches" "SampleID"
#> [6] "sexColumn"