Merge phenotype-specific CpG summary tables with probe annotation metadata and return a single annotated result table.

annotateMethylationGLM_T1Summaries(
  modelSummaries,
  annotationObject,
  annotationCols = c("Name", "chr", "pos", "UCSC_RefGene_Group", "UCSC_RefGene_Name",
    "Relation_to_Island", "GencodeV41_Group"),
  verbose = FALSE,
  logs = FALSE,
  log_dir = NULL,
  log_file = "log_methylationGLM_T1.txt"
)

Arguments

modelSummaries

Object returned by summarizeMethylationGLM_T1Models() or a named list of CpG summary data frames.

annotationObject

Character package/object name, annotation data frame, or annotation object understood by minfi::getAnnotation().

annotationCols

Character vector or comma-separated string of annotation columns to append.

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_methylationGLM_T1_annotation" containing the annotated summary table and any requested annotation columns that were unavailable in the chosen annotation object.

Examples

ex <- dnaEPICO:::exampleMethylationGLMStateDnaEpico()
annotation_data <- annotateMethylationGLM_T1Summaries(
  modelSummaries = ex$modelSummaries,
  annotationObject = ex$annotationData,
  annotationCols = "Name,chr,pos",
  verbose = FALSE,
  logs = FALSE
)
names(annotation_data)
#> [1] "data"                  "annotationColumnsUsed" "missingAnnotationCols"