-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalyze_dna.py
More file actions
1937 lines (1779 loc) · 78.5 KB
/
Copy pathanalyze_dna.py
File metadata and controls
1937 lines (1779 loc) · 78.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env python3
"""
Comprehensive DNA Analysis - All-in-One Script
Analyzes SNP data for health, traits, ancestry, mood, and more
100% local processing - no data transmitted
"""
import snps
import sys
from collections import defaultdict
from athletic_score import analyze_athletic_performance
# ANSI color codes
class Colors:
HEADER = '\033[95m' # Magenta
BLUE = '\033[94m' # Blue
CYAN = '\033[96m' # Cyan
GREEN = '\033[92m' # Green
YELLOW = '\033[93m' # Yellow
RED = '\033[91m' # Red
BOLD = '\033[1m' # Bold
UNDERLINE = '\033[4m' # Underline
END = '\033[0m' # Reset
GRAY = '\033[90m' # Gray
ORANGE = '\033[38;5;208m' # Orange
def print_section(title):
"""Print a formatted section header"""
print(f"\n{Colors.BOLD}{Colors.CYAN}{'='*80}{Colors.END}")
print(f"{Colors.BOLD}{Colors.CYAN} {title}{Colors.END}")
print(f"{Colors.BOLD}{Colors.CYAN}{'='*80}{Colors.END}\n")
# ============================================================================
# TIER 1: CLINICAL GRADE MARKERS
# FDA recognized, ACMG reportable, strong clinical evidence
# ============================================================================
TIER1_PHARMACOGENOMICS = {
'rs1799853': { # CYP2C9*2
'gene': 'CYP2C9', 'drug': 'Warfarin',
'evidence': 'FDA Table, CPIC Level A',
'CC': 'Normal metabolism (*1/*1) - standard dosing',
'CT': 'Intermediate (*1/*2) - ~20% reduced metabolism, may need 15-30% lower dose',
'TT': 'Reduced metabolism (*2/*2) - ~40% reduction, may need 40-50% lower dose',
},
'rs1057910': { # CYP2C9*3
'gene': 'CYP2C9', 'drug': 'Warfarin',
'evidence': 'FDA Table, CPIC Level A',
'AA': 'Normal metabolism (*1/*1)',
'AC': 'Intermediate (*1/*3) - lower dose needed',
'CC': 'Poor metabolism (*3/*3) - much lower dose',
},
'rs4244285': { # CYP2C19*2
'gene': 'CYP2C19', 'drug': 'Clopidogrel (Plavix)',
'evidence': 'FDA Black Box Warning',
'GG': 'Normal metabolizer (*1/*1) - standard effectiveness',
'AG': 'Intermediate (*1/*2) - reduced effectiveness',
'AA': 'Poor metabolizer (*2/*2) - may need alternative drug',
},
'rs4986893': { # CYP2C19*3
'gene': 'CYP2C19', 'drug': 'Clopidogrel',
'evidence': 'FDA Table, CPIC',
'GG': 'Normal (*1/*1)',
'GA': 'Intermediate (*1/*3)',
'AA': 'Poor metabolizer (*3/*3)',
},
'rs12248560': { # CYP2C19*17
'gene': 'CYP2C19', 'drug': 'SSRIs, PPIs',
'evidence': 'CPIC - ultra-rapid metabolism',
'CC': 'Normal metabolism',
'CT': 'Increased activity (*1/*17)',
'TT': 'Ultra-rapid (*17/*17) - higher SSRI side effects',
},
'rs1065852': { # CYP2D6*4
'gene': 'CYP2D6', 'drug': 'Codeine, antidepressants, antipsychotics',
'evidence': 'FDA Table - 25% of drugs',
'CC': 'Normal metabolizer',
'CT': 'Intermediate',
'TT': 'Poor metabolizer (*4/*4) - high drug sensitivity',
},
'rs3745274': { # CYP2B6*6
'gene': 'CYP2B6', 'drug': 'Efavirenz (HIV)',
'evidence': 'FDA Table, CPIC',
'GG': 'Normal metabolizer',
'GT': 'Intermediate (*1/*6) - may have altered efavirenz response',
'TT': 'Slow metabolizer (*6/*6) - reduced enzyme activity, higher side effects, lower doses needed',
},
'rs1801133': { # MTHFR C677T
'gene': 'MTHFR', 'drug': 'Methotrexate, 5-FU chemo',
'evidence': 'FDA Table, CPIC',
'CC': 'Normal enzyme function',
'CT': 'Reduced function (~65% activity)',
'TT': 'Low function (~10-20%) - need higher folate, dose adjustment',
},
'rs1801131': { # MTHFR A1298C
'gene': 'MTHFR', 'drug': 'Folate metabolism',
'evidence': 'FDA Table, CPIC',
'AA': 'Normal function',
'AC': 'Slightly reduced (~80% activity)',
'CC': 'Mildly reduced function (~60% activity)',
},
'rs1045642': { # ABCB1 C3435T
'gene': 'ABCB1', 'drug': 'Many drugs (P-glycoprotein)',
'evidence': 'Affects drug transport',
'CC': 'Normal drug metabolism, cannabis dependence risk, lower cancer risk',
'CT': 'Slower metaboliser for some drugs',
'TT': 'Altered drug metabolism/bioavailability, moderately increased cancer risk',
},
'rs1142345': { # TPMT*3C
'gene': 'TPMT', 'drug': 'Azathioprine, 6-mercaptopurine (immunosuppressants)',
'evidence': 'FDA Table, CPIC Level A',
'AA': 'Normal TPMT activity',
'AG': 'Intermediate activity - lower dose needed',
'GG': 'Low activity - much lower dose or alternative',
},
'rs1801280': { # NAT2*5
'gene': 'NAT2', 'drug': 'Isoniazid, hydralazine, sulfonamides',
'evidence': 'FDA Table - affects acetylation speed',
'TT': 'Normal/rapid acetylator',
'TC': 'Intermediate acetylator',
'CC': 'Slow acetylator (higher drug side effects)',
},
'rs4149056': { # SLCO1B1
'gene': 'SLCO1B1', 'drug': 'Statins (simvastatin)',
'evidence': 'FDA Table, CPIC - myopathy risk',
'TT': 'Normal function',
'TC': 'Intermediate function - higher myopathy risk',
'CC': 'Reduced function - high myopathy risk (~17x)',
},
'rs9923231': { # VKORC1
'gene': 'VKORC1', 'drug': 'Warfarin',
'evidence': 'FDA Table, CPIC - primary warfarin sensitivity',
'CC': 'Normal warfarin sensitivity - standard dosing',
'CT': 'Increased sensitivity - reduced warfarin dose needed',
'TT': 'High sensitivity - significantly reduced dose needed, higher bleeding risk',
},
'rs8175347': { # UGT1A1*28
'gene': 'UGT1A1', 'drug': 'Irinotecan (chemo)',
'evidence': 'FDA Table - severe toxicity risk',
'TA6/TA6': 'Normal metabolism',
'TA6/TA7': 'Intermediate - higher toxicity risk',
'TA7/TA7': 'Poor metabolism - much higher toxicity risk',
},
}
TIER1_CARDIOVASCULAR = {
'rs429358': { # APOE ε4
'gene': 'APOE', 'condition': 'Alzheimer disease',
'evidence': 'See "Longevity & Cognitive Aging" section for full personalized APOE interpretation',
'TT': 'No ε4 allele - see combined interpretation with rs7412 below',
'CT': 'ONE ε4 allele - see combined interpretation with rs7412 below',
'CC': 'TWO ε4 copies (ε4/ε4) - very high risk - see full interpretation below',
},
'rs7412': { # APOE ε2
'gene': 'APOE', 'condition': 'Alzheimer disease',
'evidence': 'See "Longevity & Cognitive Aging" section for full personalized APOE interpretation',
'CC': 'No ε2 allele - see combined interpretation with rs429358 below',
'CT': 'ONE ε2 allele - see combined interpretation with rs429358 below',
'TT': 'TWO ε2 alleles - see combined interpretation with rs429358 below',
},
'rs1333049': { # 9p21 locus
'gene': 'CDKN2A/B', 'condition': 'Coronary artery disease',
'evidence': 'GWAS P<10^-50 (OR=1.9, G allele OR=0.816 protective)',
'CC': 'Elevated CAD/MI risk (~1.9x, +50% vs GG)',
'CG': 'Moderate CAD risk (~1.5x, +25% vs GG)',
'GG': 'Lower CAD risk (protective)',
},
'rs6025': { # Factor V Leiden
'gene': 'F5', 'condition': 'Blood clots (thrombophilia)',
'evidence': 'ACMG Secondary Findings v3.2',
'GG': 'Normal clotting',
'GA': 'Factor V Leiden heterozygous (3.5-4.4x DVT risk)',
'AA': 'Homozygous (11.4x risk) - very rare',
},
'rs1799963': { # Prothrombin
'gene': 'F2', 'condition': 'Blood clots',
'evidence': 'ACMG Secondary Findings',
'GG': 'Normal clotting',
'GA': 'Carrier (2-3x clot risk)',
'AA': 'Homozygous - very rare, very high risk',
},
'rs1800562': { # HFE C282Y
'gene': 'HFE', 'condition': 'Hemochromatosis (iron overload)',
'evidence': 'ACMG, causes 85-90% of hemochromatosis',
'GG': 'Normal iron regulation',
'GA': 'Carrier (usually asymptomatic)',
'AA': 'At risk for iron overload',
},
'rs1799945': { # HFE H63D
'gene': 'HFE', 'condition': 'Hemochromatosis (milder)',
'evidence': 'ACMG Secondary Findings',
'CC': 'Normal',
'CG': 'Carrier (mild effect)',
'GG': 'Two copies (mild iron overload risk)',
},
}
# ============================================================================
# TIER 2: HEALTH & DISEASE RISK
# GWAS validated, replicated studies
# ============================================================================
HEALTH_METABOLIC = {
'rs7903146': { # TCF7L2
'gene': 'TCF7L2', 'condition': 'Type 2 diabetes',
'evidence': 'GWAS P<10^-100, OR 1.4-2.0',
'CC': 'Typical risk',
'CT': 'Elevated risk (OR ~1.4)',
'TT': 'Higher risk (OR ~2.0)',
},
'rs9939609': { # FTO
'gene': 'FTO', 'condition': 'Obesity/BMI',
'evidence': 'GWAS P<10^-40, +3-4kg per allele',
'TT': 'Lower BMI tendency',
'AT': 'Moderate BMI (+1-2kg)',
'AA': 'Higher BMI tendency (+3-4kg)',
},
'rs1801282': { # PPARG Pro12Ala
'gene': 'PPARG', 'condition': 'Insulin sensitivity',
'evidence': 'Complex effects on metabolism',
'CC': 'Normal fat metabolism (Pro/Pro)',
'CG': 'Pro/Ala - altered metabolism (conflicting evidence)',
'GG': 'Ala/Ala - altered metabolism (conflicting evidence)',
},
'rs5219': { # KCNJ11
'gene': 'KCNJ11', 'condition': 'Type 2 diabetes',
'evidence': 'Replicated GWAS',
'CC': 'Typical risk',
'CT': 'Slightly elevated',
'TT': 'Elevated risk',
},
'rs10830963': { # MTNR1B
'gene': 'MTNR1B', 'condition': 'Fasting glucose',
'evidence': 'Replicated GWAS',
'CC': 'Normal',
'CG': 'Elevated fasting glucose',
'GG': 'Higher glucose, T2D risk',
},
'rs738409': { # PNPLA3 (I148M)
'gene': 'PNPLA3', 'condition': 'Fatty liver disease',
'evidence': 'Strong association (NAFLD OR=3.41, Cirrhosis OR=1.86)',
'CC': 'Normal risk (wild-type)',
'CG': 'Elevated NAFLD risk (~2x)',
'GG': 'High NAFLD/cirrhosis/HCC risk (I148M homozygous)',
},
'rs780094': { # GCKR
'gene': 'GCKR', 'condition': 'Triglycerides, liver fat',
'evidence': 'GWAS validated',
'CC': 'Normal',
'CT': 'Moderately elevated triglycerides',
'TT': 'Higher triglycerides, NAFLD risk',
},
}
HEALTH_CARDIOVASCULAR_EXTENDED = {
'rs5128': { # APOC3
'gene': 'APOC3', 'condition': 'Triglycerides',
'evidence': 'Replicated studies',
'CC': 'Typical levels',
'CG': 'Slightly elevated',
'GG': 'Higher triglyceride tendency',
},
'rs662799': { # APOA5 (-1131T>C)
'gene': 'APOA5', 'condition': 'Triglycerides/HDL',
'evidence': 'Strong association (PMC8378982, MI OR=1.44)',
'AA': 'Typical triglycerides (protective)',
'AG': 'Elevated triglycerides (+11% per G allele)',
'GG': 'Higher triglycerides (+36%), lower HDL, increased CVD risk',
},
'rs2383206': { # CDKN2A/B
'gene': 'CDKN2A/B', 'condition': 'Heart attack',
'evidence': '9p21 locus',
'AA': 'Elevated risk',
'AG': 'Moderate risk',
'GG': 'Lower risk',
},
'rs1800795': { # IL6
'gene': 'IL6', 'condition': 'Inflammation, CVD',
'evidence': 'Cytokine production',
'GG': 'Lower IL-6 production',
'GC': 'Moderate',
'CC': 'Higher IL-6, inflammation',
},
# Note: rs4420638 (APOE region) moved to LONGEVITY_COGNITIVE_AGING section for consolidated interpretation
}
HEALTH_CANCER = {
'rs1042522': { # TP53
'gene': 'TP53', 'condition': 'Tumor suppressor (Arg72Pro)',
'evidence': 'Functional variant',
'GG': 'Arg/Arg - common variant, slightly shorter lifespan',
'CG': 'Arg/Pro - intermediate',
'CC': 'Pro/Pro - may live ~3 years longer, better chemo response',
},
'rs17849079': { # PIK3CA
'gene': 'PIK3CA', 'condition': 'Cowden syndrome',
'evidence': 'PI3K-AKT pathway',
'GG': 'Normal risk',
'GT': 'Slightly elevated risk',
'TT': 'Elevated risk',
},
'rs2227983': { # EGFR
'gene': 'EGFR', 'condition': 'Lung cancer (protective)',
'evidence': 'Growth factor receptor',
'AA': 'Higher lung cancer risk if smoker',
'AG': 'Moderate protection',
'GG': 'Better protection against lung cancer',
},
'rs4073': { # CXCL8
'gene': 'CXCL8', 'condition': 'Various cancers',
'evidence': 'Inflammation marker',
'AA': 'Lower IL-8',
'AT': 'Moderate',
'TT': 'Higher IL-8, increased cancer risk',
},
'rs1800896': { # IL10
'gene': 'IL10', 'condition': 'Immune function',
'evidence': 'Anti-inflammatory cytokine',
'AA': 'Higher IL-10 (protective)',
'AG': 'Moderate',
'GG': 'Lower IL-10',
},
'rs4986790': { # TLR4
'gene': 'TLR4', 'condition': 'Immune response, infection risk',
'evidence': 'Innate immunity',
'AA': 'Normal response',
'AG': 'Altered immune response',
'GG': 'Different response pattern',
},
}
HEALTH_COVID19 = {
'rs10490770': { # COVID-19 severity (3p21.31)
'gene': 'LZTFL1', 'condition': 'COVID-19 severity',
'evidence': 'GWAS - Nature 2020',
'AA': 'Lower risk of severe COVID',
'AG': 'Moderate risk (~1.7x)',
'GG': '2x risk of severe COVID-19',
},
'rs657152': { # ABO blood type
'gene': 'ABO', 'condition': 'Blood type (COVID-19 susceptibility)',
'evidence': 'Blood type O protective',
'AA': 'Blood type A (higher COVID risk)',
'AC': 'Blood type A or AB',
'CC': 'Blood type O (lower COVID risk)',
},
}
HEALTH_AUTOIMMUNE = {
'rs2476601': { # PTPN22
'gene': 'PTPN22', 'condition': 'Autoimmune (T1D, RA, etc)',
'evidence': 'Strong autoimmune association',
'GG': 'Typical risk',
'AG': 'Elevated autoimmune risk',
'AA': 'Higher autoimmune risk',
},
'rs1800629': { # TNF
'gene': 'TNF', 'condition': 'TNF-alpha production',
'evidence': 'Pro-inflammatory cytokine',
'GG': 'Normal TNF levels',
'GA': 'Higher TNF production',
'AA': 'Much higher TNF (pro-inflammatory)',
},
'rs2187668': { # HLA-DQ
'gene': 'HLA-DQA1', 'condition': 'Celiac disease',
'evidence': 'HLA-DQ region',
'CC': 'Very low risk (<1%)',
'CT': 'Low-moderate risk',
'TT': 'Elevated risk',
},
'rs6457620': { # HLA region
'gene': 'HLA region', 'condition': 'Rheumatoid arthritis',
'evidence': 'HLA association',
'CC': 'Lower risk',
'CT': 'Moderate risk',
'TT': 'Higher RA risk',
},
}
HEALTH_BONE_KIDNEY = {
'rs2234693': { # ESR1
'gene': 'ESR1', 'condition': 'Osteoporosis',
'evidence': 'Estrogen receptor',
'CC': 'Lower bone density tendency',
'CT': 'Moderate',
'TT': 'Better bone density',
},
'rs4293393': { # UMOD
'gene': 'UMOD', 'condition': 'Chronic kidney disease',
'evidence': 'GWAS validated (PNAS 2022, CKD OR=1.25, T allele=risk)',
'AA': 'Elevated CKD risk, salt-sensitive hypertension (T/T on research strand)',
'AG': 'Moderate CKD risk',
'GG': 'Lower CKD risk (protective, C/C on research strand, lower uromodulin)',
},
'rs1799983': { # NOS3
'gene': 'NOS3', 'condition': 'Nitric oxide, blood pressure',
'evidence': 'Endothelial function',
'GG': 'Normal NO production',
'GT': 'Slightly reduced',
'TT': 'Lower NO, hypertension risk',
},
}
# ============================================================================
# LONGEVITY & COGNITIVE AGING - FOXO3 + APOE
# Most replicated longevity genes - interpret together
# ============================================================================
LONGEVITY_COGNITIVE_AGING = {
# FOXO3 - The Longevity Gene (most replicated across all populations)
'rs2802292': { # FOXO3
'gene': 'FOXO3', 'condition': 'Longevity, healthy aging',
'evidence': 'Most replicated longevity gene worldwide - centenarian association across all populations',
'TT': '🌟 STRONG longevity (~1.8x centenarian odds) - stress resistance, healthy aging',
'GT': '✓ MODERATE longevity (~1.3x centenarian odds) - good aging trajectory',
'GG': 'Typical lifespan',
},
'rs2764264': { # FOXO3
'gene': 'FOXO3', 'condition': 'Longevity (male-specific effect)',
'evidence': 'Centenarian studies - stronger effect in males',
'TT': '🌟 STRONG longevity association',
'CT': '✓ MODERATE longevity association',
'CC': 'Typical lifespan',
},
# APOE - Alzheimer's & Cognitive Aging (interpret rs429358 + rs7412 together!)
'rs429358': { # APOE ε4 - THE CRITICAL ONE
'gene': 'APOE', 'condition': 'Alzheimer disease, cognitive aging, lifespan',
'evidence': 'Must combine with rs7412 to determine APOE type - see personalized interpretation below',
'TT': 'No ε4 allele (need rs7412: if TT=ε2/ε2 [0.6x risk], if CT=ε2/ε3 [0.6x risk], if CC=ε3/ε3 [1.0x risk])',
'CT': 'ONE ε4 allele (need rs7412: if CT=ε2/ε4 [~2.6x risk], if CC=ε3/ε4 [~3.2x risk])',
'CC': '⚠⚠ TWO ε4 copies = ε4/ε4 - very high Alzheimer risk (~12x, 61x early-onset), very rare (~2%)',
},
'rs7412': { # APOE ε2 - THE PROTECTIVE ONE
'gene': 'APOE', 'condition': 'Alzheimer protection, longevity',
'evidence': 'Must combine with rs429358 to determine APOE type - see personalized interpretation below',
'TT': 'TWO ε2 alleles (need rs429358: if TT=ε2/ε2 [0.6x risk, longevity])',
'CT': 'ONE ε2 allele (need rs429358: if TT=ε2/ε3 [0.6x risk], if CT=ε2/ε4 [~2.6x risk])',
'CC': 'No ε2 allele (need rs429358: if TT=ε3/ε3 [1.0x risk], if CT=ε3/ε4 [~3.2x risk], if CC=ε4/ε4 [~12x risk])',
},
# APOE region proxy marker
'rs4420638': { # APOE region
'gene': 'APOE region', 'condition': 'Alzheimer risk (additional marker), cholesterol',
'evidence': 'APOE region proxy - correlates with ε4 status',
'GG': '⚠ Higher Alzheimer risk (2x+), higher LDL cholesterol',
'AG': '⚠ Elevated Alzheimer risk (~3x), higher heart disease risk (1.4x)',
'AA': '✓ Normal/average Alzheimer risk',
},
# Other longevity markers
'rs3764261': { # CETP
'gene': 'CETP', 'condition': 'HDL cholesterol, longevity',
'evidence': 'Higher HDL, longevity association (PMC3293889)',
'AA': '✓ Lower CETP activity - higher HDL ("good" cholesterol), longevity association',
'CA': 'Reduced CETP activity - higher HDL',
'CC': 'Typical CETP activity - typical HDL levels',
},
'rs9536314': { # KLOTHO (F352V, KL-VS variant)
'gene': 'KLOTHO', 'condition': 'Anti-aging, cognition',
'evidence': 'Anti-aging gene - klotho protein (PMC4978356)',
'TT': 'Typical klotho function',
'GT': '✓ KL-VS heterozygote - better cognition, may enhance longevity',
'GG': 'KL-VS homozygote - may reduce lifespan (rare)',
},
}
# ============================================================================
# LD-BASED SNP PREDICTION
# ============================================================================
def predict_foxo3_from_ld(snps_obj):
"""
Predict rs2802292 (FOXO3 longevity SNP) from proxy SNPs in high LD
Based on research: rs2802292 has 7+ proxy SNPs with r² 0.89-0.99
These SNPs form a longevity haplotype that's highly conserved.
"""
# Proxy SNPs in strong LD with rs2802292 (r² > 0.89)
# Source: PMC6606898, various FOXO3 longevity studies
FOXO3_PROXIES = {
'rs2802288': { # Very strong proxy (r² ≈ 0.95-0.99)
'TT': 'TT', # If proxy is TT, target is TT (longevity allele)
'GT': 'GT', # Heterozygous
'GG': 'GG', # Non-longevity allele
'r2': 0.97
},
'rs2764264': { # Another FOXO3 longevity SNP (moderate LD, r² ≈ 0.7-0.8)
'TT': 'TT', # Both are longevity markers
'CT': 'GT', # Heterozygous
'CC': 'GG',
'r2': 0.75
},
'rs12202234': { # Strong LD (r² ≈ 0.90-0.95)
'TT': 'TT',
'CT': 'GT',
'CC': 'GG',
'r2': 0.92
},
'rs3800230': { # Strong LD (r² ≈ 0.89-0.93)
'AA': 'TT', # Different alleles, but correlated
'AG': 'GT',
'GG': 'GG',
'r2': 0.91
},
}
predictions = []
for proxy_rsid, proxy_info in FOXO3_PROXIES.items():
proxy_data = snps_obj.snps[snps_obj.snps.index == proxy_rsid]
if len(proxy_data) > 0 and not proxy_data['genotype'].isna().all():
proxy_gt = str(proxy_data['genotype'].iloc[0])
# Normalize (handle reversed genotypes)
if proxy_gt in ['TC', 'CT']:
proxy_gt = 'CT' if 'C' in proxy_gt and 'T' in proxy_gt else proxy_gt
elif proxy_gt in ['GA', 'AG']:
proxy_gt = 'AG' if 'A' in proxy_gt and 'G' in proxy_gt else proxy_gt
if proxy_gt in proxy_info:
predicted_gt = proxy_info[proxy_gt]
r2 = proxy_info['r2']
predictions.append({
'genotype': predicted_gt,
'r2': r2,
'proxy_rsid': proxy_rsid,
'proxy_genotype': proxy_gt
})
if not predictions:
return None
# Use the prediction from the highest r² proxy
best_prediction = max(predictions, key=lambda x: x['r2'])
# Check for consensus (all predictions agree)
consensus = all(p['genotype'] == best_prediction['genotype'] for p in predictions)
return {
'genotype': best_prediction['genotype'],
'r2': best_prediction['r2'],
'num_proxies': len(predictions),
'consensus': consensus,
'method': 'LD-based prediction',
'proxies': predictions
}
# ============================================================================
# PERSONALIZED FOXO3 + APOE INTERPRETATION
# ============================================================================
def interpret_apoe_foxo3(snps_obj):
"""
Interpret user's specific APOE and FOXO3 genotypes with personalized recommendations
"""
# Get APOE genotypes
rs429358_data = snps_obj.snps[snps_obj.snps.index == 'rs429358']
rs7412_data = snps_obj.snps[snps_obj.snps.index == 'rs7412']
rs429358_gt = None
rs7412_gt = None
if len(rs429358_data) > 0 and not rs429358_data['genotype'].isna().all():
rs429358_gt = str(rs429358_data['genotype'].iloc[0])
if len(rs7412_data) > 0 and not rs7412_data['genotype'].isna().all():
rs7412_gt = str(rs7412_data['genotype'].iloc[0])
# Get FOXO3 genotypes (with LD-based prediction fallback)
rs2802292_data = snps_obj.snps[snps_obj.snps.index == 'rs2802292']
rs2764264_data = snps_obj.snps[snps_obj.snps.index == 'rs2764264']
rs2802292_gt = None
rs2802292_predicted = False
rs2802292_prediction_info = None
# Try direct genotyping first
if len(rs2802292_data) > 0 and not rs2802292_data['genotype'].isna().all():
rs2802292_gt = str(rs2802292_data['genotype'].iloc[0])
else:
# Try LD-based prediction
prediction = predict_foxo3_from_ld(snps_obj)
if prediction:
rs2802292_gt = prediction['genotype']
rs2802292_predicted = True
rs2802292_prediction_info = prediction
rs2764264_gt = None
if len(rs2764264_data) > 0 and not rs2764264_data['genotype'].isna().all():
rs2764264_gt = str(rs2764264_data['genotype'].iloc[0])
# Determine APOE type
apoe_type = None
apoe_risk = None
apoe_description = None
apoe_recommendations = []
if rs429358_gt and rs7412_gt:
# Normalize genotypes (handle reversed)
if rs429358_gt == 'TC': rs429358_gt = 'CT'
if rs7412_gt == 'TC': rs7412_gt = 'CT'
# Map to APOE type
apoe_map = {
('TT', 'TT'): ('ε2/ε2', '0.6x', '🌟 PROTECTIVE', 'Very rare (~1%). Strong Alzheimer protection and enriched in centenarians. However, can cause type III hyperlipoproteinemia - monitor triglycerides.'),
('TT', 'CT'): ('ε2/ε3', '0.6x', '✓ PROTECTIVE', 'Protective variant (~10-15% of population). Lower Alzheimer risk than average.'),
('CT', 'CT'): ('ε2/ε4', '~2.6x', '⚠ INTERMEDIATE', 'Rare combination (~2%). You have both the protective ε2 and risk ε4 alleles. The ε2 partially offsets ε4 risk, resulting in intermediate Alzheimer risk.'),
('TT', 'CC'): ('ε3/ε3', '1.0x', '✓ BASELINE', 'Most common type (~60-70% of population). Normal/average Alzheimer risk.'),
('CT', 'CC'): ('ε3/ε4', '~3.2x', '⚠ ELEVATED', 'Common variant (~25% of population). 3x higher Alzheimer risk, 1.4x heart disease risk. Focus on prevention!'),
('CC', 'CC'): ('ε4/ε4', '~12x', '⚠⚠ HIGH', 'Very rare (~2%). Highest Alzheimer risk (12x late-onset, 61x early-onset). Strong prevention strategy recommended.'),
}
key = (rs429358_gt, rs7412_gt)
if key in apoe_map:
apoe_type, apoe_risk, apoe_icon, apoe_description = apoe_map[key]
# Recommendations based on APOE type
if 'ε4' in apoe_type:
apoe_recommendations = [
"🏃 Exercise regularly (150+ min/week aerobic + strength training)",
"🥗 Mediterranean diet (high fish, olive oil, vegetables, low red meat)",
"💤 Prioritize sleep (7-9 hours, treat sleep apnea if present)",
"🧠 Cognitive training and lifelong learning",
"❤️ Control cardiovascular risk factors (BP, cholesterol, diabetes)",
"🚭 Avoid smoking and excessive alcohol",
"👥 Stay socially engaged",
]
if apoe_type == 'ε4/ε4':
apoe_recommendations.insert(0, "⚠️ Consider genetic counseling and early/frequent cognitive screening")
elif 'ε2' in apoe_type:
apoe_recommendations = [
"🌟 You have genetic protection against Alzheimer's!",
"📊 Monitor triglycerides (ε2 can rarely cause elevated levels)",
"💪 Continue healthy lifestyle to maximize longevity benefits",
]
else: # ε3/ε3
apoe_recommendations = [
"✓ Average Alzheimer risk - standard prevention applies",
"🏃 Regular exercise and healthy diet still beneficial",
"🧠 Cognitive engagement supports healthy aging",
]
# Interpret FOXO3
foxo3_longevity = None
foxo3_description = None
if rs2802292_gt:
if rs2802292_gt in ['TT']:
foxo3_longevity = '🌟 STRONG'
foxo3_description = 'EXCELLENT longevity genetics! ~1.8x odds of reaching 100. Associated with stress resistance and healthy aging.'
elif rs2802292_gt in ['GT', 'TG']:
foxo3_longevity = '✓ MODERATE'
foxo3_description = 'Good longevity genetics. ~1.3x odds of reaching 100. Favorable aging trajectory.'
else: # GG
foxo3_longevity = 'TYPICAL'
foxo3_description = 'Average longevity - lifestyle factors still matter greatly!'
# Only print if we have SOMETHING to show
if not (foxo3_longevity or apoe_type or rs429358_gt or rs7412_gt):
return # No data available, skip this section
# Print interpretation
print(f"\n{Colors.BOLD}{Colors.CYAN}{'='*80}{Colors.END}")
print(f"{Colors.BOLD}{Colors.CYAN} YOUR PERSONALIZED LONGEVITY & COGNITIVE AGING PROFILE{Colors.END}")
print(f"{Colors.BOLD}{Colors.CYAN}{'='*80}{Colors.END}\n")
# FOXO3 Section
if foxo3_longevity:
if rs2802292_predicted:
# Show predicted result with details
print(f"{Colors.BOLD}🧬 FOXO3 Longevity Gene (rs2802292: {rs2802292_gt}*):{Colors.END}")
print(f" {foxo3_description}\n")
# Show prediction details
info = rs2802292_prediction_info
confidence_color = Colors.GREEN if info['r2'] > 0.9 else Colors.YELLOW if info['r2'] > 0.8 else Colors.RED
print(f" {Colors.CYAN}* Predicted from {info['num_proxies']} proxy SNP(s) (not directly genotyped){Colors.END}")
print(f" {Colors.GRAY}Method: {info['method']}{Colors.END}")
print(f" {Colors.GRAY}Confidence: {confidence_color}r² = {info['r2']:.2f}{Colors.END} {Colors.GRAY}(LD correlation){Colors.END}")
if info['consensus']:
print(f" {Colors.GREEN}✓ All proxy SNPs agree on this prediction{Colors.END}")
else:
print(f" {Colors.YELLOW}⚠ Multiple predictions - using highest r² proxy{Colors.END}")
# Show which proxy was used
best = max(info['proxies'], key=lambda x: x['r2'])
print(f" {Colors.GRAY}Primary proxy: {best['proxy_rsid']} ({best['proxy_genotype']}) → r² = {best['r2']:.2f}{Colors.END}")
if info['r2'] < 0.85:
print(f"\n {Colors.YELLOW}⚠ Note: Moderate confidence prediction - for curiosity only{Colors.END}")
print(f" {Colors.YELLOW}Consider 23andMe or whole genome sequencing for definitive results{Colors.END}")
print()
else:
# Directly genotyped
print(f"{Colors.BOLD}🧬 FOXO3 Longevity Gene (rs2802292: {rs2802292_gt}):{Colors.END}")
print(f" {foxo3_description}")
print(f" {Colors.GREEN}✓ Directly genotyped (high confidence){Colors.END}\n")
else:
print(f"{Colors.BOLD}🧬 FOXO3 Longevity Gene:{Colors.END}")
print(f" {Colors.GRAY}⚠️ Data not available - rs2802292 not found and no proxy SNPs detected{Colors.END}")
print(f" {Colors.GRAY}(Most replicated longevity gene - associated with centenarian status){Colors.END}")
print(f"\n {Colors.GRAY}Missing proxies checked: rs2802288, rs2764264, rs12202234, rs3800230{Colors.END}")
print(f" {Colors.GRAY}Recommendation: Consider 23andMe or whole genome sequencing{Colors.END}\n")
# APOE Section - Complete data
if apoe_type:
risk_color = Colors.GREEN if '0.6x' in apoe_risk or '1.0x' in apoe_risk else Colors.YELLOW if '2.6x' in apoe_risk else Colors.RED
print(f"{Colors.BOLD}🧠 APOE Type (rs429358={rs429358_gt} + rs7412={rs7412_gt}):{Colors.END}")
print(f" {Colors.BOLD}Type:{Colors.END} {Colors.BOLD}{apoe_type}{Colors.END}")
print(f" {Colors.BOLD}Alzheimer Risk:{Colors.END} {risk_color}{apoe_risk}{Colors.END} vs. average")
print(f" {Colors.BOLD}Assessment:{Colors.END} {apoe_description}\n")
if apoe_recommendations:
print(f"{Colors.BOLD}📋 Personalized Recommendations:{Colors.END}")
for rec in apoe_recommendations:
print(f" {rec}")
print()
# APOE Section - Incomplete data
elif rs429358_gt or rs7412_gt:
print(f"{Colors.BOLD}🧠 APOE Genotype (Incomplete Data):{Colors.END}")
if rs429358_gt and not rs7412_gt:
print(f" {Colors.YELLOW}⚠ Only rs429358 available ({rs429358_gt}) - missing rs7412{Colors.END}")
print(f" Cannot determine complete APOE type without both SNPs.")
if rs429358_gt == 'CC':
print(f" {Colors.RED}Note: CC indicates ε4/ε4 (highest risk) - consider follow-up testing{Colors.END}")
elif rs429358_gt in ['CT', 'TC']:
print(f" Note: You have one ε4 allele - could be ε2/ε4 or ε3/ε4 depending on rs7412")
else: # TT
print(f" Note: No ε4 allele - could be ε2/ε2, ε2/ε3, or ε3/ε3 depending on rs7412")
elif rs7412_gt and not rs429358_gt:
print(f" {Colors.YELLOW}⚠ Only rs7412 available ({rs7412_gt}) - missing rs429358{Colors.END}")
print(f" Cannot determine complete APOE type without both SNPs.")
if rs7412_gt == 'TT':
print(f" Note: You have TWO ε2 alleles - likely protective if rs429358 confirms")
elif rs7412_gt in ['CT', 'TC']:
print(f" Note: You have ONE ε2 allele - could be ε2/ε3 or ε2/ε4 depending on rs429358")
else: # CC
print(f" Note: No ε2 allele - could be ε3/ε3, ε3/ε4, or ε4/ε4 depending on rs429358")
print(f"\n {Colors.GRAY}Recommendation: Consider 23andMe, AncestryDNA, or clinical APOE testing{Colors.END}")
print(f" {Colors.GRAY}for complete genotype information.{Colors.END}\n")
# APOE Section - No data at all
else:
print(f"{Colors.BOLD}🧠 APOE Genotype:{Colors.END}")
print(f" {Colors.GRAY}⚠️ Data not available - neither rs429358 nor rs7412 found in your DNA file{Colors.END}")
print(f" {Colors.GRAY}APOE is the strongest genetic risk factor for Alzheimer's disease.{Colors.END}")
print(f"\n {Colors.GRAY}Recommendation: Consider 23andMe, AncestryDNA, or clinical APOE testing.{Colors.END}")
print(f" {Colors.GRAY}APOE testing is particularly important if you have family history of Alzheimer's.{Colors.END}\n")
# Combined interpretation
if foxo3_longevity and apoe_type:
print(f"{Colors.BOLD}🔬 Combined Profile:{Colors.END}")
if 'STRONG' in foxo3_longevity and 'ε4' in apoe_type:
print(f" {Colors.YELLOW}You have FOXO3 longevity genetics which may partially offset APOE ε4 risk.{Colors.END}")
print(f" {Colors.YELLOW}Focus on prevention strategies - your longevity genes give you time to benefit!{Colors.END}")
elif 'STRONG' in foxo3_longevity:
print(f" {Colors.GREEN}Excellent combination! Strong longevity genetics + favorable/normal cognitive aging profile.{Colors.END}")
elif 'ε2' in apoe_type:
print(f" {Colors.GREEN}Great cognitive aging protection from APOE ε2!{Colors.END}")
print()
print(f"{Colors.GRAY}{'─'*80}{Colors.END}\n")
HEALTH_LONGEVITY = LONGEVITY_COGNITIVE_AGING # Keep alias for backward compatibility
HEALTH_COGNITIVE = {
# Note: APOE is now in LONGEVITY_COGNITIVE_AGING section above for consolidated interpretation
# Working Memory & Executive Function
'rs4680_cognition': { # COMT Val158Met
'gene': 'COMT', 'condition': 'Working memory, executive function, attention',
'evidence': 'Val158Met - most studied cognitive SNP, validated across populations',
'AA': 'Met/Met - "Worrier" - better memory, attention, information processing under normal conditions',
'GA': 'Val/Met - intermediate cognitive performance',
'GG': 'Val/Val - "Warrior" - modest reduction in executive function, better under stress',
},
'rs1006737_cognition': { # CACNA1C
'gene': 'CACNA1C', 'condition': 'Working memory, prefrontal function',
'evidence': 'L-type calcium channel - validated in multiple studies',
'GG': 'Better working memory performance',
'AG': 'Intermediate working memory',
'AA': 'Impaired working memory, reduced prefrontal efficiency',
},
'rs1044396': { # CHRNA4
'gene': 'CHRNA4', 'condition': 'Attention, working memory, parietal cortex function',
'evidence': 'Nicotinic receptor - validated for attention and cognitive control',
'CC': 'Reduced parietal cortex activity during attention tasks',
'CT': 'Intermediate attention performance',
'TT': 'Robust parietal cortex activity, enhanced attention and working memory',
},
# Memory Performance
'rs17070145': { # KIBRA
'gene': 'KIBRA', 'condition': 'Episodic memory performance',
'evidence': 'Replicated association with memory recall',
'CC': 'Reduced memory abilities',
'CT': 'Increased memory performance (T allele +24% recall)',
'TT': 'Greatly increased memory performance',
},
'rs6265_cognition': { # BDNF
'gene': 'BDNF', 'condition': 'Learning, memory consolidation',
'evidence': 'Val66Met affects learning and neuroplasticity',
'GG': 'Val/Val - better learning, memory, neuroplasticity',
'GA': 'Val/Met - impaired motor learning, reduced BDNF secretion',
'AA': 'Met/Met - reduced learning efficiency, faster cognitive decline with age',
},
# Cognitive Decline & Alzheimer's Risk
'rs11136000': { # CLU (Clusterin)
'gene': 'CLU', 'condition': 'Cognitive decline, memory, Alzheimer\'s disease',
'evidence': '2nd strongest AD risk SNP after APOE - validated in multiple GWAS',
'TT': 'Lower risk of cognitive decline, better memory maintenance',
'CT': 'Intermediate risk - faster memory decline in presymptomatic stages',
'CC': 'Higher risk - accelerated cognitive decline, poorer memory scores, faster MCI→AD progression',
},
'rs9331896': { # CLU (Clusterin)
'gene': 'CLU', 'condition': 'Cognitive decline, hippocampal function',
'evidence': 'Strongest CLU SNP for AD risk - affects CLU expression in hippocampus',
'CC': 'Lower Alzheimer\'s risk, better memory maintenance (protective)',
'CT': 'Intermediate risk of cognitive decline (OR 1.18)',
'TT': 'Higher AD risk, faster presymptomatic memory decline, altered hippocampal CLU expression',
},
# Other markers
'rs363050': { # SNAP25
'gene': 'SNAP25', 'condition': 'Intelligence, IQ',
'evidence': 'Original findings failed to replicate - interpret with caution',
'AA': 'Original (unreplicated) study suggested +2.8 PIQ vs GG',
'AG': 'Intermediate (unreplicated findings)',
'GG': 'Reference genotype (note: original IQ findings did not replicate)',
},
}
HEALTH_PAIN = {
'rs6746030': { # SCN9A
'gene': 'SCN9A', 'condition': 'Pain sensitivity',
'evidence': 'Sodium channel - pain perception',
'GG': 'Normal pain sensitivity',
'GA': 'Reduced pain sensitivity',
'AA': 'Lower pain sensitivity',
},
'rs6267': { # COMT
'gene': 'COMT', 'condition': 'Schizophrenia associations (research mixed/inconclusive)',
'evidence': 'COMT variant - some studies suggest schizophrenia association, others find no link',
'GG': 'Common genotype (~83% frequency, research on schizophrenia association is inconclusive)',
'GT': 'Less common (~16%, TT genotype codes for similar enzyme activity as GT)',
'TT': 'Rare genotype (~1%, research on schizophrenia association is inconclusive)',
},
'rs1799971_pain': { # OPRM1
'gene': 'OPRM1', 'condition': 'Pain, opioid response',
'evidence': 'Opioid receptor efficacy',
'AA': 'Normal pain response, better opioid effect',
'AG': 'Intermediate',
'GG': 'Higher pain sensitivity, reduced opioid efficacy',
},
}
HEALTH_ADDICTION = {
'rs1800497_addiction': { # DRD2
'gene': 'DRD2', 'condition': 'Addiction susceptibility',
'evidence': 'Reward deficiency syndrome',
'CC': 'Normal D2 receptors',
'CT': 'Reduced receptors - addiction risk',
'TT': 'Low D2 - higher addiction/substance abuse risk',
},
'rs279858': { # GABRA2
'gene': 'GABRA2', 'condition': 'Alcohol dependence',
'evidence': 'Alcoholism association',
'AA': 'Lower alcoholism risk',
'AG': 'Elevated risk (slower alcohol response)',
'GG': 'Higher alcoholism risk (slower alcohol response)',
},
'rs2023239': { # CNR1
'gene': 'CNR1', 'condition': 'Cannabis dependence',
'evidence': 'Cannabinoid receptor',
'CC': 'Typical',
'CT': 'Moderate risk',
'TT': 'Higher cannabis dependence risk',
},
'rs806378': { # CNR1
'gene': 'CNR1', 'condition': 'Substance dependence',
'evidence': 'Addiction studies',
'CC': 'Lower risk',
'CT': 'Moderate',
'TT': 'Elevated addiction risk',
},
'rs324420_addiction': { # FAAH
'gene': 'FAAH', 'condition': 'Substance use disorder',
'evidence': 'Endocannabinoid system',
'CC': 'Normal risk',
'CA': 'Intermediate',
'AA': 'Significantly increased substance use disorder risk',
},
}
# ============================================================================
# MOOD, MENTAL HEALTH & NEUROTRANSMITTERS
# Comprehensive collection
# ============================================================================
MOOD_SEROTONIN = {
'rs6295': { # HTR1A
'gene': 'HTR1A', 'system': 'Serotonin 1A receptor',
'effect': 'Depression, anxiety, SSRI response',
'CC': 'Normal receptor function',
'CG': 'Altered SSRI response',
'GG': 'Lower expression, depression/anxiety risk',
},
'rs6313': { # HTR2A
'gene': 'HTR2A', 'system': 'Serotonin 2A receptor',
'effect': 'SSRI response, OCD, psychedelics',
'GG': 'Better SSRI response',
'GA': 'Intermediate',
'AA': 'Poorer SSRI response',
},
'rs7997012': { # HTR2A
'gene': 'HTR2A', 'system': 'Serotonin 2A',
'effect': 'Depression treatment response (citalopram)',
'AA': '18% better response to citalopram',
'AG': 'Normal response',
'GG': '18% worse response to citalopram',
},
'rs6311': { # HTR2A promoter
'gene': 'HTR2A', 'system': 'Serotonin 2A expression',
'effect': 'SSRI sexual dysfunction, suicide risk',
'TT': 'Normal (lower) risk of SSRI sexual dysfunction, protective against suicide',
'CT': 'Normal risk',
'CC': '3.6x risk of sexual dysfunction on SSRIs, higher suicide risk',
},
'rs4570625': { # TPH2
'gene': 'TPH2', 'system': 'Serotonin synthesis',
'effect': 'Anxiety-related traits, placebo response',
'TT': 'Normal',
'GT': 'Normal',
'GG': 'Higher anxiety-related traits, greater placebo response',
},
'rs25531': { # SLC6A4 (5-HTTLPR)
'gene': 'SLC6A4', 'system': 'Serotonin transporter',
'effect': 'Stress resilience, life satisfaction',
'GG': 'More resilient to stress, optimistic, higher life satisfaction',
'AG': 'Intermediate',
'AA': 'Lower serotonin, slightly less happy, may need more support',
},
'rs25532': { # SLC6A4
'gene': 'SLC6A4', 'system': 'Serotonin transporter',
'effect': 'Regulatory region, OCD association',
'TT': 'Normal',
'CT': 'May be part of OCD haplotype',
'CC': 'Higher expressing allele, may be part of OCD haplotype',
},
}
MOOD_DOPAMINE = {
'rs4680': { # COMT Val158Met
'gene': 'COMT', 'system': 'Dopamine clearance',
'effect': 'Warrior vs Worrier, stress response',
'GG': 'Val/Val - fast clearance (Warrior, stress-resilient)',
'GA': 'Val/Met - intermediate',
'AA': 'Met/Met - slow clearance (Worrier, anxious, better cognition)',
},
'rs6269': { # COMT
'gene': 'COMT', 'system': 'Dopamine metabolism',
'effect': 'Pain sensitivity, anxiety',
'AA': 'Lower COMT activity',
'AG': 'Intermediate',
'GG': 'Higher activity',
},
'rs4633': { # COMT
'gene': 'COMT', 'system': 'Dopamine',
'effect': 'Endometrial cancer risk (affects COMT expression)',
'CC': 'Normal cancer risk (magnitude 0)',
'CT': 'Higher endometrial cancer risk (magnitude 2)',
'TT': 'Higher endometrial cancer risk (magnitude 2, OR 2.39)',
},
'rs165599': { # COMT region
'gene': 'COMT', 'system': 'Dopamine',
'effect': 'Bipolar, schizophrenia',
'GG': 'Elevated risk (magnitude 1.5)',
'GA': 'Moderate risk (magnitude 1)',
'AA': 'Lower risk (magnitude 0)',
},
'rs1800497': { # ANKK1/DRD2 (Taq1A)
'gene': 'DRD2', 'system': 'Dopamine D2 receptor',
'effect': 'Reward sensitivity, addiction',
'CC': 'Normal D2 density',
'CT': 'Reduced receptor (reward deficiency)',
'TT': 'Lower D2 (addiction/impulse risk)',