This vignette shows the roles, inputs, processing stages, and outputs of the main dnaEPICO functions.
Use the diagrams to choose a function and follow outputs between stages. See the local-use and pipeline-use vignettes for arguments and executable examples.
Read each overview as follows:
saveOutputs.dnaEPICO is built on core Bioconductor infrastructure for high-dimensional genomic data, with a focus on Illumina DNA methylation arrays. This vignette assumes familiarity with a general DNA methylation workflow. For an introduction, see this tutorial: https://paulyrp.github.io/2025-cpgpneurogenomics-workshop/tutorial.html. It covers the main concepts and analysis steps.
Preprocessing and quality control are performed using established Bioconductor tools, including minfi, ENmix, and wateRmelon. Downstream statistical modelling relies on base R and CRAN frameworks, including generalised linear models and linear mixed-effects models. Users are expected to have basic familiarity with R, Bioconductor pipelines, command-line execution, and Illumina IDAT file structures.
For an introduction to Bioconductor, see the installation guide.
The lists of excluded probes depend on the Illumina methylation-array platform.
For Illumina HumanMethylationEPIC v2.0, use the cross-reactive probe-exclusion file from Peters et al. (2024).
For Illumina MethylationEPIC, also known as the
850k array, use the probe-exclusion resources from Pidsley et
al. (2016). The supporting files commonly used together are
13059_2016_1066_MOESM1_ESM.csv,
13059_2016_1066_MOESM4_ESM.csv,
13059_2016_1066_MOESM5_ESM.csv, and
13059_2016_1066_MOESM6_ESM.csv.
For Illumina HumanMethylation450k, use the cross-reactive and polymorphic probe resources from Chen et al. (2013).
Multiple probe-exclusion files can be supplied as a
semicolon-separated value in probeExclusionPath.
dnaEPICO reads probe IDs from each file, uses
probeExclusionIdColumn when supplied, or otherwise
auto-detects common probe-ID columns such as ProbeID,
TargetID, IlmnID, and Name. The
unique union of all probe IDs is then used to filter the normalised
object.
For EPICv2, setting
useEpicV2Manifest = TRUE also retrieves the expanded Peters
et al. manifest from AnnotationHub resource AH116484.
Probes flagged in selected manifest columns are added to the same
exclusion set. By default, probes flagged by
CH_WGBS_evidence, CH_BLAT, or
MissingPos are removed, while MismatchPos is
retained unless explicitly enabled.
The main functions follow the analysis path from preprocessing and surrogate-variable estimation through phenotype preparation, modelling, and report generation.
preprocessingMinfiEwasWater() reads the phenotype table
and IDAT files, builds the methylation objects, performs quality control
and normalisation, filters probes, and estimates cell composition.
Its role in the package is to create analysis-ready methylation data:
removeSexMismatch = TRUE, samples are removed only when
both reported and predicted sex are available and disagree; samples with
missing or unknown sex information remain because their mismatch status
cannot be determined.RGSet, beta values,
M-values, copy-number values, quality-control figures, and
phenoLC. The log reports the observed finite minimum and
maximum for each methylation matrix without modifying its values.100%
svaEnmix() estimates surrogate variables from
control-probe information and adds them to the phenotype table. This
step helps represent technical variation that may otherwise influence
downstream association models.
Its role is to prepare covariates for batch and technical adjustment:
RGSet.100%
preprocessingPheno() aligns phenotype information with
methylation metrics. It prepares timepoint-specific data, combines
longitudinal records, and creates export-ready files for external
methylation-age tools.
Its role is to organise samples and methylation matrices for modelling:
100%
methylationGLM() fits cross-sectional methylation
association models. It is designed for analyses where one phenotype is
tested against CpG-level methylation while adjusting for selected
covariates.
Its role is to run single-timepoint association testing:
<Phenotype>_Model.Message;
CpGs without a returned p-value remain in the compact summary and are
counted in workbook metadata. GRCh38 analyses can optionally append
release-aware GENCODE gene-body and nearest-TSS annotations through
AnnotationHub.100%
methylationLME() fits longitudinal mixed-effects models.
It supports repeated-measures designs with a participant-level random
intercept and timepoint-related fixed effects. For lmerTest/lme4 models,
an optional omnibus F test jointly evaluates all estimable coefficients
for a phenotype main effect or phenotype-by-interaction term. If the
participant column is absent, the configured SampleID
column can be used to derive it from identifiers ending in the supported
A/B visit code.
Its role is to model methylation change across repeated observations:
<Phenotype>_Model.Message; CpGs without a
returned coefficient or omnibus p-value remain in the compact summary
and are counted in workbook metadata. The same optional AnnotationHub
annotation is supported by both the lmerTest/lme4 and nlme engines for
GRCh38 results.100%
dnamReport() assembles the main tables, figures, logs,
and model summaries into a report website. It can be run after
preprocessing and modelling outputs have been written to disk.
Its role is to make the package outputs easier to inspect and share:
100%
The preprocessing functions create quality-controlled methylation data and analysis-ready phenotype tables. The modelling functions fit cross-sectional and longitudinal association models. The report function gathers the resulting tables, figures, and logs into a browsable output.
The main workflow is:
preprocessingMinfiEwasWater() to prepare
methylation objects and QC outputs,svaEnmix() when control-probe surrogate variables
are needed,preprocessingPheno() to prepare modelling
tables,methylationGLM() or methylationLME()
for association testing, anddnamReport() to review the completed outputs.Date the vignette was generated.
#> [1] "2026-08-18 14:41:13 UTC"
Wallclock time spent generating the vignette.
#> Time difference of 0.193 secs
R session information.
#> R version 4.6.1 (2026-06-24)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 26.04 LTS
#>
#> Matrix products: default
#> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.32.so; LAPACK version 3.12.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
#> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
#> [9] LC_ADDRESS=C LC_TELEPHONE=C
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> time zone: Etc/UTC
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] parallel stats4 stats graphics grDevices utils datasets
#> [8] methods base
#>
#> other attached packages:
#> [1] IlluminaHumanMethylation450kanno.ilmn12.hg19_0.6.1
#> [2] IlluminaHumanMethylation450kmanifest_0.4.0
#> [3] minfi_1.59.1
#> [4] bumphunter_1.55.1
#> [5] locfit_1.5-9.12
#> [6] iterators_1.0.14
#> [7] foreach_1.5.2
#> [8] Biostrings_2.81.6
#> [9] XVector_0.53.0
#> [10] SummarizedExperiment_1.43.0
#> [11] Biobase_2.73.2
#> [12] MatrixGenerics_1.25.0
#> [13] matrixStats_1.5.0
#> [14] GenomicRanges_1.65.1
#> [15] Seqinfo_1.3.0
#> [16] IRanges_2.47.2
#> [17] S4Vectors_0.51.6
#> [18] BiocGenerics_0.59.12
#> [19] generics_0.1.4
#> [20] dnaEPICO_0.99.38
#> [21] BiocStyle_2.41.0
#>
#> loaded via a namespace (and not attached):
#> [1] splines_4.6.1 BiocIO_1.23.3
#> [3] bitops_1.1-0 filelock_1.0.3
#> [5] tibble_3.3.1 preprocessCore_1.75.0
#> [7] XML_3.99-0.23 lifecycle_1.0.5
#> [9] httr2_1.3.0 doParallel_1.0.17
#> [11] lattice_0.23-1 MASS_7.3-66
#> [13] base64_2.0.2 scrime_1.3.7
#> [15] magrittr_2.0.5 limma_3.69.4
#> [17] sass_0.4.10 rmarkdown_2.31
#> [19] jquerylib_0.1.4 yaml_2.3.12
#> [21] otel_0.2.0 doRNG_1.8.6.3
#> [23] askpass_1.2.1 DBI_1.3.0
#> [25] buildtools_1.0.0 RColorBrewer_1.1-3
#> [27] abind_1.4-8 quadprog_1.5-8
#> [29] purrr_1.2.2 RCurl_1.98-1.19
#> [31] rappdirs_0.3.4 ggrepel_0.9.8
#> [33] irlba_2.3.7 maketools_1.3.2
#> [35] rentrez_1.2.4 genefilter_1.95.0
#> [37] annotate_1.91.0 DelayedMatrixStats_1.35.0
#> [39] codetools_0.2-20 DelayedArray_0.39.5
#> [41] xml2_1.6.0 tidyselect_1.2.1
#> [43] farver_2.1.2 beanplot_1.3.1
#> [45] BiocFileCache_3.3.0 dynamicTreeCut_1.63-1
#> [47] illuminaio_0.55.0 GenomicAlignments_1.49.1
#> [49] jsonlite_2.0.0 multtest_2.69.0
#> [51] survival_3.8-9 tools_4.6.1
#> [53] Rcpp_1.1.2 glue_1.8.1
#> [55] SparseArray_1.13.2 BiocBaseUtils_1.15.1
#> [57] xfun_0.60 dplyr_1.2.1
#> [59] HDF5Array_1.41.2 BiocManager_1.30.27
#> [61] fastmap_1.2.0 rhdf5filters_1.25.4
#> [63] openssl_2.4.2 caTools_1.18.4
#> [65] digest_0.6.39 R6_2.6.1
#> [67] RPMM_1.25 gtools_3.9.5
#> [69] RSQLite_3.53.3 cigarillo_1.3.1
#> [71] h5mread_1.5.0 minfiData_0.59.0
#> [73] tidyr_1.3.2 data.table_1.18.4
#> [75] rtracklayer_1.73.0 httr_1.4.8
#> [77] S4Arrays_1.13.0 pkgconfig_2.0.3
#> [79] gtable_0.3.6 blob_1.3.0
#> [81] S7_0.2.2 siggenes_1.87.0
#> [83] impute_1.87.0 sys_3.4.3
#> [85] htmltools_0.5.9 geneplotter_1.91.0
#> [87] scales_1.4.0 png_0.1-9
#> [89] knitr_1.51 tzdb_0.5.0
#> [91] rjson_0.2.23 nlme_3.1-170
#> [93] curl_7.1.0 cachem_1.1.0
#> [95] rhdf5_2.57.10 BiocVersion_3.24.0
#> [97] KernSmooth_2.23-27 AnnotationDbi_1.75.2
#> [99] restfulr_0.0.17 GEOquery_2.81.28
#> [101] pillar_1.11.1 grid_4.6.1
#> [103] reshape_0.8.10 vctrs_0.7.3
#> [105] gplots_3.3.0 ENmix_1.49.3
#> [107] dbplyr_2.6.0 xtable_1.8-8
#> [109] cluster_2.1.8.3 evaluate_1.0.5
#> [111] readr_2.2.0 GenomicFeatures_1.65.0
#> [113] cli_3.6.6 compiler_4.6.1
#> [115] Rsamtools_2.29.0 rlang_1.3.0
#> [117] crayon_1.5.3 rngtools_1.5.2
#> [119] nor1mix_1.3-3 mclust_6.1.3
#> [121] plyr_1.8.9 BiocParallel_1.47.0
#> [123] Matrix_1.7-6 ExperimentHub_3.3.2
#> [125] hms_1.1.4 sparseMatrixStats_1.25.0
#> [127] bit64_4.8.2 ggplot2_4.0.3
#> [129] Rhdf5lib_2.1.0 KEGGREST_1.53.6
#> [131] statmod_1.5.2 AnnotationHub_4.3.2
#> [133] memoise_2.0.1 bslib_0.12.0
#> [135] bit_4.6.0
Use the Bioconductor
support site for package questions. Add the dnaEPICO
tag, review previous
posts, and include a small reproducible example with session
information.