Skip to content

Conversation

@marcbal77
Copy link
Member

Adds the Weidner blood-based aging clock (2014) to biolearn, implementing the 3-CpG age prediction model. This supersedes #135 and addresses all review feedback.

The Weidner clock uses DNA methylation at 3 CpG sites (ASPA, ITGA2B, PDE4C) to predict age from blood samples with ~5 year accuracy. Reference: Weidner et al., 2014

Changes:

  • Added Weidner model definition with coefficients and linear transformation (intercept: 111.83)
  • Added test data with verified expected outputs
  • Fixed formatting and CSV issues
  • Fixed documentation typo

Addresses review concerns from #135:

  • Test data added for verification (biolearn/test/data/expected_model_outputs/Weidner.csv)
  • Confirmed correct paper - Weidner is the first author

Closes #135, closes #170
cc: @chancenlaw @alexiszxcv (original PR authors), @sarudak (reviewer)

Copy link
Member

@sarudak sarudak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The testset data was committed. Please remove and ensure that the large methylation file is cleaned out of the history.

Corrected coefficients from the original PR to match the published
formula in Weidner et al. 2014 (doi: 10.1186/gb-2014-15-2-r24):
- cg02228185: -26.4 (was -64.57)
- cg25809905: -23.7 (was -42.57)
- cg17861230: 164.7 (was 75.15)
- Intercept: 38.0 (was 111.83)
@marcbal77
Copy link
Member Author

Changes made:

  1. I removed the large test data files from git history (testset_methylation_part0.csv and testset_metadata.csv). These are properly gitignored and get generated automatically when running make test - not sure how they got out of gitignore.

  2. While reviewing the implementation, I noticed the coefficients from the original PR didn't match the published paper. I've corrected them to match the actual formula from Weidner et al. 2014 (https://doi.org/10.1186/gb-2014-15-2-r24):

    • The paper specifies: Predicted age = 38.0 - 26.4α - 23.7β + 164.7γ
    • Updated coefficients and intercept accordingly

The PR now only adds the 3 essential files (27 lines total) - the model definition, coefficients file, and expected test outputs.

cc: @chancenlaw @alexiszxcv - I preserved your original work, just fixed the coefficients to match the paper and cleaned up per review feedback + @sarudak

@marcbal77 marcbal77 self-assigned this Dec 7, 2025
@marcbal77 marcbal77 added duplicate This issue or pull request already exists enhancement New feature or request labels Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Weidner clock

4 participants