R/preprocessingPheno_steps.R
buildClockFoundationInputsPreprocessingPheno.RdPrepare the beta and phenotype tables commonly exported for Clock Foundation style downstream workflows, without writing them to disk. The sex column is passed through without validation or recoding.
buildClockFoundationInputsPreprocessingPheno(
beta,
pheno,
SampleID = "Sample_Name",
sexColumn = "Sex",
verbose = FALSE,
logs = FALSE,
log_dir = NULL,
log_file = "log_buildClockFoundationInputsPreprocessingPheno.txt"
)Numeric matrix of beta values with probes in rows and samples in columns.
Phenotype data frame aligned with the beta matrix columns.
Character. Name of the phenotype sample identifier column.
Character. Name of the phenotype sex column. Its values are
preserved as supplied, including missing, blank, unknown, or other strings;
PredSex is not substituted.
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_preprocessingPheno_clock'
containing betaCSV and phenoCF.
ex <- dnaEPICO:::examplePreprocessingPhenoStateDnaEpico()
clock_inputs <- buildClockFoundationInputsPreprocessingPheno(
beta = ex$timepointData$data[["1"]]$beta,
pheno = ex$timepointData$data[["1"]]$pheno,
SampleID = "Sample_Name",
sexColumn = "Sex",
verbose = FALSE,
logs = FALSE
)
names(clock_inputs)
#> [1] "betaCSV" "phenoCF" "methylationRange"