Add MiAge (Mitotic Age) clock (Fixes PR #134)#185
Merged
marcbal77 merged 4 commits intobio-learn:masterfrom Dec 18, 2025
Merged
Add MiAge (Mitotic Age) clock (Fixes PR #134)#185marcbal77 merged 4 commits intobio-learn:masterfrom
marcbal77 merged 4 commits intobio-learn:masterfrom
Conversation
- Fix syntax error in model definition (= to :) - Replace MiAgeNonlinearClock with proper MiAgeModel implementation - Implement correct optimization-based approach using scipy - Formula: minimize sum((c + b^(n-1) * d - beta)^2) for each sample - Correct MiAge_parameters.csv with actual CpG IDs (not CpG_1, CpG_2) - Remove unnecessary files (MiAge.csv, MiAge_coefficients.csv) - Add expected test outputs from MethylCIPHER reference data - Update model metadata (year: 2018, proper DOI, output label) Based on Youn & Wang (2018) and MethylCIPHER reference implementation.
- Add MiAgeModel to model_gallery.py imports and model_builders registry - Update expected_model_outputs/MiAge.csv with all 10 test samples - Fixes model registration error preventing MiAge clock usage - Tests passing Updates PR bio-learn#134
5e20ac0 to
7959698
Compare
sarudak
requested changes
Nov 16, 2025
Member
sarudak
left a comment
There was a problem hiding this comment.
Looks good just a couple issues
biolearn/model.py
Outdated
| "file": "MiAge.csv", | ||
| }, | ||
| }, | ||
| "OrganAgeChronological": { |
Member
There was a problem hiding this comment.
These items are all duplicates of above.
Member
Author
There was a problem hiding this comment.
dear lord, that copy paste method was busy the other day
biolearn/model.py
Outdated
| float | ||
| Estimated mitotic age (number of cell divisions) | ||
| """ | ||
| from scipy.optimize import minimize_scalar |
Member
There was a problem hiding this comment.
Imports should be at top of file
- Remove duplicate ModelGallery entries that were overwriting existing clocks
Member
Author
|
removed duplicates and put imports at top |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes and closes PR #134