Prepare the beta and phenotype tables commonly exported for Clock Foundation style downstream workflows, without writing them to disk.

buildClockFoundationInputsPreprocessingPheno(
  beta,
  pheno,
  SampleID = "Sample_Name",
  sexColumn = "Sex",
  verbose = FALSE,
  logs = FALSE,
  log_dir = NULL,
  log_file = "log_buildClockFoundationInputsPreprocessingPheno.txt"
)

Arguments

beta

Numeric matrix of beta values with probes in rows and samples in columns.

pheno

Phenotype data frame aligned with the beta matrix columns.

SampleID

Character. Name of the phenotype sample identifier column.

sexColumn

Character. Name of the phenotype sex column.

verbose

Logical. If TRUE, emit progress messages with message().

logs

Logical. If TRUE, write the same messages to a log file.

log_dir

Character or NULL. Directory used for the log file when logs = TRUE.

log_file

Character. File name used when logs = TRUE.

Value

A list with class "dnaEPICO_preprocessingPheno_clock" containing betaCSV and phenoCF.

Examples

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"