From 9b39676b7ca0886fb06a586e37609aa3259af8f7 Mon Sep 17 00:00:00 2001 From: lex <125166100+alexiszxcv@users.noreply.github.com> Date: Mon, 17 Mar 2025 23:57:40 -0400 Subject: [PATCH 1/4] Add MiAge CSV files --- biolearn/data/MiAge_coefficients.csv | 269 +++++++++++++ biolearn/data/MiAge_parameters.csv | 544 +++++++++++++++++++++++++++ 2 files changed, 813 insertions(+) create mode 100644 biolearn/data/MiAge_coefficients.csv create mode 100644 biolearn/data/MiAge_parameters.csv diff --git a/biolearn/data/MiAge_coefficients.csv b/biolearn/data/MiAge_coefficients.csv new file mode 100644 index 0000000..1a932e8 --- /dev/null +++ b/biolearn/data/MiAge_coefficients.csv @@ -0,0 +1,269 @@ +"CpG_Site","Value1","Value2","Value3" +"CpG_1",0.997532178573722,0.521451605677157,-0.354770518960769 +"CpG_2",0.999515686071933,0.812465172078029,-0.63583405538151 +"CpG_3",0.999733159924055,0.435155243806152,-0.343761639293931 +"CpG_4",0.997810270123824,0.524318955013262,-0.328248646772022 +"CpG_5",0.998683802451356,0.850180749471286,-0.583592926503214 +"CpG_6",0.999872291020431,1.00000078292952,-0.958516549883466 +"CpG_7",0.999583009728787,0.810030474652367,-0.810030474752367 +"CpG_8",0.999320620365592,0.688664088097486,-0.290893926025459 +"CpG_9",0.999874644198272,1.00000079772586,-0.996323180596151 +"CpG_10",0.99852807819794,0.667323039065931,-0.359806670166855 +"CpG_11",0.998386529635878,0.757582981682659,-0.532300398808018 +"CpG_12",0.995465290409981,0.679583119123147,-0.534742235947952 +"CpG_13",0.999585014049022,0.700894079891497,-0.677385661718727 +"CpG_14",0.997932262303167,0.63873039416935,-0.427930985665093 +"CpG_15",0.999909707609692,1.00000110750822,-0.931039704222819 +"CpG_16",0.999246401164456,0.898930064763863,-0.616508626014736 +"CpG_17",0.99923849317883,0.488126565057554,-0.378185577470863 +"CpG_18",0.998323615423546,0.822527091998598,-0.172981995462801 +"CpG_19",0.999881284465112,0.999685544534162,-0.571597998795496 +"CpG_20",0.99920851432113,0.660856573637179,-0.31381492844688 +"CpG_21",0.999744402531991,0.581173323952948,-0.461017528040668 +"CpG_22",0.9980068593345,0.614903803291611,-0.48655932296868 +"CpG_23",0.999782910888747,0.87956552229003,-0.878947473905085 +"CpG_24",0.998959602780355,0.691713999935584,-0.609296939572133 +"CpG_25",0.998856474636678,0.849646816199207,-0.180589845590195 +"CpG_26",0.999603483628956,0.736707797106889,-0.703613381719689 +"CpG_27",0.999585271488541,0.822288259909194,-0.388324574636101 +"CpG_28",0.997507545052272,0.890847689158119,-0.594016374361886 +"CpG_29",0.998989599018316,0.933226488099569,-0.290830016928065 +"CpG_30",0.999517414327606,0.774175115359648,-0.333305177986928 +"CpG_31",0.999646311770848,0.780581727071466,-0.780581727171466 +"CpG_32",0.999887156727736,1.000000886181,-0.948504279785267 +"CpG_33",0.999307417908646,0.636119139155725,-0.493511053583864 +"CpG_34",0.99964034885444,0.879822842513014,-0.879822842613009 +"CpG_35",0.999359188304109,0.79918305945682,-0.799183059556762 +"CpG_36",0.999779486817801,0.763657321660192,-0.662904778974315 +"CpG_37",0.998843029384821,0.861118168604708,-0.208087157327514 +"CpG_38",0.998970319013729,0.756873536559914,-0.472778808399324 +"CpG_39",0.99952514781255,0.710524316626996,-0.696927256087063 +"CpG_40",0.999487993940197,0.509780154601705,-0.487064724959665 +"CpG_41",0.998669109874615,0.809490035784279,-0.219615595571618 +"CpG_42",0.999233759365852,0.622768761523717,-0.539195535658597 +"CpG_43",0.998929547177654,0.887284875505964,-0.202940594063679 +"CpG_44",0.98982905814148,0.389076509249917,-0.389076509349917 +"CpG_45",0.99931907231193,0.917546392193717,-0.236305827433979 +"CpG_46",0.999810208776108,1.00000052689246,-0.626133283854931 +"CpG_47",0.999265407222044,0.90420892627596,-0.304953847411123 +"CpG_48",0.995511520414267,0.63005950749519,-0.251260619378949 +"CpG_49",0.999745714408351,0.777176475045884,-0.721787755261111 +"CpG_50",0.999115160348821,0.606938845974907,-0.378732051811218 +"CpG_51",0.998914531717989,0.841684084929068,-0.218304666022593 +"CpG_52",0.998811358066761,0.64125109460881,-0.437531880603989 +"CpG_53",0.999272223469697,0.477804985835925,-0.362291189970587 +"CpG_54",0.99861673523826,0.658122252565138,-0.371927596751882 +"CpG_55",0.999260375603694,0.707916050082424,-0.537423755114291 +"CpG_56",0.999537174353081,0.6900176268663,-0.6900176269663 +"CpG_57",0.997790282362088,0.853532985150653,-0.254438496476494 +"CpG_58",0.999705938851847,0.693504139516871,-0.639384160040117 +"CpG_59",0.998773123981566,0.719554098878703,-0.652301774806425 +"CpG_60",0.999554179939086,0.625055384625531,-0.589979763179533 +"CpG_61",0.999838987651104,0.964604670472064,-0.964604670572064 +"CpG_62",0.998967715092224,0.561050500545834,-0.53050574290522 +"CpG_63",0.99768974464841,0.615490247970696,-0.450140009169886 +"CpG_64",0.9994461674992,0.670830869371302,-0.6708308694712 +"CpG_65",0.999611532368396,0.949113546157765,-0.145886744984526 +"CpG_66",0.999178997948114,0.590811962633663,-0.284287463429017 +"CpG_67",0.997264182730005,0.503593985563726,-0.343448407199314 +"CpG_68",0.999882639480988,1.0000008520697,-0.999979298106915 +"CpG_69",0.997777723836737,0.794720111330982,-0.402109899103255 +"CpG_70",0.999561017160567,0.608907198542394,-0.559527154083425 +"CpG_71",0.998404521333909,0.838736228726155,-0.783865788655781 +"CpG_72",0.99927024416739,0.727870469092498,-0.476656491591621 +"CpG_73",0.999083802999921,0.795162971381656,-0.781756246749541 +"CpG_74",0.999657345732203,0.868594887400004,-0.724188984038645 +"CpG_75",0.998389045530195,0.499255365497263,-0.270928179475897 +"CpG_76",1,0,0.605211953796541 +"CpG_77",0.999779434074883,0.652714622140782,-0.380049992720041 +"CpG_78",0.999687434254776,1.0000001145495,-0.968316658944849 +"CpG_79",0.998489400879061,0.839377672224992,-0.766459202242559 +"CpG_80",0.999392653364569,0.681262022630203,-0.59669691429557 +"CpG_81",0.998887855550527,0.816038696642188,-0.535352089794062 +"CpG_82",0.998917821273106,0.872109920679519,-0.761543010179264 +"CpG_83",0.998983669505405,0.629714542668201,-0.406448094419442 +"CpG_84",0.998873463017535,0.909094704295871,-0.130277590729169 +"CpG_85",0.999180930061241,0.61291883554261,-0.503340418303173 +"CpG_86",0.999112418582052,0.618349931967055,-0.164100967705426 +"CpG_87",0.999194421334234,0.790260381202537,-0.586372206847464 +"CpG_88",0.999785277115292,0.999886644379849,-0.9578409451194 +"CpG_89",0.998902485492996,0.463412092841756,-0.246331812635087 +"CpG_90",0.999318273290323,0.590798741178887,-0.58518404382155 +"CpG_91",0.999110459827632,0.881094733356248,-0.160185794674435 +"CpG_92",0.999749803460965,0.73993612665955,-0.611698997958702 +"CpG_93",0.998713066739435,0.670302110636983,-0.326589208526356 +"CpG_94",0.999024439320303,0.800185093740559,-0.734594143363421 +"CpG_95",0.99807597221711,0.768053054875177,-0.531714989510861 +"CpG_96",0.999594697016873,0.831671595244428,-0.179884671844445 +"CpG_97",0.999715400802377,0.979729732023346,-0.979729732044426 +"CpG_98",0.999684260624455,0.696088481231272,-0.650934505494299 +"CpG_99",0.99988894894364,0.99995941721362,-0.840581897802136 +"CpG_100",0.999804650727378,1.00000051190253,-0.999996529492223 +"CpG_101",0.999656132694679,0.733613322531231,-0.625523196674874 +"CpG_102",0.999357953268864,0.566926081240353,-0.491121515036139 +"CpG_103",0.998895341433006,0.900349629906489,-0.151435601219533 +"CpG_104",0.998758366634493,0.502387769675466,-0.43481763135023 +"CpG_105",0.992962917035692,0.820150106958359,-0.422066312882795 +"CpG_106",0.99739553592466,0.629487713489137,-0.536282631081723 +"CpG_107",0.999754149135307,1.00000008698049,-1.00000008708049 +"CpG_108",0.997818413475173,0.603073544083479,-0.518151136061801 +"CpG_109",0.999718476561302,0.690832377628143,-0.552784783682376 +"CpG_110",0.999407050248121,0.645825051336326,-0.599545136627448 +"CpG_111",0.999671320166947,0.860454452617693,-0.356922911626375 +"CpG_112",0.998918308067536,0.493307119457116,-0.363118720612359 +"CpG_113",0.998351956406022,0.719611683508905,-0.509055584546483 +"CpG_114",0.999416828355752,0.882848756847746,-0.551205960816327 +"CpG_115",0.994274822206481,0.84222839098849,-0.84222839108849 +"CpG_116",0.998836444677452,0.642384809543028,-0.481342861783507 +"CpG_117",0.999555792779487,0.534784378088809,-0.473439333529474 +"CpG_118",0.999123354551544,0.743297755652972,-0.597778599129779 +"CpG_119",0.999790241108607,0.751502252962856,-0.692675477135318 +"CpG_120",0.999779789819373,0.940489968582633,-0.893913970033529 +"CpG_121",0.999325546099773,0.68869469491034,-0.378063869570691 +"CpG_122",0.999395151550709,0.673337984176689,-0.673337984276689 +"CpG_123",0.999663610728648,0.794524261482963,-0.715356859398852 +"CpG_124",0.999548669906832,0.800027604179008,-0.531060768776939 +"CpG_125",0.997532952966513,0.589562141151164,-0.380084412257556 +"CpG_126",0.999461263969653,0.742966177087033,-0.718003572930928 +"CpG_127",0.998834445713927,0.734991827164709,-0.384852193064232 +"CpG_128",0.998254394909014,0.889325774818714,-0.640995729212635 +"CpG_129",0.998250169025203,0.418774823440546,-0.312468885719852 +"CpG_130",0.999858338924585,1.0000007059087,-0.897494465596819 +"CpG_131",0.997839993930211,0.490564449500499,-0.291908562859373 +"CpG_132",0.999729370522598,0.667827676222479,-0.644725522917693 +"CpG_133",0.999599404638493,0.894521724940832,-0.874443447880304 +"CpG_134",0.999811927471828,0.733371172714611,-0.674396547157123 +"CpG_135",0.999751369288057,0.748088854828947,-0.748088854928473 +"CpG_136",0.998996074208533,0.715922366266953,-0.458908084261017 +"CpG_137",0.998981626662935,0.660887614021238,-0.419551138349971 +"CpG_138",0.995895207748185,0.728460539599085,-0.605530224271045 +"CpG_139",0.999002497793815,0.807953535954567,-0.298505183949695 +"CpG_140",0.99887545030419,0.822269133769217,-0.731195530762814 +"CpG_141",0.999877146406593,1.00000081397526,-1.00000071287226 +"CpG_142",0.994458699314063,0.799570458002198,-0.799570458102198 +"CpG_143",0.999713969197603,0.596433894321862,-0.442600872420663 +"CpG_144",0.999835692510968,0.588770295540566,-0.56004209847672 +"CpG_145",0.999825127871056,0.949035914152907,-0.226267111931282 +"CpG_146",0.999806233641178,1.00000051608435,-1.00000050854529 +"CpG_147",0.999870907452249,1.00000050498025,-0.923932706557344 +"CpG_148",0.998166769195783,0.92914892862537,-0.326335607311436 +"CpG_149",0.99189872487546,0.684102539480704,-0.419508365310058 +"CpG_150",0.999890706134828,0.999977925246875,-0.999977925346875 +"CpG_151",0.998567147058459,0.655568686862717,-0.613259228652051 +"CpG_152",0.999882117620188,1.00000083304602,-1.00000083314602 +"CpG_153",0.998850735762481,0.446954227899635,-0.395627597105004 +"CpG_154",0.998876821659624,0.475018679693107,-0.439195511461137 +"CpG_155",0.999490662629433,0.702356335989469,-0.6120006450165 +"CpG_156",0.99971002988889,0.751217681050256,-0.667180850003609 +"CpG_157",0.999885608120364,1.00000087418606,-0.916805438923758 +"CpG_158",0.999725365925416,0.888456844857044,-0.703774643734752 +"CpG_159",0.999228831515701,0.737416934542258,-0.487344397913108 +"CpG_160",0.999761531205346,0.999987355303585,-0.959640099268045 +"CpG_161",0.999864053479267,0.786538323565742,-0.699648513963168 +"CpG_162",0.999961320285568,1.00000258531749,-0.369837231515496 +"CpG_163",0.999746668025123,0.788396789890984,-0.54751645983998 +"CpG_164",1,0,0.7525582927331 +"CpG_165",0.999861533224858,1.00000072219176,-0.993648134364735 +"CpG_166",0.999145635328246,0.618818439499665,-0.334638362422735 +"CpG_167",0.999820975421718,0.909270449484402,-0.866801870468382 +"CpG_168",0.999476920825708,0.840842821270397,-0.276569881217759 +"CpG_169",0.999438657602823,0.727314594739965,-0.501189347525773 +"CpG_170",0.999389150657338,0.599404255273955,-0.425731554761739 +"CpG_171",0.999912164762016,1.0000011384928,-1.00000113836212 +"CpG_172",0.999447757523798,0.850431757328636,-0.351808805037563 +"CpG_173",0.999572503260236,0.682269999972676,-0.682270000072676 +"CpG_174",0.999728454133263,0.546046140533544,-0.428218901448656 +"CpG_175",0.997231104199948,0.703860888876764,-0.447386344876449 +"CpG_176",0.999922027129792,1.00000062752559,-0.90631711820397 +"CpG_177",0.999730602966491,0.770170036658548,-0.296067173024484 +"CpG_178",0.999232690601245,0.689619890258763,-0.472665620120274 +"CpG_179",0.999925894544253,1.00000134942243,-1.00000134573826 +"CpG_180",0.998480766100715,0.456784193154432,-0.411720427931816 +"CpG_181",0.999861658477746,0.99999174853352,-0.99999174863352 +"CpG_182",0.996864729091638,0.437978231831864,-0.327829018760324 +"CpG_183",0.999589226335512,0.686346687602767,-0.558705458604506 +"CpG_184",0.998557290205795,0.876782813501274,-0.17941877340581 +"CpG_185",0.999261786896524,0.79056300459497,-0.755440812381395 +"CpG_186",0.999264206426299,0.63940874959904,-0.54643881073947 +"CpG_187",0.99808649002651,0.933135066514799,-0.2736559489957 +"CpG_188",0.998722928246556,0.418868100912123,-0.418868101012123 +"CpG_189",0.999833714705787,0.999995677797279,-0.952197812235388 +"CpG_190",0.999894891336424,1.00000079455841,-0.649470853766119 +"CpG_191",0.999760115664522,0.89497996486182,-0.817144797420851 +"CpG_192",0.999675171037653,0.731883530509915,-0.676733906975514 +"CpG_193",0.999696763424002,0.834261300432327,-0.802972093186761 +"CpG_194",0.999764907447063,0.99279365949623,-0.911344115050461 +"CpG_195",0.999857538269768,0.999999853723697,-0.999999853823697 +"CpG_196",0.999596566160825,0.72551454721845,-0.67744530739139 +"CpG_197",0.999639853977697,0.747654557369149,-0.569976507363827 +"CpG_198",0.999878728795404,0.999998006400914,-0.909853196404887 +"CpG_199",0.999756571030803,0.915278706466721,-0.890098322934339 +"CpG_200",0.998663679229176,0.844090069582511,-0.43108066325234 +"CpG_201",0.99937649901747,0.782122694155624,-0.782122694255624 +"CpG_202",0.999238693842319,0.739562564452079,-0.493119837033451 +"CpG_203",0.99890050577268,0.650553509643569,-0.581953772162992 +"CpG_204",0.999913166132447,1.00000114156734,-0.931139120151557 +"CpG_205",0.999668100336396,0.640405472846498,-0.532057832006615 +"CpG_206",0.999705908667013,0.746905884886405,-0.651799589383054 +"CpG_207",0.999513863335591,0.736390218922098,-0.332714696925705 +"CpG_208",0.998602899492064,0.793713744305907,-0.177376478062166 +"CpG_209",0.999947610263997,1.00000190866079,-0.891294345537998 +"CpG_210",0.999576144364952,0.745964754970318,-0.745964755070318 +"CpG_211",0.99987697605975,1.00000081284818,-0.999916301595736 +"CpG_212",0.999881050050374,0.999735689652606,-0.973167386414335 +"CpG_213",0.99827238512116,0.749702426084699,-0.67419514649112 +"CpG_214",0.999547222999604,0.687685975178807,-0.67672794469514 +"CpG_215",0.999642022901221,0.764224865932712,-0.653879127075488 +"CpG_216",0.998712187256203,0.681558506814701,-0.327757092967576 +"CpG_217",0.999493462996757,0.512034511733812,-0.417201601035989 +"CpG_218",0.999177496341026,0.57372241602976,-0.473979803316807 +"CpG_219",0.9996010647579,0.751877303572345,-0.217125554070779 +"CpG_220",0.999646392618859,0.660613688991344,-0.660613689091344 +"CpG_221",0.999882418068835,0.843945659980234,-0.681979693690691 +"CpG_222",0.99920578098876,0.891974625624471,-0.616070725368353 +"CpG_223",0.998978464329933,0.796879587703353,-0.283393674314343 +"CpG_224",0.999868854983533,1.00000076246564,-0.97741397379762 +"CpG_225",0.998953430274906,0.812442827823663,-0.812442827923663 +"CpG_226",0.998265165277086,0.813690117160875,-0.177529937417462 +"CpG_227",0.998655958482827,0.575405567768601,-0.342055664963055 +"CpG_228",0.999406029957702,0.68449280112688,-0.463823138277717 +"CpG_229",0.999688522356747,0.899899264622708,-0.332130007055887 +"CpG_230",0.999517809965694,0.693136191264836,-0.67201026056564 +"CpG_231",0.998708331674803,0.624178556226972,-0.349857976601906 +"CpG_232",0.998832895297934,0.900910623087293,-0.246623116615247 +"CpG_233",0.999815158037389,0.760841291492423,-0.696134861408586 +"CpG_234",0.999602266957581,0.48430525658806,-0.347716537379908 +"CpG_235",0.99817530209033,0.826456728078298,-0.778914594050861 +"CpG_236",0.999781637797144,0.920241576095727,-0.901582186582983 +"CpG_237",0.996584983557163,0.654799712439235,-0.43509007119781 +"CpG_238",0.998788499977253,0.850371346806074,-0.262552301788952 +"CpG_239",0.992449312562232,0.711169607014273,-0.420264738216832 +"CpG_240",0.998972754950761,0.729365955304439,-0.609654371209523 +"CpG_241",0.999304206643222,0.51778051390201,-0.378206522493659 +"CpG_242",0.999689433500231,0.402684573891035,-0.363266710044448 +"CpG_243",0.999506495818142,0.925978767188864,-0.22941752780688 +"CpG_244",0.998848010714877,0.913459475130406,-0.135846608775855 +"CpG_245",0.987360836352242,0.688167111776728,-0.364583231001355 +"CpG_246",0.999681337771959,0.889975116854377,-0.889975116954377 +"CpG_247",0.999826685533983,0.982889698512547,-0.546054096657203 +"CpG_248",0.999707451527726,0.79304708550225,-0.338577426707451 +"CpG_249",0.999836136784413,1.00000061026108,-0.994329718667405 +"CpG_250",0.999732795535468,0.736228585867759,-0.432729118705602 +"CpG_251",0.998787437999125,0.716138688276783,-0.628233621412053 +"CpG_252",0.999787242760927,0.994119345886607,-0.891993654901652 +"CpG_253",0.999606078555699,0.825562626832471,-0.825562626932471 +"CpG_254",0.999777482485176,0.738123740740258,-0.490961983889218 +"CpG_255",0.999864116081124,0.945883336879447,-0.945883336979447 +"CpG_256",0.999873991447348,0.999998104629905,-0.900945120279847 +"CpG_257",0.999887631810486,1.00000088992967,-1.00000089002967 +"CpG_258",0.999244071324475,0.731866882384178,-0.436350352059731 +"CpG_259",0.999343771976178,0.50084475274556,-0.408431658181162 +"CpG_260",0.998721195558505,0.640658955032048,-0.520877764896865 +"CpG_261",0.999770949148318,0.700357654032084,-0.407336953507809 +"CpG_262",0.999121868741723,0.76740935058263,-0.452095748893364 +"CpG_263",0.999560901119049,0.792451229677255,-0.696515456336462 +"CpG_264",0.999631031789297,0.685831333722154,-0.685831333822153 +"CpG_265",0.999620142316625,0.911246692173785,-0.792611336787476 +"CpG_266",0.999397986353765,0.594957242960695,-0.582417337613694 +"CpG_267",0.999229009571253,0.754893520027078,-0.754893520127078 +"CpG_268",0.998576382547561,0.73386524828029,-0.492266133088628 diff --git a/biolearn/data/MiAge_parameters.csv b/biolearn/data/MiAge_parameters.csv new file mode 100644 index 0000000..d328aba --- /dev/null +++ b/biolearn/data/MiAge_parameters.csv @@ -0,0 +1,544 @@ +"CpG_Site","Coefficient" +"A7-A13G",68.0614114799315 +"BH-A1EN",308.281740709618 +"BH-A1EY",378.185798499771 +"BH-A1F2",168.336463284201 +"BH-A1F5",582.193693342694 +"BH-A1F6",224.28947103909 +"BH-A1F8",308.509392228244 +"BH-A1FB",338.487255500889 +"BH-A1FC",461.71661342688 +"BH-A1FD",242.952011755002 +"BH-A1FE",254.833342653134 +"BH-A1FG",199.677823486348 +"BH-A1FH",242.130115510921 +"BH-A1FJ",266.551820405996 +"BH-A1FM",236.098876122322 +"BH-A1FN",200.985893986854 +"BH-A1FR",304.467960877261 +"E2-A1IF",341.15012343228 +"E2-A1II",261.570541861561 +"E2-A1IO",272.712066787968 +"E2-A1L7",534.689050169086 +"E2-A1LB",337.059867948012 +"E9-A1N6",363.926270476615 +"E9-A1N8",185.100607854921 +"E9-A1NA",298.166342285329 +"E9-A1ND",290.550359023259 +"E9-A1N5",395.894138580941 +"E9-A1NF",129.136556071076 +"E9-A1N4",490.484961990958 +"E9-A1NE",227.19017002183 +"E9-A1NG",199.938656599124 +"E9-A1R7",202.113287611735 +"AC-A23H",276.545838232275 +"BH-A204",201.712585150456 +"BC-A10Q",821.153793435197 +"BC-A10R",859.753460322698 +"BC-A10S",956.252113474175 +"BC-A10T",810.33977018986 +"BC-A10U",862.048714623792 +"BC-A10W",1039.00945098045 +"BC-A10X",943.377462954723 +"BC-A10Y",1024.64642095433 +"BC-A10Z",782.058917508712 +"BC-A110",828.485607642323 +"BC-A112",875.384621002237 +"DD-A113",748.800390899296 +"DD-A114",1013.58195787713 +"DD-A115",938.61320056607 +"DD-A116",829.08527709224 +"DD-A118",925.273484605623 +"DD-A119",906.677251640015 +"DD-A11A",928.636081103489 +"DD-A11B",996.614608834554 +"DD-A11C",1158.03734215779 +"DD-A11D",839.713394089954 +"DD-A1EB",1161.53677819239 +"DD-A1EC",419.769456243831 +"DD-A1EE",997.089594962829 +"DD-A1EF",987.763019319215 +"DD-A1EH",671.848153673622 +"DD-A1EI",957.44945347489 +"EP-A12J",726.265330475831 +"BC-A216",987.330664578648 +"DD-A1E9",1041.70957485361 +"DD-A1ED",885.142846397883 +"DD-A1EJ",732.548654208412 +"DD-A1EL",892.647975657876 +"EP-A26S",710.767332666741 +"A6-2671",1690.54325701125 +"A6-2679",1441.89080449178 +"A6-2680",1246.7888558123 +"A6-2681",1103.65339886786 +"A6-2682",1421.24400685881 +"A6-2684",1532.10602158595 +"A6-2685",1108.29043136162 +"A6-2686",1594.04304753223 +"A6-4107",806.114158013626 +"AA-3488",1022.29239943723 +"AA-3492",1327.54242773937 +"AA-3494",1051.75715825254 +"AA-3495",1264.14295711276 +"AA-3502",1211.23822914254 +"AA-3506",940.509149162093 +"AA-3509",660.554657822167 +"AA-3510",1237.44301447431 +"A6-2675",672.809408857534 +"A6-5667",840.581881029233 +"AA-3655",944.234489248715 +"AA-3660",1090.04647755452 +"AA-3663",594.515671818271 +"AA-3697",1011.40868686182 +"AA-3712",1126.10440643582 +"AA-3713",1042.17096253298 +"G4-6295",1671.68669489933 +"G4-6297",1140.81941040191 +"G4-6298",1732.11355162495 +"G4-6302",1668.24193905095 +"G4-6311",1892.09592721585 +"G4-6314",1470.66219967221 +"G4-6320",1676.79627376023 +"G4-6322",1395.13957569667 +"AZ-6598",1435.73935344011 +"CV-5431",542.63011821281 +"CV-5436",271.915176850839 +"CV-5440",632.695661414828 +"CV-5441",1212.94009290534 +"CV-5442",440.041481887277 +"CV-5443",236.479281829963 +"CV-5444",269.219397576267 +"CV-5430",626.416275857519 +"CV-5432",764.714595993988 +"CV-5434",664.679434891808 +"CV-5435",587.061283064265 +"CV-5439",183.362160453314 +"CV-5966",319.896491654301 +"CV-5970",340.566038542934 +"CV-5971",284.033910531658 +"CV-5973",268.7145076591 +"CV-5976",364.544693373962 +"CV-5977",153.056955457288 +"CV-5978",89.6558818203347 +"CV-5979",332.26916982398 +"CV-6003",328.289821995862 +"CV-6433",318.297546298418 +"CV-6436",329.980270587177 +"CV-6441",431.32789461298 +"CV-6933",287.890943195467 +"CV-6934",427.570961291106 +"CV-6935",765.485436958633 +"CV-6936",614.703967362169 +"CV-6938",343.222230955649 +"CV-6939",170.916479776014 +"CV-6943",460.318100728473 +"CV-6951",330.572744405739 +"CV-6952",598.946792973008 +"CV-6953",1177.1511572141 +"EM-A3ST",29.0725417938817 +"FY-A3TY",48.9571539197227 +"EL-A3H1",230.768648823201 +"EL-A3H7",80.3852603932389 +"EL-A3MX",9.99999999999909 +"EL-A3MY",32.8198814765244 +"ET-A3DP",9.99999999999977 +"BJ-A3PR",631.697939062967 +"BJ-A3PU",25.1920930497259 +"EL-A3T6",212.878922214224 +"H2-A3RI",40.4363540715835 +"BJ-A28X",545.133050185429 +"EL-A3T0",94.054297152667 +"EL-A3T1",241.962449259753 +"EL-A3T2",43.262861740038 +"EL-A3T3",33.5377669968628 +"EL-A3T7",51.7536331583642 +"EL-A3T8",16.7766000950125 +"EL-A3TA",13.1135253946779 +"EL-A3TB",53.0250017561088 +"EL-A3ZG",17.0141081685015 +"EL-A3ZH",41.5428957608709 +"EL-A3ZK",207.87355683304 +"EL-A3ZL",20.070880666337 +"EL-A3ZO",59.8051539911265 +"EL-A3ZP",229.021305207537 +"DO-A1JZ",12.3208298599964 +"EM-A1CS",25.266296661008 +"EM-A1CT",24.258845760281 +"EM-A1CU",59.7821643847369 +"EM-A1CV",9.99999999999909 +"EM-A1CW",14.5177793653986 +"EM-A1YC",31.7548106668412 +"EM-A1YD",10 +"BQ-5875",226.697303427677 +"BQ-5876",190.710420400926 +"BQ-5877",241.113486371777 +"BQ-5878",238.044712426389 +"BQ-5879",69.5925304117655 +"BQ-5880",181.982489798907 +"BQ-5881",165.744870772248 +"BQ-5882",120.602663919751 +"BQ-5883",187.6883139279 +"BQ-5884",184.330377569056 +"BQ-5885",245.033169036128 +"BQ-5886",242.827182470409 +"BQ-5888",301.212513235271 +"BQ-5889",256.568276069352 +"BQ-5890",343.830744459847 +"BQ-5891",154.686850827498 +"BQ-5892",99.3588025847814 +"BQ-5893",125.468328469821 +"BQ-5894",125.034450664997 +"BQ-5887",128.661681706067 +"BQ-7044",184.008939901835 +"BQ-7045",383.41141549789 +"BQ-7046",117.39953405632 +"BQ-7048",148.447662753899 +"BQ-7049",84.1201850323484 +"BQ-7050",110.134125337561 +"BQ-7051",218.66687134251 +"BQ-7053",102.731005496774 +"BQ-7055",180.995162732334 +"BQ-7056",249.28366444818 +"BQ-7058",228.86093860053 +"BQ-7059",171.886391463133 +"BQ-7060",187.427429183427 +"BQ-7061",194.853005918624 +"CH-5761",262.627308250461 +"CH-5762",281.482091986312 +"CH-5763",400.856709321921 +"CH-5764",258.800389212999 +"CH-5765",347.733744014878 +"CH-5766",195.782181129127 +"CH-5768",344.555805037466 +"CH-5769",883.028076406184 +"CH-5771",306.332327161174 +"CH-5772",233.385796661222 +"CH-5767",309.135974353719 +"G9-6332",143.753440739483 +"G9-6348",379.585050055063 +"G9-6356",251.197561852484 +"G9-6362",1505.97921735955 +"G9-6363",851.754340424855 +"G9-6364",536.127607364568 +"G9-6365",235.830522268488 +"G9-6367",279.313465626338 +"G9-6373",345.269680179472 +"G9-6384",239.598544954488 +"G9-6385",444.271867896868 +"G9-6494",309.262555671458 +"G9-6496",305.299368842581 +"EJ-7123",196.395324451535 +"EJ-7125",348.474071114831 +"G9-6333",232.229415130775 +"G9-6342",423.328282634209 +"G9-6351",414.882568771439 +"G9-6353",353.395477396887 +"G9-6499",1455.18059223208 +"EJ-7317",347.083652242007 +"EJ-7327",519.270887105837 +"EJ-7328",344.703807685403 +"DI-A1NO",123.177561471021 +"BG-A2AD",138.871380776394 +"BG-A2AE",92.1460442887851 +"DI-A1NN",118.99018091857 +"AX-A2H5",120.431175125173 +"AX-A2H8",81.3801711530616 +"AX-A2HC",145.239737864723 +"AX-A2HD",204.648608141226 +"BG-A0MA",159.665447387283 +"AJ-A2QL",246.490903978341 +"AX-A2H4",65.7984172936739 +"AX-A2H7",144.459941279573 +"AX-A2HA",224.845841958119 +"BG-A2L7",231.430000289608 +"DI-A2QU",190.294577716737 +"EO-A22R",28.7103425891827 +"EO-A22S",9.99999999999977 +"EO-A22T",42.8371663435553 +"DI-A2QY",342.538015805177 +"AJ-A3NC",125.668505855235 +"AJ-A3NE",315.554782877723 +"AJ-A3NH",323.561231250808 +"BG-A3EW",135.486026198493 +"BG-A3PP",10 +"BK-A4ZD",96.6273908621214 +"AX-A05Y",155.934215144406 +"AX-A0J0",261.620607311798 +"AX-A0IZ",129.459548307928 +"BK-A13C",117.928748652936 +"AX-A1CF",158.010580267772 +"AX-A1CI",93.374166416664 +"AX-A1CJ",1062.12902684847 +"AX-A1CK",208.999294937374 +"E6-A1M0",10 +"A7-A13G",779.193969133718 +"BH-A1EN",6957.11201989192 +"BH-A1EY",2064.71557725099 +"BH-A1F2",2900.76189401939 +"BH-A1F5",1395.85356997536 +"BH-A1F6",2154.41325814241 +"BH-A1F8",2946.14884816893 +"BH-A1FB",903.126302816418 +"BH-A1FC",3294.55769576478 +"BH-A1FD",4375.97071711803 +"BH-A1FE",1546.93743755263 +"BH-A1FG",1310.31405080783 +"BH-A1FH",517.022610690895 +"BH-A1FJ",4002.20099155709 +"BH-A1FM",1991.65532640487 +"BH-A1FN",932.577130128027 +"BH-A1FR",806.429939885327 +"E2-A1IF",668.785486260604 +"E2-A1II",1542.8468729158 +"E2-A1IO",1270.08052723399 +"E2-A1L7",4089.20878774331 +"E2-A1LB",1498.92327670151 +"E9-A1N6",1407.80246736573 +"E9-A1N8",1133.50238014371 +"E9-A1NA",5349.82234039133 +"E9-A1ND",1705.5008142604 +"E9-A1N5",1652.06976131951 +"E9-A1NF",2223.9793379483 +"E9-A1N4",978.281913991854 +"E9-A1NE",1003.40791644284 +"E9-A1NG",667.75073517875 +"E9-A1R7",2754.37430789184 +"AC-A23H",6418.45880290355 +"BH-A204",5595.19206531704 +"BC-A10Q",4097.84629871292 +"BC-A10R",1719.95529436681 +"BC-A10S",3522.66931969804 +"BC-A10T",3550.17896253725 +"BC-A10U",2163.86994890755 +"BC-A10W",1873.88725735506 +"BC-A10X",851.411259567549 +"BC-A10Y",3442.95787377624 +"BC-A10Z",1834.49562205045 +"BC-A110",996.764197834096 +"BC-A112",5920.24763736596 +"DD-A113",3325.58166099135 +"DD-A114",1715.3340750945 +"DD-A115",2237.72646092979 +"DD-A116",1471.12361946715 +"DD-A118",2805.89919458751 +"DD-A119",1524.59139085152 +"DD-A11A",8753.35931306103 +"DD-A11B",5132.63176553228 +"DD-A11C",6135.97794768422 +"DD-A11D",3568.21093487738 +"DD-A1EB",3576.77972899025 +"DD-A1EC",2239.78279358276 +"DD-A1EE",8798.36125918419 +"DD-A1EF",3080.51704628344 +"DD-A1EH",2899.57286267985 +"DD-A1EI",2116.51119029659 +"EP-A12J",5084.95674158279 +"BC-A216",3965.14407989531 +"DD-A1E9",2573.44287423024 +"DD-A1ED",791.08454594743 +"DD-A1EJ",2811.3259189344 +"DD-A1EL",1561.12641984439 +"EP-A26S",4851.10328087396 +"A6-2671",3558.73135073638 +"A6-2679",4638.48704763123 +"A6-2680",4027.4412711563 +"A6-2681",3150.75974774384 +"A6-2682",2262.07577004937 +"A6-2684",3013.1549016899 +"A6-2685",1270.71546279041 +"A6-2686",6408.90917801184 +"A6-4107",6896.20828192573 +"AA-3488",3540.34723358472 +"AA-3492",8894.54315644863 +"AA-3494",2242.99255240811 +"AA-3495",3690.87257407407 +"AA-3502",6726.48195529611 +"AA-3506",4119.51017818728 +"AA-3509",3086.20294350602 +"AA-3510",3295.49636708761 +"A6-2675",2096.36104556782 +"A6-5667",2538.15537046461 +"AA-3655",3466.48318134525 +"AA-3660",3895.59230614115 +"AA-3663",6290.83250007223 +"AA-3697",3150.11134705022 +"AA-3712",2881.27504492257 +"AA-3713",4420.41413693901 +"G4-6295",2507.24066564799 +"G4-6297",3067.69301534306 +"G4-6298",3053.73799163681 +"G4-6302",1149.38844100752 +"G4-6311",2674.28666649635 +"G4-6314",2620.29638802328 +"G4-6320",8478.00374532418 +"G4-6322",8291.8737191818 +"AZ-6598",10000 +"CV-5431",2175.36749985927 +"CV-5436",2603.72414559185 +"CV-5440",1598.32301778767 +"CV-5441",2299.1683252163 +"CV-5442",3637.02315012826 +"CV-5443",2978.23517409613 +"CV-5444",1920.21319681461 +"CV-5430",2541.43233590197 +"CV-5432",2020.50155762572 +"CV-5434",2704.87300676293 +"CV-5435",4694.17426923695 +"CV-5439",2286.4874861929 +"CV-5966",2975.2750828714 +"CV-5970",2537.65480570571 +"CV-5971",1270.45387515151 +"CV-5973",5404.83735563851 +"CV-5976",3401.34936433163 +"CV-5977",6198.0103944493 +"CV-5978",1411.40965511189 +"CV-5979",3831.47581513836 +"CV-6003",3651.36857078561 +"CV-6433",2945.47980782084 +"CV-6436",3050.87198839268 +"CV-6441",4939.99405676242 +"CV-6933",1712.89350685218 +"CV-6934",2668.23746486386 +"CV-6935",2603.24346354472 +"CV-6936",4423.32206649666 +"CV-6938",2901.44932676564 +"CV-6939",1877.32008722176 +"CV-6943",2024.08906140291 +"CV-6951",2576.40743290332 +"CV-6952",4180.15913703449 +"CV-6953",4539.21283489577 +"EM-A3ST",230.446568394581 +"FY-A3TY",236.898182393372 +"EL-A3H1",269.015324407921 +"EL-A3H7",348.616485779105 +"EL-A3MX",560.765081349729 +"EL-A3MY",510.072391075944 +"ET-A3DP",92.1265224236781 +"BJ-A3PR",1127.93096116119 +"BJ-A3PU",256.596774363773 +"EL-A3T6",469.339032182282 +"H2-A3RI",222.327794914492 +"BJ-A28X",452.683976314557 +"EL-A3T0",162.930293301488 +"EL-A3T1",262.608823236384 +"EL-A3T2",151.75913579628 +"EL-A3T3",296.52538431365 +"EL-A3T7",160.294661967913 +"EL-A3T8",105.531419902119 +"EL-A3TA",180.849325231684 +"EL-A3TB",146.972715572972 +"EL-A3ZG",89.5109846383518 +"EL-A3ZH",110.144467497076 +"EL-A3ZK",330.364697333688 +"EL-A3ZL",94.9960612980278 +"EL-A3ZO",802.402313561486 +"EL-A3ZP",157.635588120374 +"DO-A1JZ",113.001657291253 +"EM-A1CS",105.0060894042 +"EM-A1CT",223.327072489967 +"EM-A1CU",235.498472236105 +"EM-A1CV",88.0522640225735 +"EM-A1CW",283.544779769829 +"EM-A1YC",27.1704486798667 +"EM-A1YD",63.1419947306062 +"BQ-5875",1055.12094956018 +"BQ-5876",1009.63107807922 +"BQ-5877",1633.62305769325 +"BQ-5878",1000.79312771018 +"BQ-5879",6508.71237812896 +"BQ-5880",1081.35454042838 +"BQ-5881",669.399871598889 +"BQ-5882",1357.65516536367 +"BQ-5883",365.765517650097 +"BQ-5884",855.626792242381 +"BQ-5885",845.659136498848 +"BQ-5886",857.423627267469 +"BQ-5888",798.096431789509 +"BQ-5889",677.163084910017 +"BQ-5890",2741.60029580517 +"BQ-5891",1319.64169506395 +"BQ-5892",792.927440807277 +"BQ-5893",8358.7745388625 +"BQ-5894",2147.37859875939 +"BQ-5887",1096.83416331002 +"BQ-7044",1451.62799736101 +"BQ-7045",631.677179162528 +"BQ-7046",817.918646471453 +"BQ-7048",1146.10683773355 +"BQ-7049",776.678800892933 +"BQ-7050",582.024440315225 +"BQ-7051",1094.39724497891 +"BQ-7053",689.713659193329 +"BQ-7055",148.501419818912 +"BQ-7056",881.743670670135 +"BQ-7058",1092.44852552566 +"BQ-7059",744.119704029868 +"BQ-7060",678.062426567631 +"BQ-7061",1526.15287174199 +"CH-5761",1334.6177114037 +"CH-5762",858.092345342572 +"CH-5763",414.508929848521 +"CH-5764",1173.08082417925 +"CH-5765",1497.0437055 +"CH-5766",718.543734833493 +"CH-5768",1451.57727350689 +"CH-5769",959.500640775594 +"CH-5771",615.333953182798 +"CH-5772",2291.96343349804 +"CH-5767",1317.82534434742 +"G9-6332",1257.42280470536 +"G9-6348",1001.02419920868 +"G9-6356",853.522864702555 +"G9-6362",1559.40349903829 +"G9-6363",1179.64489814448 +"G9-6364",822.17645341329 +"G9-6365",907.993140776461 +"G9-6367",268.392251639751 +"G9-6373",982.007116204762 +"G9-6384",848.625215742082 +"G9-6385",634.35431403125 +"G9-6494",1642.31767386616 +"G9-6496",2435.50572952429 +"EJ-7123",1592.12324443016 +"EJ-7125",2264.64429145244 +"G9-6333",1256.34507270041 +"G9-6342",1011.65684237616 +"G9-6351",729.189961575902 +"G9-6353",418.182717839357 +"G9-6499",1240.46483398979 +"EJ-7317",996.411513646793 +"EJ-7327",1099.76664118271 +"EJ-7328",1038.01387443857 +"DI-A1NO",569.932922918447 +"BG-A2AD",2324.35126147817 +"BG-A2AE",1306.85177818999 +"DI-A1NN",745.897258307411 +"AX-A2H5",540.941250611188 +"AX-A2H8",1220.52507261021 +"AX-A2HC",10000 +"AX-A2HD",2569.6010676214 +"BG-A0MA",1059.94714247756 +"AJ-A2QL",2654.3365996609 +"AX-A2H4",2772.98426557811 +"AX-A2H7",1211.7177705933 +"AX-A2HA",4325.784601062 +"BG-A2L7",1967.45509063437 +"DI-A2QU",1043.59663589874 +"EO-A22R",2988.65838102863 +"EO-A22S",2185.25241240561 +"EO-A22T",2926.87301244978 +"DI-A2QY",905.159507160707 +"AJ-A3NC",2444.85298450123 +"AJ-A3NE",1831.19927560226 +"AJ-A3NH",1016.86335560907 +"BG-A3EW",3158.30462285906 +"BG-A3PP",1003.98217719313 +"BK-A4ZD",1345.14564174953 +"AX-A0J0",1138.46113677957 +"AX-A0IZ",1862.31689249291 +"BK-A13C",2825.72779444158 +"AX-A1CF",913.130592450153 +"AX-A1CI",3065.63580173698 +"AX-A1CJ",950.635309377673 +"AX-A1CK",3853.68251684609 +"E6-A1M0",1181.51584388553 From 1b59633cb42f6e0cce905fe238bb7c48583c4a89 Mon Sep 17 00:00:00 2001 From: Marc Balestreri Date: Sat, 15 Nov 2025 19:34:49 -0800 Subject: [PATCH 2/4] Implement MiAge mitotic age clock - 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. --- biolearn/data/MiAge.csv | 269 ------ biolearn/data/MiAge_coefficients.csv | 269 ------ biolearn/data/MiAge_parameters.csv | 813 ++++++------------ biolearn/model.py | 219 +++++ .../data/expected_model_outputs/MiAge.csv | 6 + 5 files changed, 494 insertions(+), 1082 deletions(-) delete mode 100644 biolearn/data/MiAge.csv delete mode 100644 biolearn/data/MiAge_coefficients.csv create mode 100644 biolearn/test/data/expected_model_outputs/MiAge.csv diff --git a/biolearn/data/MiAge.csv b/biolearn/data/MiAge.csv deleted file mode 100644 index cea4762..0000000 --- a/biolearn/data/MiAge.csv +++ /dev/null @@ -1,269 +0,0 @@ -CpGmarker,CoefficientTraining -cg11823511,Age-hyper -cg12212311,Age-hyper -cg17760405,Age-hyper -cg17757602,Age-hyper -cg05937737,Age-hyper -cg01923218,Age-hyper -cg21264189,Age-hyper -cg09053680,Age-hyper -cg22802813,Age-hyper -cg21334513,Age-hyper -cg17034390,Age-hyper -cg07783282,Age-hyper -cg08445802,Age-hyper -cg02874376,Age-hyper -cg24708471,Age-hyper -cg25285090,Age-hyper -cg17265829,Age-hyper -cg27282900,Age-hyper -cg14192957,Age-hyper -cg03409187,Age-hyper -cg23189410,Age-hyper -cg17794299,Age-hyper -cg26267854,Age-hyper -cg11205072,Age-hyper -cg05372113,Age-hyper -cg17694795,Age-hyper -cg11149930,Age-hyper -cg18488157,Age-hyper -cg17078116,Age-hyper -cg00437985,Age-hyper -cg13954457,Age-hyper -cg05745631,Age-hyper -cg08701621,Age-hyper -cg06794543,Age-hyper -cg06607764,Age-hyper -cg19841369,Age-hyper -cg06454760,Age-hyper -cg15909981,Age-hyper -cg13201808,Age-hyper -cg08847173,Age-hyper -cg00370229,Age-hyper -cg04007726,Age-hyper -cg04118306,Age-hyper -cg21136104,Age-hyper -cg17812788,Age-hyper -cg18687675,Age-hyper -cg14627172,Age-hyper -cg14822490,Age-hyper -cg12188986,Age-hyper -cg05525743,Age-hyper -cg09907936,Age-hyper -cg07766263,Age-hyper -cg21730858,Age-hyper -cg12492087,Age-hyper -cg02895639,Age-hyper -cg26709285,Age-hyper -cg00689492,Age-hyper -cg15490715,Age-hyper -cg25537993,Age-hyper -cg04599403,Age-hyper -cg19761848,Age-hyper -cg22727783,Age-hyper -cg13879776,Age-hyper -cg19947104,Age-hyper -cg00303982,Age-hyper -cg04484550,Age-hyper -cg19971388,Age-hyper -cg11324957,Age-hyper -cg00298065,Age-hyper -cg04191427,Age-hyper -cg04958794,Age-hyper -cg04293085,Age-hyper -cg02049405,Age-hyper -cg17434309,Age-hyper -cg05068206,Age-hyper -cg26890189,Age-hyper -cg05206884,Age-hyper -cg14182974,Age-hyper -cg09660365,Age-hyper -cg03192598,Age-hyper -cg04017533,Age-hyper -cg25247859,Age-hyper -cg24368848,Age-hyper -cg06708634,Age-hyper -cg05080154,Age-hyper -cg12444411,Age-hyper -cg12353688,Age-hyper -cg12215340,Age-hyper -cg00465970,Age-hyper -cg21143896,Age-hyper -cg12046758,Age-hyper -cg09354556,Age-hyper -cg18430128,Age-hyper -cg08843809,Age-hyper -cg18146737,Age-hyper -cg09224821,Age-hyper -cg12250896,Age-hyper -cg14013195,Age-hyper -cg14600824,Age-hyper -cg25975712,Age-hyper -cg11962640,Age-hyper -cg12406391,Age-hyper -cg08390209,Age-hyper -cg18628732,Age-hyper -cg12017745,Age-hyper -cg12399536,Age-hyper -cg22499720,Age-hyper -cg27088072,Age-hyper -cg07105285,Age-hyper -cg19717586,Age-hyper -cg05962092,Age-hyper -cg13434842,Age-hyper -cg02578944,Age-hyper -cg08584759,Age-hyper -cg11052143,Age-hyper -cg22319311,Age-hyper -cg13405332,Age-hyper -cg04716021,Age-hyper -cg13687570,Age-hyper -cg26612727,Age-hyper -cg15691862,Age-hyper -cg26557693,Age-hyper -cg06654118,Age-hyper -cg13933080,Age-hyper -cg00032205,Age-hyper -cg22320365,Age-hyper -cg05803237,Age-hyper -cg15871441,Age-hyper -cg05212464,Age-hyper -cg13878010,Age-hyper -cg15842276,Age-hyper -cg01856529,Age-hyper -cg10018167,Age-hyper -cg01734112,Age-hyper -cg20090283,Age-hyper -cg18530645,Age-hyper -cg04863758,Age-hyper -cg10568066,Age-hyper -cg02473540,Age-hyper -cg00891541,Age-hyper -cg12978433,Age-hyper -cg14137625,Age-hyper -cg14759565,Age-hyper -cg04917181,Age-hyper -cg12633154,Age-hyper -cg15090727,Age-hyper -cg26477792,Age-hyper -cg11599981,Age-hyper -cg16339238,Age-hyper -cg27566403,Age-hyper -cg13389502,Age-hyper -cg02994956,Age-hyper -cg10687131,Age-hyper -cg08013557,Age-hyper -cg09809932,Age-hyper -cg00730887,Age-hyper -cg08244866,Age-hyper -cg10132208,Age-hyper -cg13850380,Age-hyper -cg20234976,Age-hyper -cg05716671,Age-hyper -cg23690893,Age-hyper -cg19804605,Age-hyper -cg27205904,Age-hyper -cg00099869,Age-hyper -cg23111655,Age-hyper -cg01514538,Age-hyper -cg17018096,Age-hyper -cg24931632,Age-hyper -cg18953784,Age-hyper -cg26379258,Age-hyper -cg13451127,Age-hyper -cg13333304,Age-hyper -cg13449778,Age-hyper -cg10978355,Age-hyper -cg12598635,Age-hyper -cg00445518,Age-hyper -cg20449685,Age-hyper -cg24173182,Age-hyper -cg00002033,Age-hyper -cg15066416,Age-hyper -cg10556064,Age-hyper -cg10427868,Age-hyper -cg12025310,Age-hyper -cg24541835,Age-hyper -cg04768479,Age-hyper -cg11510523,Age-hyper -cg04507915,Age-hyper -cg18455390,Age-hyper -cg03734874,Age-hyper -cg17971015,Age-hyper -cg04123310,Age-hyper -cg11312495,Age-hyper -cg19122206,Age-hyper -cg05423393,Age-hyper -cg10107050,Age-hyper -cg20544651,Age-hyper -cg10210806,Age-hyper -cg26114043,Age-hyper -cg06111140,Age-hyper -cg22330763,Age-hyper -cg15774153,Age-hyper -cg04436994,Age-hyper -cg06938705,Age-hyper -cg00750428,Age-hyper -cg26416971,Age-hyper -cg05270106,Age-hyper -cg20260127,Age-hyper -cg01005486,Age-hyper -cg15580417,Age-hyper -cg18255166,Age-hyper -cg23484755,Age-hyper -cg01114124,Age-hyper -cg06432119,Age-hyper -cg04850659,Age-hyper -cg02478023,Age-hyper -cg20322433,Age-hyper -cg11738486,Age-hyper -cg04951371,Age-hyper -cg12934382,Age-hyper -cg01722932,Age-hyper -cg23425533,Age-hyper -cg13346441,Age-hyper -cg22614891,Age-hyper -cg05485462,Age-hyper -cg09709600,Age-hyper -cg04271289,Age-hyper -cg04816394,Age-hyper -cg18653282,Age-hyper -cg08608952,Age-hyper -cg25876443,Age-hyper -cg24413339,Age-hyper -cg02455346,Age-hyper -cg13567542,Age-hyper -cg23114616,Age-hyper -cg00510437,Age-hyper -cg04723343,Age-hyper -cg00388812,Age-hyper -cg00158227,Age-hyper -cg22880770,Age-hyper -cg21697794,Age-hyper -cg15473155,Age-hyper -cg04554929,Age-hyper -cg05535398,Age-hyper -cg19341977,Age-hyper -cg02793099,Age-hyper -cg02773588,Age-hyper -cg10204755,Age-hyper -cg21557724,Age-hyper -cg17250863,Age-hyper -cg17676129,Age-hyper -cg22294267,Age-hyper -cg17029193,Age-hyper -cg08171483,Age-hyper -cg19336198,Age-hyper -cg23830290,Age-hyper -cg03984347,Age-hyper -cg12143651,Age-hyper -cg16624069,Age-hyper -cg09506661,Age-hyper -cg06085683,Age-hyper -cg07004744,Age-hyper -cg07957995,Age-hyper -cg07450698,Age-hyper -cg05395187,Age-hyper -cg14184780,Age-hyper -cg15777825,Age-hyper -cg13126279,Age-hyper diff --git a/biolearn/data/MiAge_coefficients.csv b/biolearn/data/MiAge_coefficients.csv deleted file mode 100644 index 1a932e8..0000000 --- a/biolearn/data/MiAge_coefficients.csv +++ /dev/null @@ -1,269 +0,0 @@ -"CpG_Site","Value1","Value2","Value3" -"CpG_1",0.997532178573722,0.521451605677157,-0.354770518960769 -"CpG_2",0.999515686071933,0.812465172078029,-0.63583405538151 -"CpG_3",0.999733159924055,0.435155243806152,-0.343761639293931 -"CpG_4",0.997810270123824,0.524318955013262,-0.328248646772022 -"CpG_5",0.998683802451356,0.850180749471286,-0.583592926503214 -"CpG_6",0.999872291020431,1.00000078292952,-0.958516549883466 -"CpG_7",0.999583009728787,0.810030474652367,-0.810030474752367 -"CpG_8",0.999320620365592,0.688664088097486,-0.290893926025459 -"CpG_9",0.999874644198272,1.00000079772586,-0.996323180596151 -"CpG_10",0.99852807819794,0.667323039065931,-0.359806670166855 -"CpG_11",0.998386529635878,0.757582981682659,-0.532300398808018 -"CpG_12",0.995465290409981,0.679583119123147,-0.534742235947952 -"CpG_13",0.999585014049022,0.700894079891497,-0.677385661718727 -"CpG_14",0.997932262303167,0.63873039416935,-0.427930985665093 -"CpG_15",0.999909707609692,1.00000110750822,-0.931039704222819 -"CpG_16",0.999246401164456,0.898930064763863,-0.616508626014736 -"CpG_17",0.99923849317883,0.488126565057554,-0.378185577470863 -"CpG_18",0.998323615423546,0.822527091998598,-0.172981995462801 -"CpG_19",0.999881284465112,0.999685544534162,-0.571597998795496 -"CpG_20",0.99920851432113,0.660856573637179,-0.31381492844688 -"CpG_21",0.999744402531991,0.581173323952948,-0.461017528040668 -"CpG_22",0.9980068593345,0.614903803291611,-0.48655932296868 -"CpG_23",0.999782910888747,0.87956552229003,-0.878947473905085 -"CpG_24",0.998959602780355,0.691713999935584,-0.609296939572133 -"CpG_25",0.998856474636678,0.849646816199207,-0.180589845590195 -"CpG_26",0.999603483628956,0.736707797106889,-0.703613381719689 -"CpG_27",0.999585271488541,0.822288259909194,-0.388324574636101 -"CpG_28",0.997507545052272,0.890847689158119,-0.594016374361886 -"CpG_29",0.998989599018316,0.933226488099569,-0.290830016928065 -"CpG_30",0.999517414327606,0.774175115359648,-0.333305177986928 -"CpG_31",0.999646311770848,0.780581727071466,-0.780581727171466 -"CpG_32",0.999887156727736,1.000000886181,-0.948504279785267 -"CpG_33",0.999307417908646,0.636119139155725,-0.493511053583864 -"CpG_34",0.99964034885444,0.879822842513014,-0.879822842613009 -"CpG_35",0.999359188304109,0.79918305945682,-0.799183059556762 -"CpG_36",0.999779486817801,0.763657321660192,-0.662904778974315 -"CpG_37",0.998843029384821,0.861118168604708,-0.208087157327514 -"CpG_38",0.998970319013729,0.756873536559914,-0.472778808399324 -"CpG_39",0.99952514781255,0.710524316626996,-0.696927256087063 -"CpG_40",0.999487993940197,0.509780154601705,-0.487064724959665 -"CpG_41",0.998669109874615,0.809490035784279,-0.219615595571618 -"CpG_42",0.999233759365852,0.622768761523717,-0.539195535658597 -"CpG_43",0.998929547177654,0.887284875505964,-0.202940594063679 -"CpG_44",0.98982905814148,0.389076509249917,-0.389076509349917 -"CpG_45",0.99931907231193,0.917546392193717,-0.236305827433979 -"CpG_46",0.999810208776108,1.00000052689246,-0.626133283854931 -"CpG_47",0.999265407222044,0.90420892627596,-0.304953847411123 -"CpG_48",0.995511520414267,0.63005950749519,-0.251260619378949 -"CpG_49",0.999745714408351,0.777176475045884,-0.721787755261111 -"CpG_50",0.999115160348821,0.606938845974907,-0.378732051811218 -"CpG_51",0.998914531717989,0.841684084929068,-0.218304666022593 -"CpG_52",0.998811358066761,0.64125109460881,-0.437531880603989 -"CpG_53",0.999272223469697,0.477804985835925,-0.362291189970587 -"CpG_54",0.99861673523826,0.658122252565138,-0.371927596751882 -"CpG_55",0.999260375603694,0.707916050082424,-0.537423755114291 -"CpG_56",0.999537174353081,0.6900176268663,-0.6900176269663 -"CpG_57",0.997790282362088,0.853532985150653,-0.254438496476494 -"CpG_58",0.999705938851847,0.693504139516871,-0.639384160040117 -"CpG_59",0.998773123981566,0.719554098878703,-0.652301774806425 -"CpG_60",0.999554179939086,0.625055384625531,-0.589979763179533 -"CpG_61",0.999838987651104,0.964604670472064,-0.964604670572064 -"CpG_62",0.998967715092224,0.561050500545834,-0.53050574290522 -"CpG_63",0.99768974464841,0.615490247970696,-0.450140009169886 -"CpG_64",0.9994461674992,0.670830869371302,-0.6708308694712 -"CpG_65",0.999611532368396,0.949113546157765,-0.145886744984526 -"CpG_66",0.999178997948114,0.590811962633663,-0.284287463429017 -"CpG_67",0.997264182730005,0.503593985563726,-0.343448407199314 -"CpG_68",0.999882639480988,1.0000008520697,-0.999979298106915 -"CpG_69",0.997777723836737,0.794720111330982,-0.402109899103255 -"CpG_70",0.999561017160567,0.608907198542394,-0.559527154083425 -"CpG_71",0.998404521333909,0.838736228726155,-0.783865788655781 -"CpG_72",0.99927024416739,0.727870469092498,-0.476656491591621 -"CpG_73",0.999083802999921,0.795162971381656,-0.781756246749541 -"CpG_74",0.999657345732203,0.868594887400004,-0.724188984038645 -"CpG_75",0.998389045530195,0.499255365497263,-0.270928179475897 -"CpG_76",1,0,0.605211953796541 -"CpG_77",0.999779434074883,0.652714622140782,-0.380049992720041 -"CpG_78",0.999687434254776,1.0000001145495,-0.968316658944849 -"CpG_79",0.998489400879061,0.839377672224992,-0.766459202242559 -"CpG_80",0.999392653364569,0.681262022630203,-0.59669691429557 -"CpG_81",0.998887855550527,0.816038696642188,-0.535352089794062 -"CpG_82",0.998917821273106,0.872109920679519,-0.761543010179264 -"CpG_83",0.998983669505405,0.629714542668201,-0.406448094419442 -"CpG_84",0.998873463017535,0.909094704295871,-0.130277590729169 -"CpG_85",0.999180930061241,0.61291883554261,-0.503340418303173 -"CpG_86",0.999112418582052,0.618349931967055,-0.164100967705426 -"CpG_87",0.999194421334234,0.790260381202537,-0.586372206847464 -"CpG_88",0.999785277115292,0.999886644379849,-0.9578409451194 -"CpG_89",0.998902485492996,0.463412092841756,-0.246331812635087 -"CpG_90",0.999318273290323,0.590798741178887,-0.58518404382155 -"CpG_91",0.999110459827632,0.881094733356248,-0.160185794674435 -"CpG_92",0.999749803460965,0.73993612665955,-0.611698997958702 -"CpG_93",0.998713066739435,0.670302110636983,-0.326589208526356 -"CpG_94",0.999024439320303,0.800185093740559,-0.734594143363421 -"CpG_95",0.99807597221711,0.768053054875177,-0.531714989510861 -"CpG_96",0.999594697016873,0.831671595244428,-0.179884671844445 -"CpG_97",0.999715400802377,0.979729732023346,-0.979729732044426 -"CpG_98",0.999684260624455,0.696088481231272,-0.650934505494299 -"CpG_99",0.99988894894364,0.99995941721362,-0.840581897802136 -"CpG_100",0.999804650727378,1.00000051190253,-0.999996529492223 -"CpG_101",0.999656132694679,0.733613322531231,-0.625523196674874 -"CpG_102",0.999357953268864,0.566926081240353,-0.491121515036139 -"CpG_103",0.998895341433006,0.900349629906489,-0.151435601219533 -"CpG_104",0.998758366634493,0.502387769675466,-0.43481763135023 -"CpG_105",0.992962917035692,0.820150106958359,-0.422066312882795 -"CpG_106",0.99739553592466,0.629487713489137,-0.536282631081723 -"CpG_107",0.999754149135307,1.00000008698049,-1.00000008708049 -"CpG_108",0.997818413475173,0.603073544083479,-0.518151136061801 -"CpG_109",0.999718476561302,0.690832377628143,-0.552784783682376 -"CpG_110",0.999407050248121,0.645825051336326,-0.599545136627448 -"CpG_111",0.999671320166947,0.860454452617693,-0.356922911626375 -"CpG_112",0.998918308067536,0.493307119457116,-0.363118720612359 -"CpG_113",0.998351956406022,0.719611683508905,-0.509055584546483 -"CpG_114",0.999416828355752,0.882848756847746,-0.551205960816327 -"CpG_115",0.994274822206481,0.84222839098849,-0.84222839108849 -"CpG_116",0.998836444677452,0.642384809543028,-0.481342861783507 -"CpG_117",0.999555792779487,0.534784378088809,-0.473439333529474 -"CpG_118",0.999123354551544,0.743297755652972,-0.597778599129779 -"CpG_119",0.999790241108607,0.751502252962856,-0.692675477135318 -"CpG_120",0.999779789819373,0.940489968582633,-0.893913970033529 -"CpG_121",0.999325546099773,0.68869469491034,-0.378063869570691 -"CpG_122",0.999395151550709,0.673337984176689,-0.673337984276689 -"CpG_123",0.999663610728648,0.794524261482963,-0.715356859398852 -"CpG_124",0.999548669906832,0.800027604179008,-0.531060768776939 -"CpG_125",0.997532952966513,0.589562141151164,-0.380084412257556 -"CpG_126",0.999461263969653,0.742966177087033,-0.718003572930928 -"CpG_127",0.998834445713927,0.734991827164709,-0.384852193064232 -"CpG_128",0.998254394909014,0.889325774818714,-0.640995729212635 -"CpG_129",0.998250169025203,0.418774823440546,-0.312468885719852 -"CpG_130",0.999858338924585,1.0000007059087,-0.897494465596819 -"CpG_131",0.997839993930211,0.490564449500499,-0.291908562859373 -"CpG_132",0.999729370522598,0.667827676222479,-0.644725522917693 -"CpG_133",0.999599404638493,0.894521724940832,-0.874443447880304 -"CpG_134",0.999811927471828,0.733371172714611,-0.674396547157123 -"CpG_135",0.999751369288057,0.748088854828947,-0.748088854928473 -"CpG_136",0.998996074208533,0.715922366266953,-0.458908084261017 -"CpG_137",0.998981626662935,0.660887614021238,-0.419551138349971 -"CpG_138",0.995895207748185,0.728460539599085,-0.605530224271045 -"CpG_139",0.999002497793815,0.807953535954567,-0.298505183949695 -"CpG_140",0.99887545030419,0.822269133769217,-0.731195530762814 -"CpG_141",0.999877146406593,1.00000081397526,-1.00000071287226 -"CpG_142",0.994458699314063,0.799570458002198,-0.799570458102198 -"CpG_143",0.999713969197603,0.596433894321862,-0.442600872420663 -"CpG_144",0.999835692510968,0.588770295540566,-0.56004209847672 -"CpG_145",0.999825127871056,0.949035914152907,-0.226267111931282 -"CpG_146",0.999806233641178,1.00000051608435,-1.00000050854529 -"CpG_147",0.999870907452249,1.00000050498025,-0.923932706557344 -"CpG_148",0.998166769195783,0.92914892862537,-0.326335607311436 -"CpG_149",0.99189872487546,0.684102539480704,-0.419508365310058 -"CpG_150",0.999890706134828,0.999977925246875,-0.999977925346875 -"CpG_151",0.998567147058459,0.655568686862717,-0.613259228652051 -"CpG_152",0.999882117620188,1.00000083304602,-1.00000083314602 -"CpG_153",0.998850735762481,0.446954227899635,-0.395627597105004 -"CpG_154",0.998876821659624,0.475018679693107,-0.439195511461137 -"CpG_155",0.999490662629433,0.702356335989469,-0.6120006450165 -"CpG_156",0.99971002988889,0.751217681050256,-0.667180850003609 -"CpG_157",0.999885608120364,1.00000087418606,-0.916805438923758 -"CpG_158",0.999725365925416,0.888456844857044,-0.703774643734752 -"CpG_159",0.999228831515701,0.737416934542258,-0.487344397913108 -"CpG_160",0.999761531205346,0.999987355303585,-0.959640099268045 -"CpG_161",0.999864053479267,0.786538323565742,-0.699648513963168 -"CpG_162",0.999961320285568,1.00000258531749,-0.369837231515496 -"CpG_163",0.999746668025123,0.788396789890984,-0.54751645983998 -"CpG_164",1,0,0.7525582927331 -"CpG_165",0.999861533224858,1.00000072219176,-0.993648134364735 -"CpG_166",0.999145635328246,0.618818439499665,-0.334638362422735 -"CpG_167",0.999820975421718,0.909270449484402,-0.866801870468382 -"CpG_168",0.999476920825708,0.840842821270397,-0.276569881217759 -"CpG_169",0.999438657602823,0.727314594739965,-0.501189347525773 -"CpG_170",0.999389150657338,0.599404255273955,-0.425731554761739 -"CpG_171",0.999912164762016,1.0000011384928,-1.00000113836212 -"CpG_172",0.999447757523798,0.850431757328636,-0.351808805037563 -"CpG_173",0.999572503260236,0.682269999972676,-0.682270000072676 -"CpG_174",0.999728454133263,0.546046140533544,-0.428218901448656 -"CpG_175",0.997231104199948,0.703860888876764,-0.447386344876449 -"CpG_176",0.999922027129792,1.00000062752559,-0.90631711820397 -"CpG_177",0.999730602966491,0.770170036658548,-0.296067173024484 -"CpG_178",0.999232690601245,0.689619890258763,-0.472665620120274 -"CpG_179",0.999925894544253,1.00000134942243,-1.00000134573826 -"CpG_180",0.998480766100715,0.456784193154432,-0.411720427931816 -"CpG_181",0.999861658477746,0.99999174853352,-0.99999174863352 -"CpG_182",0.996864729091638,0.437978231831864,-0.327829018760324 -"CpG_183",0.999589226335512,0.686346687602767,-0.558705458604506 -"CpG_184",0.998557290205795,0.876782813501274,-0.17941877340581 -"CpG_185",0.999261786896524,0.79056300459497,-0.755440812381395 -"CpG_186",0.999264206426299,0.63940874959904,-0.54643881073947 -"CpG_187",0.99808649002651,0.933135066514799,-0.2736559489957 -"CpG_188",0.998722928246556,0.418868100912123,-0.418868101012123 -"CpG_189",0.999833714705787,0.999995677797279,-0.952197812235388 -"CpG_190",0.999894891336424,1.00000079455841,-0.649470853766119 -"CpG_191",0.999760115664522,0.89497996486182,-0.817144797420851 -"CpG_192",0.999675171037653,0.731883530509915,-0.676733906975514 -"CpG_193",0.999696763424002,0.834261300432327,-0.802972093186761 -"CpG_194",0.999764907447063,0.99279365949623,-0.911344115050461 -"CpG_195",0.999857538269768,0.999999853723697,-0.999999853823697 -"CpG_196",0.999596566160825,0.72551454721845,-0.67744530739139 -"CpG_197",0.999639853977697,0.747654557369149,-0.569976507363827 -"CpG_198",0.999878728795404,0.999998006400914,-0.909853196404887 -"CpG_199",0.999756571030803,0.915278706466721,-0.890098322934339 -"CpG_200",0.998663679229176,0.844090069582511,-0.43108066325234 -"CpG_201",0.99937649901747,0.782122694155624,-0.782122694255624 -"CpG_202",0.999238693842319,0.739562564452079,-0.493119837033451 -"CpG_203",0.99890050577268,0.650553509643569,-0.581953772162992 -"CpG_204",0.999913166132447,1.00000114156734,-0.931139120151557 -"CpG_205",0.999668100336396,0.640405472846498,-0.532057832006615 -"CpG_206",0.999705908667013,0.746905884886405,-0.651799589383054 -"CpG_207",0.999513863335591,0.736390218922098,-0.332714696925705 -"CpG_208",0.998602899492064,0.793713744305907,-0.177376478062166 -"CpG_209",0.999947610263997,1.00000190866079,-0.891294345537998 -"CpG_210",0.999576144364952,0.745964754970318,-0.745964755070318 -"CpG_211",0.99987697605975,1.00000081284818,-0.999916301595736 -"CpG_212",0.999881050050374,0.999735689652606,-0.973167386414335 -"CpG_213",0.99827238512116,0.749702426084699,-0.67419514649112 -"CpG_214",0.999547222999604,0.687685975178807,-0.67672794469514 -"CpG_215",0.999642022901221,0.764224865932712,-0.653879127075488 -"CpG_216",0.998712187256203,0.681558506814701,-0.327757092967576 -"CpG_217",0.999493462996757,0.512034511733812,-0.417201601035989 -"CpG_218",0.999177496341026,0.57372241602976,-0.473979803316807 -"CpG_219",0.9996010647579,0.751877303572345,-0.217125554070779 -"CpG_220",0.999646392618859,0.660613688991344,-0.660613689091344 -"CpG_221",0.999882418068835,0.843945659980234,-0.681979693690691 -"CpG_222",0.99920578098876,0.891974625624471,-0.616070725368353 -"CpG_223",0.998978464329933,0.796879587703353,-0.283393674314343 -"CpG_224",0.999868854983533,1.00000076246564,-0.97741397379762 -"CpG_225",0.998953430274906,0.812442827823663,-0.812442827923663 -"CpG_226",0.998265165277086,0.813690117160875,-0.177529937417462 -"CpG_227",0.998655958482827,0.575405567768601,-0.342055664963055 -"CpG_228",0.999406029957702,0.68449280112688,-0.463823138277717 -"CpG_229",0.999688522356747,0.899899264622708,-0.332130007055887 -"CpG_230",0.999517809965694,0.693136191264836,-0.67201026056564 -"CpG_231",0.998708331674803,0.624178556226972,-0.349857976601906 -"CpG_232",0.998832895297934,0.900910623087293,-0.246623116615247 -"CpG_233",0.999815158037389,0.760841291492423,-0.696134861408586 -"CpG_234",0.999602266957581,0.48430525658806,-0.347716537379908 -"CpG_235",0.99817530209033,0.826456728078298,-0.778914594050861 -"CpG_236",0.999781637797144,0.920241576095727,-0.901582186582983 -"CpG_237",0.996584983557163,0.654799712439235,-0.43509007119781 -"CpG_238",0.998788499977253,0.850371346806074,-0.262552301788952 -"CpG_239",0.992449312562232,0.711169607014273,-0.420264738216832 -"CpG_240",0.998972754950761,0.729365955304439,-0.609654371209523 -"CpG_241",0.999304206643222,0.51778051390201,-0.378206522493659 -"CpG_242",0.999689433500231,0.402684573891035,-0.363266710044448 -"CpG_243",0.999506495818142,0.925978767188864,-0.22941752780688 -"CpG_244",0.998848010714877,0.913459475130406,-0.135846608775855 -"CpG_245",0.987360836352242,0.688167111776728,-0.364583231001355 -"CpG_246",0.999681337771959,0.889975116854377,-0.889975116954377 -"CpG_247",0.999826685533983,0.982889698512547,-0.546054096657203 -"CpG_248",0.999707451527726,0.79304708550225,-0.338577426707451 -"CpG_249",0.999836136784413,1.00000061026108,-0.994329718667405 -"CpG_250",0.999732795535468,0.736228585867759,-0.432729118705602 -"CpG_251",0.998787437999125,0.716138688276783,-0.628233621412053 -"CpG_252",0.999787242760927,0.994119345886607,-0.891993654901652 -"CpG_253",0.999606078555699,0.825562626832471,-0.825562626932471 -"CpG_254",0.999777482485176,0.738123740740258,-0.490961983889218 -"CpG_255",0.999864116081124,0.945883336879447,-0.945883336979447 -"CpG_256",0.999873991447348,0.999998104629905,-0.900945120279847 -"CpG_257",0.999887631810486,1.00000088992967,-1.00000089002967 -"CpG_258",0.999244071324475,0.731866882384178,-0.436350352059731 -"CpG_259",0.999343771976178,0.50084475274556,-0.408431658181162 -"CpG_260",0.998721195558505,0.640658955032048,-0.520877764896865 -"CpG_261",0.999770949148318,0.700357654032084,-0.407336953507809 -"CpG_262",0.999121868741723,0.76740935058263,-0.452095748893364 -"CpG_263",0.999560901119049,0.792451229677255,-0.696515456336462 -"CpG_264",0.999631031789297,0.685831333722154,-0.685831333822153 -"CpG_265",0.999620142316625,0.911246692173785,-0.792611336787476 -"CpG_266",0.999397986353765,0.594957242960695,-0.582417337613694 -"CpG_267",0.999229009571253,0.754893520027078,-0.754893520127078 -"CpG_268",0.998576382547561,0.73386524828029,-0.492266133088628 diff --git a/biolearn/data/MiAge_parameters.csv b/biolearn/data/MiAge_parameters.csv index d328aba..8c84485 100644 --- a/biolearn/data/MiAge_parameters.csv +++ b/biolearn/data/MiAge_parameters.csv @@ -1,544 +1,269 @@ -"CpG_Site","Coefficient" -"A7-A13G",68.0614114799315 -"BH-A1EN",308.281740709618 -"BH-A1EY",378.185798499771 -"BH-A1F2",168.336463284201 -"BH-A1F5",582.193693342694 -"BH-A1F6",224.28947103909 -"BH-A1F8",308.509392228244 -"BH-A1FB",338.487255500889 -"BH-A1FC",461.71661342688 -"BH-A1FD",242.952011755002 -"BH-A1FE",254.833342653134 -"BH-A1FG",199.677823486348 -"BH-A1FH",242.130115510921 -"BH-A1FJ",266.551820405996 -"BH-A1FM",236.098876122322 -"BH-A1FN",200.985893986854 -"BH-A1FR",304.467960877261 -"E2-A1IF",341.15012343228 -"E2-A1II",261.570541861561 -"E2-A1IO",272.712066787968 -"E2-A1L7",534.689050169086 -"E2-A1LB",337.059867948012 -"E9-A1N6",363.926270476615 -"E9-A1N8",185.100607854921 -"E9-A1NA",298.166342285329 -"E9-A1ND",290.550359023259 -"E9-A1N5",395.894138580941 -"E9-A1NF",129.136556071076 -"E9-A1N4",490.484961990958 -"E9-A1NE",227.19017002183 -"E9-A1NG",199.938656599124 -"E9-A1R7",202.113287611735 -"AC-A23H",276.545838232275 -"BH-A204",201.712585150456 -"BC-A10Q",821.153793435197 -"BC-A10R",859.753460322698 -"BC-A10S",956.252113474175 -"BC-A10T",810.33977018986 -"BC-A10U",862.048714623792 -"BC-A10W",1039.00945098045 -"BC-A10X",943.377462954723 -"BC-A10Y",1024.64642095433 -"BC-A10Z",782.058917508712 -"BC-A110",828.485607642323 -"BC-A112",875.384621002237 -"DD-A113",748.800390899296 -"DD-A114",1013.58195787713 -"DD-A115",938.61320056607 -"DD-A116",829.08527709224 -"DD-A118",925.273484605623 -"DD-A119",906.677251640015 -"DD-A11A",928.636081103489 -"DD-A11B",996.614608834554 -"DD-A11C",1158.03734215779 -"DD-A11D",839.713394089954 -"DD-A1EB",1161.53677819239 -"DD-A1EC",419.769456243831 -"DD-A1EE",997.089594962829 -"DD-A1EF",987.763019319215 -"DD-A1EH",671.848153673622 -"DD-A1EI",957.44945347489 -"EP-A12J",726.265330475831 -"BC-A216",987.330664578648 -"DD-A1E9",1041.70957485361 -"DD-A1ED",885.142846397883 -"DD-A1EJ",732.548654208412 -"DD-A1EL",892.647975657876 -"EP-A26S",710.767332666741 -"A6-2671",1690.54325701125 -"A6-2679",1441.89080449178 -"A6-2680",1246.7888558123 -"A6-2681",1103.65339886786 -"A6-2682",1421.24400685881 -"A6-2684",1532.10602158595 -"A6-2685",1108.29043136162 -"A6-2686",1594.04304753223 -"A6-4107",806.114158013626 -"AA-3488",1022.29239943723 -"AA-3492",1327.54242773937 -"AA-3494",1051.75715825254 -"AA-3495",1264.14295711276 -"AA-3502",1211.23822914254 -"AA-3506",940.509149162093 -"AA-3509",660.554657822167 -"AA-3510",1237.44301447431 -"A6-2675",672.809408857534 -"A6-5667",840.581881029233 -"AA-3655",944.234489248715 -"AA-3660",1090.04647755452 -"AA-3663",594.515671818271 -"AA-3697",1011.40868686182 -"AA-3712",1126.10440643582 -"AA-3713",1042.17096253298 -"G4-6295",1671.68669489933 -"G4-6297",1140.81941040191 -"G4-6298",1732.11355162495 -"G4-6302",1668.24193905095 -"G4-6311",1892.09592721585 -"G4-6314",1470.66219967221 -"G4-6320",1676.79627376023 -"G4-6322",1395.13957569667 -"AZ-6598",1435.73935344011 -"CV-5431",542.63011821281 -"CV-5436",271.915176850839 -"CV-5440",632.695661414828 -"CV-5441",1212.94009290534 -"CV-5442",440.041481887277 -"CV-5443",236.479281829963 -"CV-5444",269.219397576267 -"CV-5430",626.416275857519 -"CV-5432",764.714595993988 -"CV-5434",664.679434891808 -"CV-5435",587.061283064265 -"CV-5439",183.362160453314 -"CV-5966",319.896491654301 -"CV-5970",340.566038542934 -"CV-5971",284.033910531658 -"CV-5973",268.7145076591 -"CV-5976",364.544693373962 -"CV-5977",153.056955457288 -"CV-5978",89.6558818203347 -"CV-5979",332.26916982398 -"CV-6003",328.289821995862 -"CV-6433",318.297546298418 -"CV-6436",329.980270587177 -"CV-6441",431.32789461298 -"CV-6933",287.890943195467 -"CV-6934",427.570961291106 -"CV-6935",765.485436958633 -"CV-6936",614.703967362169 -"CV-6938",343.222230955649 -"CV-6939",170.916479776014 -"CV-6943",460.318100728473 -"CV-6951",330.572744405739 -"CV-6952",598.946792973008 -"CV-6953",1177.1511572141 -"EM-A3ST",29.0725417938817 -"FY-A3TY",48.9571539197227 -"EL-A3H1",230.768648823201 -"EL-A3H7",80.3852603932389 -"EL-A3MX",9.99999999999909 -"EL-A3MY",32.8198814765244 -"ET-A3DP",9.99999999999977 -"BJ-A3PR",631.697939062967 -"BJ-A3PU",25.1920930497259 -"EL-A3T6",212.878922214224 -"H2-A3RI",40.4363540715835 -"BJ-A28X",545.133050185429 -"EL-A3T0",94.054297152667 -"EL-A3T1",241.962449259753 -"EL-A3T2",43.262861740038 -"EL-A3T3",33.5377669968628 -"EL-A3T7",51.7536331583642 -"EL-A3T8",16.7766000950125 -"EL-A3TA",13.1135253946779 -"EL-A3TB",53.0250017561088 -"EL-A3ZG",17.0141081685015 -"EL-A3ZH",41.5428957608709 -"EL-A3ZK",207.87355683304 -"EL-A3ZL",20.070880666337 -"EL-A3ZO",59.8051539911265 -"EL-A3ZP",229.021305207537 -"DO-A1JZ",12.3208298599964 -"EM-A1CS",25.266296661008 -"EM-A1CT",24.258845760281 -"EM-A1CU",59.7821643847369 -"EM-A1CV",9.99999999999909 -"EM-A1CW",14.5177793653986 -"EM-A1YC",31.7548106668412 -"EM-A1YD",10 -"BQ-5875",226.697303427677 -"BQ-5876",190.710420400926 -"BQ-5877",241.113486371777 -"BQ-5878",238.044712426389 -"BQ-5879",69.5925304117655 -"BQ-5880",181.982489798907 -"BQ-5881",165.744870772248 -"BQ-5882",120.602663919751 -"BQ-5883",187.6883139279 -"BQ-5884",184.330377569056 -"BQ-5885",245.033169036128 -"BQ-5886",242.827182470409 -"BQ-5888",301.212513235271 -"BQ-5889",256.568276069352 -"BQ-5890",343.830744459847 -"BQ-5891",154.686850827498 -"BQ-5892",99.3588025847814 -"BQ-5893",125.468328469821 -"BQ-5894",125.034450664997 -"BQ-5887",128.661681706067 -"BQ-7044",184.008939901835 -"BQ-7045",383.41141549789 -"BQ-7046",117.39953405632 -"BQ-7048",148.447662753899 -"BQ-7049",84.1201850323484 -"BQ-7050",110.134125337561 -"BQ-7051",218.66687134251 -"BQ-7053",102.731005496774 -"BQ-7055",180.995162732334 -"BQ-7056",249.28366444818 -"BQ-7058",228.86093860053 -"BQ-7059",171.886391463133 -"BQ-7060",187.427429183427 -"BQ-7061",194.853005918624 -"CH-5761",262.627308250461 -"CH-5762",281.482091986312 -"CH-5763",400.856709321921 -"CH-5764",258.800389212999 -"CH-5765",347.733744014878 -"CH-5766",195.782181129127 -"CH-5768",344.555805037466 -"CH-5769",883.028076406184 -"CH-5771",306.332327161174 -"CH-5772",233.385796661222 -"CH-5767",309.135974353719 -"G9-6332",143.753440739483 -"G9-6348",379.585050055063 -"G9-6356",251.197561852484 -"G9-6362",1505.97921735955 -"G9-6363",851.754340424855 -"G9-6364",536.127607364568 -"G9-6365",235.830522268488 -"G9-6367",279.313465626338 -"G9-6373",345.269680179472 -"G9-6384",239.598544954488 -"G9-6385",444.271867896868 -"G9-6494",309.262555671458 -"G9-6496",305.299368842581 -"EJ-7123",196.395324451535 -"EJ-7125",348.474071114831 -"G9-6333",232.229415130775 -"G9-6342",423.328282634209 -"G9-6351",414.882568771439 -"G9-6353",353.395477396887 -"G9-6499",1455.18059223208 -"EJ-7317",347.083652242007 -"EJ-7327",519.270887105837 -"EJ-7328",344.703807685403 -"DI-A1NO",123.177561471021 -"BG-A2AD",138.871380776394 -"BG-A2AE",92.1460442887851 -"DI-A1NN",118.99018091857 -"AX-A2H5",120.431175125173 -"AX-A2H8",81.3801711530616 -"AX-A2HC",145.239737864723 -"AX-A2HD",204.648608141226 -"BG-A0MA",159.665447387283 -"AJ-A2QL",246.490903978341 -"AX-A2H4",65.7984172936739 -"AX-A2H7",144.459941279573 -"AX-A2HA",224.845841958119 -"BG-A2L7",231.430000289608 -"DI-A2QU",190.294577716737 -"EO-A22R",28.7103425891827 -"EO-A22S",9.99999999999977 -"EO-A22T",42.8371663435553 -"DI-A2QY",342.538015805177 -"AJ-A3NC",125.668505855235 -"AJ-A3NE",315.554782877723 -"AJ-A3NH",323.561231250808 -"BG-A3EW",135.486026198493 -"BG-A3PP",10 -"BK-A4ZD",96.6273908621214 -"AX-A05Y",155.934215144406 -"AX-A0J0",261.620607311798 -"AX-A0IZ",129.459548307928 -"BK-A13C",117.928748652936 -"AX-A1CF",158.010580267772 -"AX-A1CI",93.374166416664 -"AX-A1CJ",1062.12902684847 -"AX-A1CK",208.999294937374 -"E6-A1M0",10 -"A7-A13G",779.193969133718 -"BH-A1EN",6957.11201989192 -"BH-A1EY",2064.71557725099 -"BH-A1F2",2900.76189401939 -"BH-A1F5",1395.85356997536 -"BH-A1F6",2154.41325814241 -"BH-A1F8",2946.14884816893 -"BH-A1FB",903.126302816418 -"BH-A1FC",3294.55769576478 -"BH-A1FD",4375.97071711803 -"BH-A1FE",1546.93743755263 -"BH-A1FG",1310.31405080783 -"BH-A1FH",517.022610690895 -"BH-A1FJ",4002.20099155709 -"BH-A1FM",1991.65532640487 -"BH-A1FN",932.577130128027 -"BH-A1FR",806.429939885327 -"E2-A1IF",668.785486260604 -"E2-A1II",1542.8468729158 -"E2-A1IO",1270.08052723399 -"E2-A1L7",4089.20878774331 -"E2-A1LB",1498.92327670151 -"E9-A1N6",1407.80246736573 -"E9-A1N8",1133.50238014371 -"E9-A1NA",5349.82234039133 -"E9-A1ND",1705.5008142604 -"E9-A1N5",1652.06976131951 -"E9-A1NF",2223.9793379483 -"E9-A1N4",978.281913991854 -"E9-A1NE",1003.40791644284 -"E9-A1NG",667.75073517875 -"E9-A1R7",2754.37430789184 -"AC-A23H",6418.45880290355 -"BH-A204",5595.19206531704 -"BC-A10Q",4097.84629871292 -"BC-A10R",1719.95529436681 -"BC-A10S",3522.66931969804 -"BC-A10T",3550.17896253725 -"BC-A10U",2163.86994890755 -"BC-A10W",1873.88725735506 -"BC-A10X",851.411259567549 -"BC-A10Y",3442.95787377624 -"BC-A10Z",1834.49562205045 -"BC-A110",996.764197834096 -"BC-A112",5920.24763736596 -"DD-A113",3325.58166099135 -"DD-A114",1715.3340750945 -"DD-A115",2237.72646092979 -"DD-A116",1471.12361946715 -"DD-A118",2805.89919458751 -"DD-A119",1524.59139085152 -"DD-A11A",8753.35931306103 -"DD-A11B",5132.63176553228 -"DD-A11C",6135.97794768422 -"DD-A11D",3568.21093487738 -"DD-A1EB",3576.77972899025 -"DD-A1EC",2239.78279358276 -"DD-A1EE",8798.36125918419 -"DD-A1EF",3080.51704628344 -"DD-A1EH",2899.57286267985 -"DD-A1EI",2116.51119029659 -"EP-A12J",5084.95674158279 -"BC-A216",3965.14407989531 -"DD-A1E9",2573.44287423024 -"DD-A1ED",791.08454594743 -"DD-A1EJ",2811.3259189344 -"DD-A1EL",1561.12641984439 -"EP-A26S",4851.10328087396 -"A6-2671",3558.73135073638 -"A6-2679",4638.48704763123 -"A6-2680",4027.4412711563 -"A6-2681",3150.75974774384 -"A6-2682",2262.07577004937 -"A6-2684",3013.1549016899 -"A6-2685",1270.71546279041 -"A6-2686",6408.90917801184 -"A6-4107",6896.20828192573 -"AA-3488",3540.34723358472 -"AA-3492",8894.54315644863 -"AA-3494",2242.99255240811 -"AA-3495",3690.87257407407 -"AA-3502",6726.48195529611 -"AA-3506",4119.51017818728 -"AA-3509",3086.20294350602 -"AA-3510",3295.49636708761 -"A6-2675",2096.36104556782 -"A6-5667",2538.15537046461 -"AA-3655",3466.48318134525 -"AA-3660",3895.59230614115 -"AA-3663",6290.83250007223 -"AA-3697",3150.11134705022 -"AA-3712",2881.27504492257 -"AA-3713",4420.41413693901 -"G4-6295",2507.24066564799 -"G4-6297",3067.69301534306 -"G4-6298",3053.73799163681 -"G4-6302",1149.38844100752 -"G4-6311",2674.28666649635 -"G4-6314",2620.29638802328 -"G4-6320",8478.00374532418 -"G4-6322",8291.8737191818 -"AZ-6598",10000 -"CV-5431",2175.36749985927 -"CV-5436",2603.72414559185 -"CV-5440",1598.32301778767 -"CV-5441",2299.1683252163 -"CV-5442",3637.02315012826 -"CV-5443",2978.23517409613 -"CV-5444",1920.21319681461 -"CV-5430",2541.43233590197 -"CV-5432",2020.50155762572 -"CV-5434",2704.87300676293 -"CV-5435",4694.17426923695 -"CV-5439",2286.4874861929 -"CV-5966",2975.2750828714 -"CV-5970",2537.65480570571 -"CV-5971",1270.45387515151 -"CV-5973",5404.83735563851 -"CV-5976",3401.34936433163 -"CV-5977",6198.0103944493 -"CV-5978",1411.40965511189 -"CV-5979",3831.47581513836 -"CV-6003",3651.36857078561 -"CV-6433",2945.47980782084 -"CV-6436",3050.87198839268 -"CV-6441",4939.99405676242 -"CV-6933",1712.89350685218 -"CV-6934",2668.23746486386 -"CV-6935",2603.24346354472 -"CV-6936",4423.32206649666 -"CV-6938",2901.44932676564 -"CV-6939",1877.32008722176 -"CV-6943",2024.08906140291 -"CV-6951",2576.40743290332 -"CV-6952",4180.15913703449 -"CV-6953",4539.21283489577 -"EM-A3ST",230.446568394581 -"FY-A3TY",236.898182393372 -"EL-A3H1",269.015324407921 -"EL-A3H7",348.616485779105 -"EL-A3MX",560.765081349729 -"EL-A3MY",510.072391075944 -"ET-A3DP",92.1265224236781 -"BJ-A3PR",1127.93096116119 -"BJ-A3PU",256.596774363773 -"EL-A3T6",469.339032182282 -"H2-A3RI",222.327794914492 -"BJ-A28X",452.683976314557 -"EL-A3T0",162.930293301488 -"EL-A3T1",262.608823236384 -"EL-A3T2",151.75913579628 -"EL-A3T3",296.52538431365 -"EL-A3T7",160.294661967913 -"EL-A3T8",105.531419902119 -"EL-A3TA",180.849325231684 -"EL-A3TB",146.972715572972 -"EL-A3ZG",89.5109846383518 -"EL-A3ZH",110.144467497076 -"EL-A3ZK",330.364697333688 -"EL-A3ZL",94.9960612980278 -"EL-A3ZO",802.402313561486 -"EL-A3ZP",157.635588120374 -"DO-A1JZ",113.001657291253 -"EM-A1CS",105.0060894042 -"EM-A1CT",223.327072489967 -"EM-A1CU",235.498472236105 -"EM-A1CV",88.0522640225735 -"EM-A1CW",283.544779769829 -"EM-A1YC",27.1704486798667 -"EM-A1YD",63.1419947306062 -"BQ-5875",1055.12094956018 -"BQ-5876",1009.63107807922 -"BQ-5877",1633.62305769325 -"BQ-5878",1000.79312771018 -"BQ-5879",6508.71237812896 -"BQ-5880",1081.35454042838 -"BQ-5881",669.399871598889 -"BQ-5882",1357.65516536367 -"BQ-5883",365.765517650097 -"BQ-5884",855.626792242381 -"BQ-5885",845.659136498848 -"BQ-5886",857.423627267469 -"BQ-5888",798.096431789509 -"BQ-5889",677.163084910017 -"BQ-5890",2741.60029580517 -"BQ-5891",1319.64169506395 -"BQ-5892",792.927440807277 -"BQ-5893",8358.7745388625 -"BQ-5894",2147.37859875939 -"BQ-5887",1096.83416331002 -"BQ-7044",1451.62799736101 -"BQ-7045",631.677179162528 -"BQ-7046",817.918646471453 -"BQ-7048",1146.10683773355 -"BQ-7049",776.678800892933 -"BQ-7050",582.024440315225 -"BQ-7051",1094.39724497891 -"BQ-7053",689.713659193329 -"BQ-7055",148.501419818912 -"BQ-7056",881.743670670135 -"BQ-7058",1092.44852552566 -"BQ-7059",744.119704029868 -"BQ-7060",678.062426567631 -"BQ-7061",1526.15287174199 -"CH-5761",1334.6177114037 -"CH-5762",858.092345342572 -"CH-5763",414.508929848521 -"CH-5764",1173.08082417925 -"CH-5765",1497.0437055 -"CH-5766",718.543734833493 -"CH-5768",1451.57727350689 -"CH-5769",959.500640775594 -"CH-5771",615.333953182798 -"CH-5772",2291.96343349804 -"CH-5767",1317.82534434742 -"G9-6332",1257.42280470536 -"G9-6348",1001.02419920868 -"G9-6356",853.522864702555 -"G9-6362",1559.40349903829 -"G9-6363",1179.64489814448 -"G9-6364",822.17645341329 -"G9-6365",907.993140776461 -"G9-6367",268.392251639751 -"G9-6373",982.007116204762 -"G9-6384",848.625215742082 -"G9-6385",634.35431403125 -"G9-6494",1642.31767386616 -"G9-6496",2435.50572952429 -"EJ-7123",1592.12324443016 -"EJ-7125",2264.64429145244 -"G9-6333",1256.34507270041 -"G9-6342",1011.65684237616 -"G9-6351",729.189961575902 -"G9-6353",418.182717839357 -"G9-6499",1240.46483398979 -"EJ-7317",996.411513646793 -"EJ-7327",1099.76664118271 -"EJ-7328",1038.01387443857 -"DI-A1NO",569.932922918447 -"BG-A2AD",2324.35126147817 -"BG-A2AE",1306.85177818999 -"DI-A1NN",745.897258307411 -"AX-A2H5",540.941250611188 -"AX-A2H8",1220.52507261021 -"AX-A2HC",10000 -"AX-A2HD",2569.6010676214 -"BG-A0MA",1059.94714247756 -"AJ-A2QL",2654.3365996609 -"AX-A2H4",2772.98426557811 -"AX-A2H7",1211.7177705933 -"AX-A2HA",4325.784601062 -"BG-A2L7",1967.45509063437 -"DI-A2QU",1043.59663589874 -"EO-A22R",2988.65838102863 -"EO-A22S",2185.25241240561 -"EO-A22T",2926.87301244978 -"DI-A2QY",905.159507160707 -"AJ-A3NC",2444.85298450123 -"AJ-A3NE",1831.19927560226 -"AJ-A3NH",1016.86335560907 -"BG-A3EW",3158.30462285906 -"BG-A3PP",1003.98217719313 -"BK-A4ZD",1345.14564174953 -"AX-A0J0",1138.46113677957 -"AX-A0IZ",1862.31689249291 -"BK-A13C",2825.72779444158 -"AX-A1CF",913.130592450153 -"AX-A1CI",3065.63580173698 -"AX-A1CJ",950.635309377673 -"AX-A1CK",3853.68251684609 -"E6-A1M0",1181.51584388553 +CpG,b,c,d +cg11823511,0.997532178573722,0.521451605677157,-0.354770518960769 +cg12212311,0.999515686071933,0.812465172078029,-0.63583405538151 +cg17760405,0.999733159924055,0.435155243806152,-0.343761639293931 +cg17757602,0.997810270123824,0.524318955013262,-0.328248646772022 +cg05937737,0.998683802451356,0.850180749471286,-0.583592926503214 +cg01923218,0.999872291020431,1.00000078292952,-0.958516549883466 +cg21264189,0.999583009728787,0.810030474652367,-0.810030474752367 +cg09053680,0.999320620365592,0.688664088097486,-0.290893926025459 +cg22802813,0.999874644198272,1.00000079772586,-0.996323180596151 +cg21334513,0.99852807819794,0.667323039065931,-0.359806670166855 +cg17034390,0.998386529635878,0.757582981682659,-0.532300398808018 +cg07783282,0.995465290409981,0.679583119123147,-0.534742235947952 +cg08445802,0.999585014049022,0.700894079891497,-0.677385661718727 +cg02874376,0.997932262303167,0.63873039416935,-0.427930985665093 +cg24708471,0.999909707609692,1.00000110750822,-0.931039704222819 +cg25285090,0.999246401164456,0.898930064763863,-0.616508626014736 +cg17265829,0.99923849317883,0.488126565057554,-0.378185577470863 +cg27282900,0.998323615423546,0.822527091998598,-0.172981995462801 +cg14192957,0.999881284465112,0.999685544534162,-0.571597998795496 +cg03409187,0.99920851432113,0.660856573637179,-0.31381492844688 +cg23189410,0.999744402531991,0.581173323952948,-0.461017528040668 +cg17794299,0.9980068593345,0.614903803291611,-0.48655932296868 +cg26267854,0.999782910888747,0.87956552229003,-0.878947473905085 +cg11205072,0.998959602780355,0.691713999935584,-0.609296939572133 +cg05372113,0.998856474636678,0.849646816199207,-0.180589845590195 +cg17694795,0.999603483628956,0.736707797106889,-0.703613381719689 +cg11149930,0.999585271488541,0.822288259909194,-0.388324574636101 +cg18488157,0.997507545052272,0.890847689158119,-0.594016374361886 +cg17078116,0.998989599018316,0.933226488099569,-0.290830016928065 +cg00437985,0.999517414327606,0.774175115359648,-0.333305177986928 +cg13954457,0.999646311770848,0.780581727071466,-0.780581727171466 +cg05745631,0.999887156727736,1.000000886181,-0.948504279785267 +cg08701621,0.999307417908646,0.636119139155725,-0.493511053583864 +cg06794543,0.99964034885444,0.879822842513014,-0.879822842613009 +cg06607764,0.999359188304109,0.79918305945682,-0.799183059556762 +cg19841369,0.999779486817801,0.763657321660192,-0.662904778974315 +cg06454760,0.998843029384821,0.861118168604708,-0.208087157327514 +cg15909981,0.998970319013729,0.756873536559914,-0.472778808399324 +cg13201808,0.99952514781255,0.710524316626996,-0.696927256087063 +cg08847173,0.999487993940197,0.509780154601705,-0.487064724959665 +cg00370229,0.998669109874615,0.809490035784279,-0.219615595571618 +cg04007726,0.999233759365852,0.622768761523717,-0.539195535658597 +cg04118306,0.998929547177654,0.887284875505964,-0.202940594063679 +cg21136104,0.98982905814148,0.389076509249917,-0.389076509349917 +cg17812788,0.99931907231193,0.917546392193717,-0.236305827433979 +cg18687675,0.999810208776108,1.00000052689246,-0.626133283854931 +cg14627172,0.999265407222044,0.90420892627596,-0.304953847411123 +cg14822490,0.995511520414267,0.63005950749519,-0.251260619378949 +cg12188986,0.999745714408351,0.777176475045884,-0.721787755261111 +cg05525743,0.999115160348821,0.606938845974907,-0.378732051811218 +cg09907936,0.998914531717989,0.841684084929068,-0.218304666022593 +cg07766263,0.998811358066761,0.64125109460881,-0.437531880603989 +cg21730858,0.999272223469697,0.477804985835925,-0.362291189970587 +cg12492087,0.99861673523826,0.658122252565138,-0.371927596751882 +cg02895639,0.999260375603694,0.707916050082424,-0.537423755114291 +cg26709285,0.999537174353081,0.6900176268663,-0.6900176269663 +cg00689492,0.997790282362088,0.853532985150653,-0.254438496476494 +cg15490715,0.999705938851847,0.693504139516871,-0.639384160040117 +cg25537993,0.998773123981566,0.719554098878703,-0.652301774806425 +cg04599403,0.999554179939086,0.625055384625531,-0.589979763179533 +cg19761848,0.999838987651104,0.964604670472064,-0.964604670572064 +cg22727783,0.998967715092224,0.561050500545834,-0.53050574290522 +cg13879776,0.99768974464841,0.615490247970696,-0.450140009169886 +cg19947104,0.9994461674992,0.670830869371302,-0.6708308694712 +cg00303982,0.999611532368396,0.949113546157765,-0.145886744984526 +cg04484550,0.999178997948114,0.590811962633663,-0.284287463429017 +cg19971388,0.997264182730005,0.503593985563726,-0.343448407199314 +cg11324957,0.999882639480988,1.0000008520697,-0.999979298106915 +cg00298065,0.997777723836737,0.794720111330982,-0.402109899103255 +cg04191427,0.999561017160567,0.608907198542394,-0.559527154083425 +cg04958794,0.998404521333909,0.838736228726155,-0.783865788655781 +cg04293085,0.99927024416739,0.727870469092498,-0.476656491591621 +cg02049405,0.999083802999921,0.795162971381656,-0.781756246749541 +cg17434309,0.999657345732203,0.868594887400004,-0.724188984038645 +cg05068206,0.998389045530195,0.499255365497263,-0.270928179475897 +cg26890189,1.0,0.0,0.605211953796541 +cg05206884,0.999779434074883,0.652714622140782,-0.380049992720041 +cg14182974,0.999687434254776,1.0000001145495,-0.968316658944849 +cg09660365,0.998489400879061,0.839377672224992,-0.766459202242559 +cg03192598,0.999392653364569,0.681262022630203,-0.59669691429557 +cg04017533,0.998887855550527,0.816038696642188,-0.535352089794062 +cg25247859,0.998917821273106,0.872109920679519,-0.761543010179264 +cg24368848,0.998983669505405,0.629714542668201,-0.406448094419442 +cg06708634,0.998873463017535,0.909094704295871,-0.130277590729169 +cg05080154,0.999180930061241,0.61291883554261,-0.503340418303173 +cg12444411,0.999112418582052,0.618349931967055,-0.164100967705426 +cg12353688,0.999194421334234,0.790260381202537,-0.586372206847464 +cg12215340,0.999785277115292,0.999886644379849,-0.9578409451194 +cg00465970,0.998902485492996,0.463412092841756,-0.246331812635087 +cg21143896,0.999318273290323,0.590798741178887,-0.58518404382155 +cg12046758,0.999110459827632,0.881094733356248,-0.160185794674435 +cg09354556,0.999749803460965,0.73993612665955,-0.611698997958702 +cg18430128,0.998713066739435,0.670302110636983,-0.326589208526356 +cg08843809,0.999024439320303,0.800185093740559,-0.734594143363421 +cg18146737,0.99807597221711,0.768053054875177,-0.531714989510861 +cg09224821,0.999594697016873,0.831671595244428,-0.179884671844445 +cg12250896,0.999715400802377,0.979729732023346,-0.979729732044426 +cg14013195,0.999684260624455,0.696088481231272,-0.650934505494299 +cg14600824,0.99988894894364,0.99995941721362,-0.840581897802136 +cg25975712,0.999804650727378,1.00000051190253,-0.999996529492223 +cg11962640,0.999656132694679,0.733613322531231,-0.625523196674874 +cg12406391,0.999357953268864,0.566926081240353,-0.491121515036139 +cg08390209,0.998895341433006,0.900349629906489,-0.151435601219533 +cg18628732,0.998758366634493,0.502387769675466,-0.43481763135023 +cg12017745,0.992962917035692,0.820150106958359,-0.422066312882795 +cg12399536,0.99739553592466,0.629487713489137,-0.536282631081723 +cg22499720,0.999754149135307,1.00000008698049,-1.00000008708049 +cg27088072,0.997818413475173,0.603073544083479,-0.518151136061801 +cg07105285,0.999718476561302,0.690832377628143,-0.552784783682376 +cg19717586,0.999407050248121,0.645825051336326,-0.599545136627448 +cg05962092,0.999671320166947,0.860454452617693,-0.356922911626375 +cg13434842,0.998918308067536,0.493307119457116,-0.363118720612359 +cg02578944,0.998351956406022,0.719611683508905,-0.509055584546483 +cg08584759,0.999416828355752,0.882848756847746,-0.551205960816327 +cg11052143,0.994274822206481,0.84222839098849,-0.84222839108849 +cg22319311,0.998836444677452,0.642384809543028,-0.481342861783507 +cg13405332,0.999555792779487,0.534784378088809,-0.473439333529474 +cg04716021,0.999123354551544,0.743297755652972,-0.597778599129779 +cg13687570,0.999790241108607,0.751502252962856,-0.692675477135318 +cg26612727,0.999779789819373,0.940489968582633,-0.893913970033529 +cg15691862,0.999325546099773,0.68869469491034,-0.378063869570691 +cg26557693,0.999395151550709,0.673337984176689,-0.673337984276689 +cg06654118,0.999663610728648,0.794524261482963,-0.715356859398852 +cg13933080,0.999548669906832,0.800027604179008,-0.531060768776939 +cg00032205,0.997532952966513,0.589562141151164,-0.380084412257556 +cg22320365,0.999461263969653,0.742966177087033,-0.718003572930928 +cg05803237,0.998834445713927,0.734991827164709,-0.384852193064232 +cg15871441,0.998254394909014,0.889325774818714,-0.640995729212635 +cg05212464,0.998250169025203,0.418774823440546,-0.312468885719852 +cg13878010,0.999858338924585,1.0000007059087,-0.897494465596819 +cg15842276,0.997839993930211,0.490564449500499,-0.291908562859373 +cg01856529,0.999729370522598,0.667827676222479,-0.644725522917693 +cg10018167,0.999599404638493,0.894521724940832,-0.874443447880304 +cg01734112,0.999811927471828,0.733371172714611,-0.674396547157123 +cg20090283,0.999751369288057,0.748088854828947,-0.748088854928473 +cg18530645,0.998996074208533,0.715922366266953,-0.458908084261017 +cg04863758,0.998981626662935,0.660887614021238,-0.419551138349971 +cg10568066,0.995895207748185,0.728460539599085,-0.605530224271045 +cg02473540,0.999002497793815,0.807953535954567,-0.298505183949695 +cg00891541,0.99887545030419,0.822269133769217,-0.731195530762814 +cg12978433,0.999877146406593,1.00000081397526,-1.00000071287226 +cg14137625,0.994458699314063,0.799570458002198,-0.799570458102198 +cg14759565,0.999713969197603,0.596433894321862,-0.442600872420663 +cg04917181,0.999835692510968,0.588770295540566,-0.56004209847672 +cg12633154,0.999825127871056,0.949035914152907,-0.226267111931282 +cg15090727,0.999806233641178,1.00000051608435,-1.00000050854529 +cg26477792,0.999870907452249,1.00000050498025,-0.923932706557344 +cg11599981,0.998166769195783,0.92914892862537,-0.326335607311436 +cg16339238,0.99189872487546,0.684102539480704,-0.419508365310058 +cg27566403,0.999890706134828,0.999977925246875,-0.999977925346875 +cg13389502,0.998567147058459,0.655568686862717,-0.613259228652051 +cg02994956,0.999882117620188,1.00000083304602,-1.00000083314602 +cg10687131,0.998850735762481,0.446954227899635,-0.395627597105004 +cg08013557,0.998876821659624,0.475018679693107,-0.439195511461137 +cg09809932,0.999490662629433,0.702356335989469,-0.6120006450165 +cg00730887,0.99971002988889,0.751217681050256,-0.667180850003609 +cg08244866,0.999885608120364,1.00000087418606,-0.916805438923758 +cg10132208,0.999725365925416,0.888456844857044,-0.703774643734752 +cg13850380,0.999228831515701,0.737416934542258,-0.487344397913108 +cg20234976,0.999761531205346,0.999987355303585,-0.959640099268045 +cg05716671,0.999864053479267,0.786538323565742,-0.699648513963168 +cg23690893,0.999961320285568,1.00000258531749,-0.369837231515496 +cg19804605,0.999746668025123,0.788396789890984,-0.54751645983998 +cg27205904,1.0,0.0,0.7525582927331 +cg00099869,0.999861533224858,1.00000072219176,-0.993648134364735 +cg23111655,0.999145635328246,0.618818439499665,-0.334638362422735 +cg01514538,0.999820975421718,0.909270449484402,-0.866801870468382 +cg17018096,0.999476920825708,0.840842821270397,-0.276569881217759 +cg24931632,0.999438657602823,0.727314594739965,-0.501189347525773 +cg18953784,0.999389150657338,0.599404255273955,-0.425731554761739 +cg26379258,0.999912164762016,1.0000011384928,-1.00000113836212 +cg13451127,0.999447757523798,0.850431757328636,-0.351808805037563 +cg13333304,0.999572503260236,0.682269999972676,-0.682270000072676 +cg13449778,0.999728454133263,0.546046140533544,-0.428218901448656 +cg10978355,0.997231104199948,0.703860888876764,-0.447386344876449 +cg12598635,0.999922027129792,1.00000062752559,-0.90631711820397 +cg00445518,0.999730602966491,0.770170036658548,-0.296067173024484 +cg20449685,0.999232690601245,0.689619890258763,-0.472665620120274 +cg24173182,0.999925894544253,1.00000134942243,-1.00000134573826 +cg00002033,0.998480766100715,0.456784193154432,-0.411720427931816 +cg15066416,0.999861658477746,0.99999174853352,-0.99999174863352 +cg10556064,0.996864729091638,0.437978231831864,-0.327829018760324 +cg10427868,0.999589226335512,0.686346687602767,-0.558705458604506 +cg12025310,0.998557290205795,0.876782813501274,-0.17941877340581 +cg24541835,0.999261786896524,0.79056300459497,-0.755440812381395 +cg04768479,0.999264206426299,0.63940874959904,-0.54643881073947 +cg11510523,0.99808649002651,0.933135066514799,-0.2736559489957 +cg04507915,0.998722928246556,0.418868100912123,-0.418868101012123 +cg18455390,0.999833714705787,0.999995677797279,-0.952197812235388 +cg03734874,0.999894891336424,1.00000079455841,-0.649470853766119 +cg17971015,0.999760115664522,0.89497996486182,-0.817144797420851 +cg04123310,0.999675171037653,0.731883530509915,-0.676733906975514 +cg11312495,0.999696763424002,0.834261300432327,-0.802972093186761 +cg19122206,0.999764907447063,0.99279365949623,-0.911344115050461 +cg05423393,0.999857538269768,0.999999853723697,-0.999999853823697 +cg10107050,0.999596566160825,0.72551454721845,-0.67744530739139 +cg20544651,0.999639853977697,0.747654557369149,-0.569976507363827 +cg10210806,0.999878728795404,0.999998006400914,-0.909853196404887 +cg26114043,0.999756571030803,0.915278706466721,-0.890098322934339 +cg06111140,0.998663679229176,0.844090069582511,-0.43108066325234 +cg22330763,0.99937649901747,0.782122694155624,-0.782122694255624 +cg15774153,0.999238693842319,0.739562564452079,-0.493119837033451 +cg04436994,0.99890050577268,0.650553509643569,-0.581953772162992 +cg06938705,0.999913166132447,1.00000114156734,-0.931139120151557 +cg00750428,0.999668100336396,0.640405472846498,-0.532057832006615 +cg26416971,0.999705908667013,0.746905884886405,-0.651799589383054 +cg05270106,0.999513863335591,0.736390218922098,-0.332714696925705 +cg20260127,0.998602899492064,0.793713744305907,-0.177376478062166 +cg01005486,0.999947610263997,1.00000190866079,-0.891294345537998 +cg15580417,0.999576144364952,0.745964754970318,-0.745964755070318 +cg18255166,0.99987697605975,1.00000081284818,-0.999916301595736 +cg23484755,0.999881050050374,0.999735689652606,-0.973167386414335 +cg01114124,0.99827238512116,0.749702426084699,-0.67419514649112 +cg06432119,0.999547222999604,0.687685975178807,-0.67672794469514 +cg04850659,0.999642022901221,0.764224865932712,-0.653879127075488 +cg02478023,0.998712187256203,0.681558506814701,-0.327757092967576 +cg20322433,0.999493462996757,0.512034511733812,-0.417201601035989 +cg11738486,0.999177496341026,0.57372241602976,-0.473979803316807 +cg04951371,0.9996010647579,0.751877303572345,-0.217125554070779 +cg12934382,0.999646392618859,0.660613688991344,-0.660613689091344 +cg01722932,0.999882418068835,0.843945659980234,-0.681979693690691 +cg23425533,0.99920578098876,0.891974625624471,-0.616070725368353 +cg13346441,0.998978464329933,0.796879587703353,-0.283393674314343 +cg22614891,0.999868854983533,1.00000076246564,-0.97741397379762 +cg05485462,0.998953430274906,0.812442827823663,-0.812442827923663 +cg09709600,0.998265165277086,0.813690117160875,-0.177529937417462 +cg04271289,0.998655958482827,0.575405567768601,-0.342055664963055 +cg04816394,0.999406029957702,0.68449280112688,-0.463823138277717 +cg18653282,0.999688522356747,0.899899264622708,-0.332130007055887 +cg08608952,0.999517809965694,0.693136191264836,-0.67201026056564 +cg25876443,0.998708331674803,0.624178556226972,-0.349857976601906 +cg24413339,0.998832895297934,0.900910623087293,-0.246623116615247 +cg02455346,0.999815158037389,0.760841291492423,-0.696134861408586 +cg13567542,0.999602266957581,0.48430525658806,-0.347716537379908 +cg23114616,0.99817530209033,0.826456728078298,-0.778914594050861 +cg00510437,0.999781637797144,0.920241576095727,-0.901582186582983 +cg04723343,0.996584983557163,0.654799712439235,-0.43509007119781 +cg00388812,0.998788499977253,0.850371346806074,-0.262552301788952 +cg00158227,0.992449312562232,0.711169607014273,-0.420264738216832 +cg22880770,0.998972754950761,0.729365955304439,-0.609654371209523 +cg21697794,0.999304206643222,0.51778051390201,-0.378206522493659 +cg15473155,0.999689433500231,0.402684573891035,-0.363266710044448 +cg04554929,0.999506495818142,0.925978767188864,-0.22941752780688 +cg05535398,0.998848010714877,0.913459475130406,-0.135846608775855 +cg19341977,0.987360836352242,0.688167111776728,-0.364583231001355 +cg02793099,0.999681337771959,0.889975116854377,-0.889975116954377 +cg02773588,0.999826685533983,0.982889698512547,-0.546054096657203 +cg10204755,0.999707451527726,0.79304708550225,-0.338577426707451 +cg21557724,0.999836136784413,1.00000061026108,-0.994329718667405 +cg17250863,0.999732795535468,0.736228585867759,-0.432729118705602 +cg17676129,0.998787437999125,0.716138688276783,-0.628233621412053 +cg22294267,0.999787242760927,0.994119345886607,-0.891993654901652 +cg17029193,0.999606078555699,0.825562626832471,-0.825562626932471 +cg08171483,0.999777482485176,0.738123740740258,-0.490961983889218 +cg19336198,0.999864116081124,0.945883336879447,-0.945883336979447 +cg23830290,0.999873991447348,0.999998104629905,-0.900945120279847 +cg03984347,0.999887631810486,1.00000088992967,-1.00000089002967 +cg12143651,0.999244071324475,0.731866882384178,-0.436350352059731 +cg16624069,0.999343771976178,0.50084475274556,-0.408431658181162 +cg09506661,0.998721195558505,0.640658955032048,-0.520877764896865 +cg06085683,0.999770949148318,0.700357654032084,-0.407336953507809 +cg07004744,0.999121868741723,0.76740935058263,-0.452095748893364 +cg07957995,0.999560901119049,0.792451229677255,-0.696515456336462 +cg07450698,0.999631031789297,0.685831333722154,-0.685831333822153 +cg05395187,0.999620142316625,0.911246692173785,-0.792611336787476 +cg14184780,0.999397986353765,0.594957242960695,-0.582417337613694 +cg15777825,0.999229009571253,0.754893520027078,-0.754893520127078 +cg13126279,0.998576382547561,0.73386524828029,-0.492266133088628 diff --git a/biolearn/model.py b/biolearn/model.py index 4109ebf..674e0da 100644 --- a/biolearn/model.py +++ b/biolearn/model.py @@ -739,6 +739,89 @@ def preprocess(df): "file": "Bocklandt.csv", }, }, + "MiAge": { + "year": 2018, + "species": "Human", + "tissue": "Blood", + "source": "https://doi.org/10.1080/15592294.2017.1389361", + "output": "Mitotic Age (Cell Divisions)", + "model": { + "type": "MiAgeModel", + "file": "MiAge_parameters.csv", + }, + }, + "OrganAgeChronological": { + "year": 2024, + "species": "Human", + "tissue": "Blood", + "source": "https://www.medrxiv.org/content/10.1101/2024.04.08.24305469v1", + "output": "Mortality Risk by Organ", + "model": { + "type": "LinearMultipartProteomicModel", + "preprocess": olink_standardization_preprocess( + "reference/olink3000_deviations.csv" + ), + "file": "OrganAgeChronological.csv", + "default_imputation": "none", + }, + }, + "OrganAgeMortality": { + "year": 2024, + "species": "Human", + "tissue": "Blood", + "source": "https://www.medrxiv.org/content/10.1101/2024.04.08.24305469v1", + "output": "Age (Years) by Organ", + "model": { + "type": "LinearMultipartProteomicModel", + "preprocess": olink_standardization_preprocess( + "reference/olink3000_deviations.csv" + ), + "file": "OrganAgeMortality.csv", + "default_imputation": "none", + }, + }, + "OrganAge1500Chronological": { + "year": 2024, + "species": "Human", + "tissue": "Blood", + "source": "https://www.medrxiv.org/content/10.1101/2024.04.08.24305469v1", + "output": "Mortality Risk by Organ", + "model": { + "type": "LinearMultipartProteomicModel", + "preprocess": olink_standardization_preprocess( + "reference/olink1500_deviations.csv" + ), + "file": "OrganAge1500Chronological.csv", + "default_imputation": "none", + }, + }, + "OrganAge1500Mortality": { + "year": 2024, + "species": "Human", + "tissue": "Blood", + "source": "https://www.medrxiv.org/content/10.1101/2024.04.08.24305469v1", + "output": "Age (Years) by Organ", + "model": { + "type": "LinearMultipartProteomicModel", + "preprocess": olink_standardization_preprocess( + "reference/olink1500_deviations.csv" + ), + "file": "OrganAge1500Mortality.csv", + "default_imputation": "none", + }, + }, + "Bohlin": { + "year": 2017, + "species": "Human", + "tissue": "Cord Blood", + "source": "https://doi.org/10.1186/s13059-016-1063-4", + "output": "Age (days)", + "model": { + "type": "LinearMethylationModel", + "file": "Bohlin.csv", + "transform": lambda sum: sum + 277.2421, + }, + }, "PCHorvath1": { "year": 2022, "species": "Human", @@ -1626,5 +1709,141 @@ def __getattr__(self, name): return getattr(self.clock, name) +class MiAgeModel: + """ + MiAge (Mitotic Age) clock implementation. + + Based on Youn & Wang (2018): "The MiAge Calculator: a DNA methylation-based + mitotic age calculator of human tissue types." + + MiAge estimates the number of cell divisions (mitotic age) using an optimization + approach with site-specific parameters (b, c, d) for 268 CpG sites. + + Formula: For each sample, find n (mitotic age) that minimizes: + sum((c + b^(n-1) * d - beta)^2) + where beta is the observed methylation value for each CpG site. + """ + + def __init__(self, parameter_file): + """ + Initialize MiAge model with site-specific parameters. + + Parameters + ---------- + parameter_file : str + Path to CSV file containing CpG, b, c, d columns + """ + params = pd.read_csv(get_data_file(parameter_file)) + self.params = params.set_index("CpG") + self.b_params = self.params["b"] + self.c_params = self.params["c"] + self.d_params = self.params["d"] + self.cpg_sites = self.params.index.tolist() + + @classmethod + def from_definition(cls, clock_definition): + """Create MiAge model from clock definition""" + model_def = clock_definition["model"] + return cls(model_def["file"]) + + def _optimize_sample(self, beta_values): + """ + Optimize mitotic age for a single sample using scipy.optimize. + + Parameters + ---------- + beta_values : numpy.ndarray + Methylation beta values for CpG sites + + Returns + ------- + float + Estimated mitotic age (number of cell divisions) + """ + from scipy.optimize import minimize_scalar + + # Filter to valid (non-NaN) values + valid_mask = ~np.isnan(beta_values) + beta_valid = beta_values[valid_mask] + b_valid = self.b_params.values[valid_mask] + c_valid = self.c_params.values[valid_mask] + d_valid = self.d_params.values[valid_mask] + + def objective(n): + """MiAge objective function: sum((c + b^(n-1) * d - beta)^2)""" + return np.sum( + (c_valid + b_valid ** (n - 1) * d_valid - beta_valid) ** 2 + ) + + # Use multiple starting points for robustness + best_result = None + best_fun = np.inf + + for start in [100, 500, 1000, 2000]: + result = minimize_scalar( + objective, + bounds=(10, 10000), + method="bounded", + options={"xatol": 1e-8}, + ) + if result.fun < best_fun: + best_fun = result.fun + best_result = result + + return best_result.x + + def predict(self, geo_data): + """ + Predict mitotic age for methylation samples. + + Parameters + ---------- + geo_data : GeoData + Object containing methylation data + + Returns + ------- + pd.DataFrame + Predicted mitotic ages for each sample + """ + methylation_data = geo_data.dnam + + # Get shared CpG sites + shared_sites = methylation_data.index.intersection(self.cpg_sites) + + if len(shared_sites) == 0: + raise ValueError("No overlapping CpG sites found for MiAge clock") + + if len(shared_sites) < len(self.cpg_sites) * 0.5: + print( + f"WARNING: Only {len(shared_sites)}/{len(self.cpg_sites)} " + f"CpG sites available ({100*len(shared_sites)/len(self.cpg_sites):.1f}%)" + ) + + # Align data with model CpGs (keeping only shared sites) + # Need to reindex params to match shared sites order + shared_params = self.params.loc[shared_sites] + self.b_params = shared_params["b"] + self.c_params = shared_params["c"] + self.d_params = shared_params["d"] + + X = methylation_data.loc[shared_sites].values + + # Calculate MiAge for each sample + predictions = [] + for i in range(X.shape[1]): + beta_sample = X[:, i] + miage = self._optimize_sample(beta_sample) + predictions.append(miage) + + return pd.DataFrame( + predictions, index=methylation_data.columns, columns=["Predicted"] + ) + + def methylation_sites(self): + """Return list of required CpG sites""" + return self.cpg_sites + + def single_sample_clock(clock_function, data): return clock_function(data).iloc[0, 0] diff --git a/biolearn/test/data/expected_model_outputs/MiAge.csv b/biolearn/test/data/expected_model_outputs/MiAge.csv new file mode 100644 index 0000000..824b336 --- /dev/null +++ b/biolearn/test/data/expected_model_outputs/MiAge.csv @@ -0,0 +1,6 @@ +id,Predicted +GSM1009660,687.687237191772 +GSM1009661,593.720689605315 +GSM1009662,731.642906113088 +GSM1009663,540.336125046968 +GSM1009664,496.788170672912 From 7959698437b407b765827942d24ab8325746c0cf Mon Sep 17 00:00:00 2001 From: Marc Balestreri Date: Sat, 15 Nov 2025 20:06:44 -0800 Subject: [PATCH 3/4] Register MiAgeModel in ModelGallery and update test expectations - 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 #134 --- biolearn/data/{MiAge_parameters.csv => MiAge.csv} | 0 biolearn/model.py | 2 +- biolearn/model_gallery.py | 2 ++ .../test/data/expected_model_outputs/MiAge.csv | 15 ++++++++++----- 4 files changed, 13 insertions(+), 6 deletions(-) rename biolearn/data/{MiAge_parameters.csv => MiAge.csv} (100%) diff --git a/biolearn/data/MiAge_parameters.csv b/biolearn/data/MiAge.csv similarity index 100% rename from biolearn/data/MiAge_parameters.csv rename to biolearn/data/MiAge.csv diff --git a/biolearn/model.py b/biolearn/model.py index 674e0da..bbad5f3 100644 --- a/biolearn/model.py +++ b/biolearn/model.py @@ -747,7 +747,7 @@ def preprocess(df): "output": "Mitotic Age (Cell Divisions)", "model": { "type": "MiAgeModel", - "file": "MiAge_parameters.csv", + "file": "MiAge.csv", }, }, "OrganAgeChronological": { diff --git a/biolearn/model_gallery.py b/biolearn/model_gallery.py index 34fc25b..2a4f32a 100644 --- a/biolearn/model_gallery.py +++ b/biolearn/model_gallery.py @@ -11,6 +11,7 @@ EpiTOC2Model, AltumAgeModel, PCLinearTransformationModel, + MiAgeModel, ) from biolearn.imputation import ( hybrid_impute, @@ -36,6 +37,7 @@ class ModelGallery: "EpiTOC2Model": EpiTOC2Model.from_definition, "AltumAgeModel": AltumAgeModel.from_definition, "PCLinearTransformationModel": PCLinearTransformationModel.from_definition, + "MiAgeModel": MiAgeModel.from_definition, } def __init__(self, models=model_definitions): diff --git a/biolearn/test/data/expected_model_outputs/MiAge.csv b/biolearn/test/data/expected_model_outputs/MiAge.csv index 824b336..62a2c3e 100644 --- a/biolearn/test/data/expected_model_outputs/MiAge.csv +++ b/biolearn/test/data/expected_model_outputs/MiAge.csv @@ -1,6 +1,11 @@ id,Predicted -GSM1009660,687.687237191772 -GSM1009661,593.720689605315 -GSM1009662,731.642906113088 -GSM1009663,540.336125046968 -GSM1009664,496.788170672912 +GSM1009660,690.7299170623446 +GSM1009661,593.7206748761973 +GSM1009662,731.6428850713417 +GSM1009663,560.0016711692683 +GSM1009664,496.7881567481185 +GSM1009665,405.57820161202085 +GSM1009666,507.01735989703303 +GSM1009667,442.095405784304 +GSM1009668,618.8602361353671 +GSM1009669,583.0866615952626 From 87d58f8881c5895a00d485dcd1fa034fab8fc822 Mon Sep 17 00:00:00 2001 From: Marc Balestreri Date: Mon, 17 Nov 2025 22:53:18 -0800 Subject: [PATCH 4/4] - Move scipy.optimize import to top of file per PEP-8 - Remove duplicate ModelGallery entries that were overwriting existing clocks --- biolearn/model.py | 63 +---------------------------------------------- 1 file changed, 1 insertion(+), 62 deletions(-) diff --git a/biolearn/model.py b/biolearn/model.py index bbad5f3..aeca651 100644 --- a/biolearn/model.py +++ b/biolearn/model.py @@ -5,6 +5,7 @@ import torch import torch.nn as nn import torch.nn.functional as F +from scipy.optimize import minimize_scalar from sklearn.linear_model import LinearRegression from biolearn.data_library import GeoData @@ -750,66 +751,6 @@ def preprocess(df): "file": "MiAge.csv", }, }, - "OrganAgeChronological": { - "year": 2024, - "species": "Human", - "tissue": "Blood", - "source": "https://www.medrxiv.org/content/10.1101/2024.04.08.24305469v1", - "output": "Mortality Risk by Organ", - "model": { - "type": "LinearMultipartProteomicModel", - "preprocess": olink_standardization_preprocess( - "reference/olink3000_deviations.csv" - ), - "file": "OrganAgeChronological.csv", - "default_imputation": "none", - }, - }, - "OrganAgeMortality": { - "year": 2024, - "species": "Human", - "tissue": "Blood", - "source": "https://www.medrxiv.org/content/10.1101/2024.04.08.24305469v1", - "output": "Age (Years) by Organ", - "model": { - "type": "LinearMultipartProteomicModel", - "preprocess": olink_standardization_preprocess( - "reference/olink3000_deviations.csv" - ), - "file": "OrganAgeMortality.csv", - "default_imputation": "none", - }, - }, - "OrganAge1500Chronological": { - "year": 2024, - "species": "Human", - "tissue": "Blood", - "source": "https://www.medrxiv.org/content/10.1101/2024.04.08.24305469v1", - "output": "Mortality Risk by Organ", - "model": { - "type": "LinearMultipartProteomicModel", - "preprocess": olink_standardization_preprocess( - "reference/olink1500_deviations.csv" - ), - "file": "OrganAge1500Chronological.csv", - "default_imputation": "none", - }, - }, - "OrganAge1500Mortality": { - "year": 2024, - "species": "Human", - "tissue": "Blood", - "source": "https://www.medrxiv.org/content/10.1101/2024.04.08.24305469v1", - "output": "Age (Years) by Organ", - "model": { - "type": "LinearMultipartProteomicModel", - "preprocess": olink_standardization_preprocess( - "reference/olink1500_deviations.csv" - ), - "file": "OrganAge1500Mortality.csv", - "default_imputation": "none", - }, - }, "Bohlin": { "year": 2017, "species": "Human", @@ -1760,8 +1701,6 @@ def _optimize_sample(self, beta_values): float Estimated mitotic age (number of cell divisions) """ - from scipy.optimize import minimize_scalar - # Filter to valid (non-NaN) values valid_mask = ~np.isnan(beta_values) beta_valid = beta_values[valid_mask]