Last Updated: July 2026
GitHub DOI: 10.5281/zenodo.21777087
This repository contains the code, data workflows, and results associated with the manuscript: Long-Read epigenetic clocks identify improved brain aging predictions.
This study utilizes long-read sequencing data in tandem with GenoML to develop enhanced methylation clocks.
Human brain sequencing datasets are under controlled access and require a dbGap application (phs001300.v5) (phs000979.v4). Afterwards, the data will be available through the restricted AnVIL workspace.
If you use this repository or find it helpful for your research, please cite the corresponding manuscript (pre-print):
Grant, S. M., Eger, S. J., Makarious, M. B., Meredith, M., et al. (2025). Long-Read epigenetic clocks identify improved brain aging predictions. bioRxiv : the preprint server for biology, 2025.09.30.679553. https://doi.org/10.1101/2025.09.30.679553
The scripts/ directory includes all the analyses discussed in the manuscript.
this_repository
├── config.yml
├── envs
│ ├── general_env.yml
│ ├── genoml.yml
│ ├── r_env_ewce.yml
│ ├── r_env.yml
├── overview.png
├── README.md
├── scripts
│ ├── 00_handle_promoter_overlap.py
│ ├── 01_process_metadata.py
│ ├── 02_dephase_cpgs.py
│ ├── 03_intersect_cpgs.py
│ ├── 04_filter_cpgs.py
│ ├── 05_aggregate_features.py
│ ├── 06_calculate_cpg_averages.py
│ ├── 07_meth_pca.py
│ ├── 08_extract_clock_regions.py
│ ├── 09_extract_clock_cpgs.py
│ ├── 10_feature_importance.py
│ ├── 11_significant_promoters_and_genes.py
│ ├── 12_significant_windows.py
│ ├── 13_go_enrichment.R
│ ├── 14_ewce.R
│ ├── 15_external_validation.py
│ ├── 16_external_validation_self_norm.py
│ ├── 17_covariate_analysis.py
│ └── 18_generate_figs_and_tables.py
├── snakefile
└── snakemake.sh
| Script | Description |
|---|---|
snakemake.sh |
Main script to run the full analysis pipeline. |
snakefile |
Defines the rules for running each of the analysis scripts. |
config.yml |
Defines necessary variables for executing the snakemake pipeline. |
00_handle_promoter_overlap.py |
Find overlapping promoters and split the overlap between them. |
01_process_metadata.py |
Standardize and save metadata and generate plots for age distribution and feature correlation. |
02_dephase_cpgs.py |
Combine haplotypes and perform CpG-level QC to get one value per CpG per sample. |
03_intersect_cpgs.py |
Find CpGs that are present and pass QC in all cohorts. |
04_filter_cpgs.py |
Filter data to only include CpGs shared between all cohorts for the combined cohort. |
05_aggregate_features.py |
Aggregate CpGs across each region (promoters/windows). |
06_calculate_cpg_averages.py |
Calculate methylation values for each CpG. |
07_meth_pca.py |
Generate methylation-based principal components. |
08_extract_clock_regions.py |
Extract nearest promoters/windows to previously-existing clocks from long-read datasets. |
09_extract_clock_cpgs.py |
Extract CpGs from previously-existing clocks from long-read datasets. |
10_feature_importance.py |
Calculate feature importance values for each model and generate SHAP plots. |
11_significant_promoters_and_genes.py |
Save the list of most important promoters and corresponding genes for each promoter-based model. |
12_significant_windows.py |
Save the list of most important windows for each promoter-based model. |
13_go_enrichment.py |
Gene ontology enrichment analysis using hypo- and hyper-methylated genes from each model. |
14_ewce.R |
Expression weighted cell type enrichment analysis using hypo- and hyper-methylated genes from each model. |
15_external_validation.py |
Apply and evaluate models in external dataset of Colombian control samples. |
16_external_validation_self_norm.py |
Apply and evaluate models in external dataset of Colombian control samples using self-normalization. |
17_covariate_analysis.py |
Run regressions for age acceleration vs. cell type and PMI. |
18_generate_figs_and_tables.py |
Generate final figures and tables for the manuscript. |
| Software | Version(s) | URL | Notes |
|---|---|---|---|
| Python | 3.12.11 | python.org | Main analysis language |
| R | 4.3 | r-project.org | Analysis language for funcitonal enrichment |
| GenoML | 1.5.4 | github.com | Machine learning model development |
| SHAP | 0.48.0 | shap.readthedocs.io | Model interpretation |
