-
Notifications
You must be signed in to change notification settings - Fork 0
Home
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
dnaEPICO provides a structured workflow that connects the main stages of an epigenome-wide association study:
- Import raw red and green IDAT files.
- Perform sample and probe quality control.
- Predict sample sex and optionally remove confirmed sex mismatches.
- Normalise methylation measurements.
- Filter unreliable, SNP-associated, cross-reactive, and selected manifest-flagged probes.
- Extract beta values, M-values, and copy-number measurements.
- Estimate cell composition.
- Estimate control-probe surrogate variables.
- Prepare phenotype and methylation data for individual and combined timepoints.
- Fit CpG-wise GLM or longitudinal mixed-effects models.
- Annotate model results with genomic information.
- Generate workbooks, logs, figures, result files, and an interactive web report.
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 models can be fitted using:
-
lmerTestandlme4 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.
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 = TRUEa compatible completed phenotype can be reused without fitting all its CpGs again.
An interrupted phenotype without a complete summary restarts from its first CpG.
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")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=model1Other available routes include:
make f3 MODEL=model1
make f4 MODEL=model1
make f3lme MODEL=model1
make status MODEL=model1
make clean MODEL=model1The 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:
- Annotated model results
- Analysis metadata
- 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/.
Display the current citation from R:
citation("dnaEPICO")Please also cite the underlying Bioconductor and statistical packages used in the selected workflow.
Questions about package usage can be submitted through: