Skip to content
Paul Ruiz edited this page Jul 23, 2026 · 5 revisions

dnaEPICO

dnaEPICO is an R/Bioconductor package for preprocessing and statistically analysing Illumina DNA methylation array data.

The package supports:

  • HumanMethylationEPIC v2.0 arrays
  • HumanMethylationEPIC arrays
  • HumanMethylation450K arrays
  • Local workstation and HPC execution
  • Automated workflows using GNU Make
  • Interactive Quarto reports

Overview

dnaEPICO provides a structured workflow that connects the main stages of an epigenome-wide association study:

  1. Import raw red and green IDAT files.
  2. Perform sample and probe quality control.
  3. Predict sample sex and optionally remove confirmed sex mismatches.
  4. Normalise methylation measurements.
  5. Filter unreliable, SNP-associated, cross-reactive, and selected manifest-flagged probes.
  6. Extract beta values, M-values, and copy-number measurements.
  7. Estimate cell composition.
  8. Estimate control-probe surrogate variables.
  9. Prepare phenotype and methylation data for individual and combined timepoints.
  10. Fit CpG-wise GLM or longitudinal mixed-effects models.
  11. Annotate model results with genomic information.
  12. Generate workbooks, logs, figures, result files, and an interactive web report.

Statistical models

Generalised linear models

CpG-wise GLMs are fitted using glm2.

The GLM workflow supports:

  • Numeric, binary, and multilevel phenotypes
  • Multiple phenotypes
  • Covariate adjustment
  • Factor variables
  • Scaling of selected numeric variables
  • Optional interaction terms
  • Multiple-testing adjustment
  • Model messages for warnings and fitting errors

Longitudinal mixed-effects models

Longitudinal models can be fitted using:

  • lmerTest and lme4
  • nlme

The default participant structure is a random intercept:

(1 | Participant)

The longitudinal workflow supports:

  • Repeated measurements
  • Phenotype-by-time interactions
  • Multiple phenotypes
  • Covariate adjustment
  • Scaling of selected numeric variables
  • Optional nlme residual correlation structures
  • Model messages for warnings and fitting errors

For lmerTest/lme4, an optional omnibus F test can provide one joint p-value for a complete multilevel phenotype or phenotype-by-interaction term. Satterthwaite and Kenward–Roger denominator degrees-of-freedom methods are supported.

Performance and restart support

CpG models are processed in bounded response blocks. Complete native model objects are not retained for every CpG.

The number supplied through N_CORES is treated as a maximum. dnaEPICO can select fewer workers according to:

  • Available CPUs
  • Available memory
  • Scheduler allocations
  • Number of CpGs
  • Selected model engine

After a phenotype is completed, dnaEPICO saves a compact phenotype summary. When:

RESUME_FROM_SUMMARY = TRUE

a compatible completed phenotype can be reused without fitting all its CpGs again.

An interrupted phenotype without a complete summary restarts from its first CpG.

Quick installation

Install the released Bioconductor version:

if (!requireNamespace("BiocManager", quietly = TRUE)) {
    install.packages("BiocManager")
}

BiocManager::install("dnaEPICO")

Install the development version from GitHub:

if (!requireNamespace("BiocManager", quietly = TRUE)) {
    install.packages("BiocManager")
}

BiocManager::install(
    "paulYRP/dnaEPICO",
    ask = FALSE,
    update = FALSE
)

Confirm the installation:

library(dnaEPICO)

packageVersion("dnaEPICO")

Quick start

Create a project directory and place the shared input files under:

data/preprocessingMinfiEwasWater/

The directory should contain:

data/preprocessingMinfiEwasWater/
├── idats/
├── pheno.csv
└── optional probe-exclusion files

Export the current Makefile template:

library(dnaEPICO)

extractMake(
    destDir = "/path/to/project",
    overwrite = FALSE
)

After configuring the Makefile, run the complete pipeline:

make all MODEL=model1

Other available routes include:

make f3 MODEL=model1
make f4 MODEL=model1
make f3lme MODEL=model1
make status MODEL=model1
make clean MODEL=model1

Main outputs

The workflow generates model-specific outputs under:

data/model1/
rData/model1/
results/model1/
figures/model1/
logs/model1/
reports/model1/

The principal model workbooks are:

data/model1/methylationGLM/annotatedGLM.xlsx
data/model1/methylationLME/annotatedLME.xlsx

Each workbook contains:

  1. Annotated model results
  2. Analysis metadata
  3. A column dictionary

The interactive report is generated at:

reports/model1/docs/index.html

The complete reports/model1 directory must remain together because the HTML page uses supporting result files stored under reports/model1/assets/.

Wiki navigation

Additional resources

Citation

Display the current citation from R:

citation("dnaEPICO")

Please also cite the underlying Bioconductor and statistical packages used in the selected workflow.

Support

Questions about package usage can be submitted through: