R/methylationGLM_steps.R
annotateMethylationGLMSummaries.RdMerge phenotype-specific CpG summary tables with probe annotation metadata and return a single annotated result table.
annotateMethylationGLMSummaries(
modelSummaries,
annotationObject,
annotationCols = c("Name", "chr", "pos", "UCSC_RefGene_Group", "UCSC_RefGene_Name",
"Relation_to_Island", "GencodeV41_Group"),
gencodeHub = FALSE,
verbose = FALSE,
logs = FALSE,
log_dir = NULL,
log_file = "log_methylationGLM.txt"
)Object returned by summarizeMethylationGLMModels()
or a named list of CpG summary data frames.
Character package/object name, annotation data frame,
or annotation object understood by minfi::getAnnotation().
Character vector or comma-separated string of annotation columns to append.
Logical. If TRUE, retrieve the package-managed GENCODE
gene resource from AnnotationHub and append direct gene-body and nearest
transcription-start-site annotations. This requires GRCh38 coordinates.
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_methylationGLM_annotation'
containing the annotated summary table and any requested annotation columns
that were unavailable in the chosen annotation object.
ex <- dnaEPICO:::exampleMethylationGLMStateDnaEpico()
annotation_data <- annotateMethylationGLMSummaries(
modelSummaries = ex$modelSummaries,
annotationObject = ex$annotationData,
annotationCols = "Name,chr,pos",
verbose = FALSE,
logs = FALSE
)
names(annotation_data)
#> [1] "data" "fitFailures" "modelMessages"
#> [4] "annotationColumnsUsed" "missingAnnotationCols" "gencodeHub"