R/methylationLME_steps.R
writeMethylationLMEOutputs.RdWrite compact phenotype summaries, optional text and significant-interaction tables, and annotated results from the longitudinal mixed-effects workflow.
writeMethylationLMEOutputs(
modelResults,
modelSummaries,
annotatedResults,
significantInteractions = NULL,
outputRData,
summaryTxtDir,
significantInteractionDir,
annotatedLMEOut,
reportAssetsDir = NULL,
vennDResults = NULL,
saveTxtSummaries = TRUE,
saveSignificantInteractions = FALSE,
verbose = FALSE,
logs = FALSE,
log_dir = NULL,
log_file = "log_methylationLME.txt"
)Object returned by fitMethylationLMEModels().
Object returned by summarizeMethylationLMEModels().
Object returned by
annotateMethylationLMESummaries() or a compatible data frame.
Object returned by
collectSignificantInteractionsMethylationLME() or NULL.
Character. Directory used for complete compact phenotype summaries.
Character. Directory used for tab-delimited summary tables.
Character. Directory used for significant interaction coefficient tables.
Character. Directory used for the annotated summary XLSX workbook.
Character or NULL. Report results directory used for
the compressed TSV table and compact metadata sidecars.
Optional model-level Venn result. Its configuration metadata and threshold tables are added before the workbook dictionary.
Logical. If TRUE, write tab-delimited summary
tables.
Logical. If TRUE, write significant
interaction coefficient tables.
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_methylationLME_paths'
containing the paths of the files written to disk, including the annotated
workbook and any requested report-table sidecars.
ex <- dnaEPICO:::exampleMethylationLMEStateDnaEpico()
annotation_data <- annotateMethylationLMESummaries(
modelSummaries = ex$modelSummaries,
annotationObject = ex$annotationData,
annotationCols = "Name,chr,pos",
verbose = FALSE,
logs = FALSE
)
significant_hits <- collectSignificantInteractionsMethylationLME(
modelResults = ex$modelResults,
pvalThreshold = 1,
verbose = FALSE,
logs = FALSE
)
output_paths <- writeMethylationLMEOutputs(
modelResults = ex$modelResults,
modelSummaries = ex$modelSummaries,
annotatedResults = annotation_data,
significantInteractions = significant_hits,
outputRData = file.path(ex$tempDir, "models"),
summaryTxtDir = file.path(ex$tempDir, "summary"),
significantInteractionDir = file.path(ex$tempDir, "significant"),
annotatedLMEOut = file.path(ex$tempDir, "annotated"),
saveTxtSummaries = TRUE,
saveSignificantInteractions = TRUE,
verbose = FALSE,
logs = FALSE
)
names(output_paths)
#> [1] "modelFiles" "summaryFiles"
#> [3] "summaryTxtFiles" "significantInteractionFiles"
#> [5] "annotatedLME" "annotatedLMEText"
#> [7] "annotatedLMEReportMetadata" "annotatedLMEDictionary"
#> [9] "annotatedLMEMetadata" "vennDSheets"