Last active
February 9, 2026 13:29
-
-
Save iamacarpet/2e94fb983c4c927e7de3fe034cb4139e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "os" | |
| "sort" | |
| "strings" | |
| ) | |
| const ( | |
| ColorReset = "\033[0m" | |
| ColorRed = "\033[31m" | |
| ColorGreen = "\033[32m" | |
| ColorYellow = "\033[33m" | |
| ) | |
| // Proxy defines a fallback SNP for the v5 chip | |
| type Proxy struct { | |
| RSID string | |
| RiskAllele string | |
| Priority int | |
| } | |
| // RiskMarker defines the metadata and nutritional logic for a specific SNP | |
| type RiskMarker struct { | |
| RSID string | |
| Gene string | |
| Area string | |
| RiskAllele string // Aligned to Forward (+) Strand for 23andMe v5 | |
| Description string | |
| RiskAdvice string // Recommendation if risk is found | |
| BaselineAdvice string // Recommendation if genotype is normal | |
| Proxies []Proxy | |
| } | |
| // CategoryScore tracks the cumulative risk per metabolic module | |
| type CategoryScore struct { | |
| Name string | |
| Score float64 | |
| MarkersFound int | |
| } | |
| // ResultRow stores findings for the final display | |
| type ResultRow struct { | |
| Marker RiskMarker | |
| Genotype string | |
| Impact string | |
| Recommendation string | |
| UsedProxy bool | |
| ProxyRSID string | |
| MatchPriority int | |
| } | |
| func main() { | |
| if len(os.Args) < 2 { | |
| fmt.Println("Usage: go run nutrigenetics_cli.go <path_to_23andme_v5.txt>") | |
| return | |
| } | |
| filePath := os.Args[1] | |
| // ------------------------------------------------------------------------- | |
| // NUTRIGENETICS DATABASE (Validated for Forward Strand Orientations) | |
| // ------------------------------------------------------------------------- | |
| markers := map[string]RiskMarker{ | |
| // --- MODULE A: METHYLATION & TRANSSULFURATION --- | |
| "rs1051266": { | |
| RSID: "rs1051266", Gene: "SLC19A1", Area: "Methylation", RiskAllele: "T", | |
| Description: "RFC1: Reduced Folate Carrier (A80G).", | |
| RiskAdvice: "Impaired transport of folate into cells. Keep blood folate high normal.", | |
| BaselineAdvice: "Cellular folate transport is efficient.", | |
| }, | |
| "rs1801133": { | |
| RSID: "rs1801133", Gene: "MTHFR", Area: "Methylation", RiskAllele: "A", | |
| Description: "C677T: Reduced folate conversion (A on Forward Strand).", | |
| RiskAdvice: "Use L-5-MTHF (Active Folate) & Riboflavin (B2). Avoid synthetic Folic Acid.", | |
| BaselineAdvice: "Methylation efficiency likely normal. Standard dietary folate sufficient.", | |
| }, | |
| "rs1801131": { | |
| RSID: "rs1801131", Gene: "MTHFR", Area: "Methylation", RiskAllele: "G", | |
| Description: "A1298C: BH4/Neurotransmitter impact (G on Forward Strand).", | |
| RiskAdvice: "Support BH4 with Methylfolate. Monitor neurotransmitter balance (Mood/Focus).", | |
| BaselineAdvice: "Folate cycle efficiency for BH4 recycling is likely normal.", | |
| }, | |
| "rs1979277": { | |
| RSID: "rs1979277", Gene: "SHMT1", Area: "Methylation", RiskAllele: "T", | |
| Description: "C1420T: Folate diversion for DNA synthesis vs Methylation.", | |
| RiskAdvice: "Folate may be diverted from methylation. Ensure adequate Folate/B12 intake.", | |
| BaselineAdvice: "Folate pathway priority is balanced.", | |
| }, | |
| "rs2236225": { | |
| RSID: "rs2236225", Gene: "MTHFD1", Area: "Methylation", RiskAllele: "A", | |
| Description: "G1958A: Folate cycle impairment & Choline risk.", | |
| RiskAdvice: "Increased demand for Choline to back up the folate cycle.", | |
| BaselineAdvice: "Folate enzyme function normal.", | |
| }, | |
| "rs1805087": { | |
| RSID: "rs1805087", Gene: "MTR", Area: "Methylation", RiskAllele: "G", | |
| Description: "A2756G: High B12 turnover.", | |
| RiskAdvice: "Requires high functional B12 (Methylcobalamin) due to high turnover rate.", | |
| BaselineAdvice: "B12 recycling efficiency appears normal.", | |
| }, | |
| "rs1801394": { | |
| RSID: "rs1801394", Gene: "MTRR", Area: "Methylation", RiskAllele: "G", | |
| Description: "A66G: Reduced B12 recycling.", | |
| RiskAdvice: "Support with B12 (Adenosyl/Methyl mix) to assist recycling loop.", | |
| BaselineAdvice: "Enzyme function for B12 maintenance is likely optimal.", | |
| }, | |
| "rs617219": { | |
| RSID: "rs617219", Gene: "GNMT", Area: "Methylation", RiskAllele: "C", | |
| Description: "Methylation balance (SAMe regulation).", | |
| RiskAdvice: "May have difficulty regulating SAMe levels. Avoid excessive methionine.", | |
| BaselineAdvice: "SAMe regulation appears normal.", | |
| Proxies: []Proxy{ | |
| {RSID: "rs10948059", RiskAllele: "C", Priority: 2}, // v5 Proxy | |
| {RSID: "rs4613", RiskAllele: "T", Priority: 3}, // High Priority v5 | |
| {RSID: "rs10948060", RiskAllele: "A", Priority: 4}, // Alternative v5 | |
| {RSID: "rs9462856", RiskAllele: "T", Priority: 5}, // v5 chr6 proxy (T risk assumption) | |
| {RSID: "rs16896177", RiskAllele: "T", Priority: 6}, // v5 chr6 proxy | |
| }, | |
| }, | |
| "rs3741049": { | |
| RSID: "rs3741049", Gene: "BHMT", Area: "Methylation", RiskAllele: "A", | |
| Description: "R239Q: Homocysteine 'Short Cut' (Often labeled ACAT1-02).", | |
| RiskAdvice: "Support the 'short-cut' pathway with TMG (Betaine) & Choline.", | |
| BaselineAdvice: "Betaine-dependent homocysteine remethylation is efficient.", | |
| Proxies: []Proxy{ | |
| {RSID: "rs567754", RiskAllele: "T", Priority: 2}, // v5 Proxy | |
| }, | |
| }, | |
| "rs234706": { | |
| RSID: "rs234706", Gene: "CBS", Area: "Methylation", RiskAllele: "A", | |
| Description: "C699T: CBS Upregulation (T allele = A Forward).", | |
| RiskAdvice: "Upregulated enzyme drains methyl groups. Limit high-sulfur foods. Supplement Molybdenum.", | |
| BaselineAdvice: "Transsulfuration pathway speed is normal.", | |
| }, | |
| "rs819147": { | |
| RSID: "rs819147", Gene: "AHCY", Area: "Methylation", RiskAllele: "C", | |
| Description: "SAH Hydrolase efficiency.", | |
| RiskAdvice: "Inefficient clearance of SAH (inhibitor). Regulate protein intake.", | |
| BaselineAdvice: "SAH clearance is optimal.", | |
| Proxies: []Proxy{ | |
| {RSID: "rs41312290", RiskAllele: "C", Priority: 2}, | |
| {RSID: "rs13043906", RiskAllele: "T", Priority: 3}, // v5 Proxy | |
| {RSID: "rs819145", RiskAllele: "C", Priority: 4}, // Deep Proxy | |
| {RSID: "rs819134", RiskAllele: "G", Priority: 5}, // Deep Proxy | |
| {RSID: "rs11905041", RiskAllele: "T", Priority: 6}, // v5 chr20 proxy (T risk assumption) | |
| {RSID: "rs9503", RiskAllele: "T", Priority: 7}, // v5 chr20 proxy | |
| }, | |
| }, | |
| "rs705343": { | |
| RSID: "rs705343", Gene: "SUOX", Area: "Methylation", RiskAllele: "A", | |
| Description: "Sulfite Oxidase efficiency (Sulfur sensitivity).", | |
| RiskAdvice: "Monitor sulfite intake (wine, dried fruit). Molybdenum is key cofactor.", | |
| BaselineAdvice: "Sulfite detoxification is likely efficient.", | |
| Proxies: []Proxy{ | |
| {RSID: "rs1231629", RiskAllele: "G", Priority: 2}, // v5 Proxy | |
| {RSID: "rs773115", RiskAllele: "A", Priority: 3}, // Deep Proxy | |
| {RSID: "rs705700", RiskAllele: "C", Priority: 4}, // v5 chr12 proxy (C risk assumption) | |
| {RSID: "rs705702", RiskAllele: "T", Priority: 5}, // v5 chr12 proxy | |
| {RSID: "rs772922", RiskAllele: "T", Priority: 6}, // v5 chr12 proxy | |
| {RSID: "rs10876864", RiskAllele: "T", Priority: 7}, // v5 chr12 proxy | |
| }, | |
| }, | |
| // --- MODULE B: NEUROTRANSMITTER & BRAIN HEALTH --- | |
| "rs4680": { | |
| RSID: "rs4680", Gene: "COMT", Area: "Neurotransmitter", RiskAllele: "A", | |
| Description: "Val158Met: Slow COMT (Worrier).", | |
| RiskAdvice: "Avoid high-dose methyl donors. Magnesium is critical. Limit caffeine.", | |
| BaselineAdvice: "Dopamine clearance is efficient (Warrior/Fast-acting).", | |
| }, | |
| "rs6323": { | |
| RSID: "rs6323", Gene: "MAO-A", Area: "Neurotransmitter", RiskAllele: "T", | |
| Description: "R297R: Low Activity (T allele).", | |
| RiskAdvice: "Low activity: Monitor high-tyramine foods (aged cheese, wine) to avoid migraines.", | |
| BaselineAdvice: "Monoamine breakdown is optimal (High Activity).", | |
| Proxies: []Proxy{ | |
| {RSID: "rs1137070", RiskAllele: "T", Priority: 2}, // T is associated with Low Activity | |
| }, | |
| }, | |
| "rs3027451": { | |
| RSID: "rs3027451", Gene: "MAO-B", Area: "Neurotransmitter", RiskAllele: "A", | |
| Description: "Dopamine breakdown efficiency.", | |
| RiskAdvice: "Altered dopamine breakdown. Monitor for focus/impulsivity issues.", | |
| BaselineAdvice: "MAO-B function likely normal.", | |
| Proxies: []Proxy{ | |
| {RSID: "rs3027452", RiskAllele: "G", Priority: 2}, // v5 Proxy | |
| {RSID: "rs3027448", RiskAllele: "T", Priority: 3}, // Deep Proxy | |
| }, | |
| }, | |
| "rs3749032": { | |
| RSID: "rs3749032", Gene: "GAD1", Area: "Neurotransmitter", RiskAllele: "C", | |
| Description: "Glutamate to GABA conversion defect (Risk Allele C).", | |
| RiskAdvice: "Support with P5P (B6) and Magnesium. Avoid MSG/Excess glutamates.", | |
| BaselineAdvice: "GABA synthesis pathways likely sufficient.", | |
| Proxies: []Proxy{ | |
| {RSID: "rs2241165", RiskAllele: "C", Priority: 2}, // LD Partner (Risk C) | |
| {RSID: "rs3749034", RiskAllele: "C", Priority: 3}, // LD Partner (Risk C) | |
| }, | |
| }, | |
| "rs11558538": { | |
| RSID: "rs11558538", Gene: "HNMT", Area: "Neurotransmitter", RiskAllele: "T", | |
| Description: "Brain Histamine Clearance (T=Ile/Low Activity).", | |
| RiskAdvice: "Slower brain histamine breakdown. May cause insomnia/anxiety. Avoid late-night histamine.", | |
| BaselineAdvice: "Central nervous system histamine clearance is efficient.", | |
| Proxies: []Proxy{ | |
| {RSID: "rs11558539", RiskAllele: "T", Priority: 2}, // v5 Proxy | |
| {RSID: "rs1050969", RiskAllele: "T", Priority: 3}, // Deep Proxy | |
| {RSID: "rs1580111", RiskAllele: "T", Priority: 4}, // v5 chr2 proxy (T risk assumption) | |
| {RSID: "rs62168714", RiskAllele: "A", Priority: 5}, // v5 chr2 proxy | |
| }, | |
| }, | |
| "rs6265": { | |
| RSID: "rs6265", Gene: "BDNF", Area: "Neurotransmitter", RiskAllele: "A", | |
| Description: "Brain-Derived Neurotrophic Factor (Val66Met).", | |
| RiskAdvice: "Lower Neuroplasticity. Exercise is CRITICAL to boost BDNF. Manage stress actively.", | |
| BaselineAdvice: "BDNF secretion is optimal (Better short-term memory).", | |
| }, | |
| "rs1800497": { | |
| RSID: "rs1800497", Gene: "DRD2", Area: "Neurotransmitter", RiskAllele: "T", | |
| Description: "Taq1A: Dopamine Receptor Density (T = Low Receptors).", | |
| RiskAdvice: "Reward Deficiency. Higher risk of sugar cravings/addiction. Support healthy dopamine.", | |
| BaselineAdvice: "Dopamine receptor density is normal.", | |
| }, | |
| // --- MODULE C: DETOX & CELLULAR HEALTH --- | |
| "rs1695": { | |
| RSID: "rs1695", Gene: "GSTP1", Area: "Detoxification", RiskAllele: "G", | |
| Description: "Reduced Phase II detoxification.", | |
| RiskAdvice: "Upregulate with Sulforaphane. Prioritize organic produce.", | |
| BaselineAdvice: "Phase II toxin conjugation is likely efficient.", | |
| }, | |
| "rs4880": { | |
| RSID: "rs4880", Gene: "SOD2", Area: "Detoxification", RiskAllele: "A", | |
| Description: "Mitochondrial defense defect (Ala16Val, Val=T).", | |
| RiskAdvice: "Ensure Manganese intake and high dietary antioxidants (Vit E, Berries).", | |
| BaselineAdvice: "Mitochondrial superoxide defense is normal.", | |
| }, | |
| "rs1050450": { | |
| RSID: "rs1050450", Gene: "GPX1", Area: "Detoxification", RiskAllele: "T", | |
| Description: "Reduced H2O2 scavenging (Pro198Leu, Leu=T).", | |
| RiskAdvice: "Critical need for Selenium (1-2 Brazil nuts/day) to support glutathione peroxidase.", | |
| BaselineAdvice: "Peroxide scavenging capability is baseline.", | |
| Proxies: []Proxy{ | |
| {RSID: "rs1800668", RiskAllele: "T", Priority: 2}, | |
| {RSID: "rs3811699", RiskAllele: "G", Priority: 3}, | |
| {RSID: "rs17650792", RiskAllele: "A", Priority: 4}, | |
| {RSID: "rs3448", RiskAllele: "T", Priority: 5}, // v5 Proxy | |
| }, | |
| }, | |
| "rs1799983": { | |
| RSID: "rs1799983", Gene: "NOS3", Area: "Detoxification", RiskAllele: "T", | |
| Description: "Glu298Asp: Nitric Oxide production (T=Asp).", | |
| RiskAdvice: "Support blood flow with Nitrates (Beets/Arugula) and Citrulline.", | |
| BaselineAdvice: "Nitric oxide synthase function likely normal.", | |
| Proxies: []Proxy{ | |
| {RSID: "rs2070744", RiskAllele: "C", Priority: 2}, // v5 Proxy (T-786C, C is risk) | |
| {RSID: "rs3918226", RiskAllele: "T", Priority: 3}, // Deep Proxy | |
| {RSID: "rs7830", RiskAllele: "C", Priority: 4}, // Deep Proxy | |
| }, | |
| }, | |
| // --- MODULE D: VITAMIN METABOLISM --- | |
| "rs4654748": { | |
| RSID: "rs4654748", Gene: "NBPF3 (ALPL)", Area: "Vitamin Metabolism", RiskAllele: "T", | |
| Description: "Rapid B6 clearance (Low serum B6).", | |
| RiskAdvice: "Body clears B6 rapidly. Critical cofactor for CBS/GAD1. Supplement P5P.", | |
| BaselineAdvice: "Vitamin B6 retention is likely normal.", | |
| }, | |
| "rs12934922": { | |
| RSID: "rs12934922", Gene: "BCMO1", Area: "Vitamin Metabolism", RiskAllele: "T", | |
| Description: "Poor Beta-Carotene conversion.", | |
| RiskAdvice: "Requires pre-formed Vitamin A (Retinol) or Retinyl Palmitate.", | |
| BaselineAdvice: "Effective converter of plant-based carotenes to active Vitamin A.", | |
| }, | |
| "rs2228570": { | |
| RSID: "rs2228570", Gene: "VDR (FokI)", Area: "Vitamin Metabolism", RiskAllele: "A", | |
| Description: "FokI: Vitamin D receptor efficiency.", | |
| RiskAdvice: "Aim for upper optimal blood range (60-80 ng/mL). Supplement D3 + K2.", | |
| BaselineAdvice: "Vitamin D receptor sensitivity is likely normal.", | |
| Proxies: []Proxy{ | |
| {RSID: "rs1544410", RiskAllele: "A", Priority: 2}, | |
| }, | |
| }, | |
| "rs731236": { | |
| RSID: "rs731236", Gene: "VDR (TaqI)", Area: "Vitamin Metabolism", RiskAllele: "C", | |
| Description: "TaqI: Vitamin D receptor stability (t allele = C).", | |
| RiskAdvice: "Secondary VDR impact. Reinforces need for optimal D3 levels.", | |
| BaselineAdvice: "VDR TaqI status is optimal.", | |
| }, | |
| "rs33972313": { | |
| RSID: "rs33972313", Gene: "SLC23A1", Area: "Vitamin Metabolism", RiskAllele: "A", | |
| Description: "Increased renal excretion of Vitamin C.", | |
| RiskAdvice: "Require higher daily Vitamin C intake to maintain plasma saturation.", | |
| BaselineAdvice: "Vitamin C retention is likely normal.", | |
| Proxies: []Proxy{ | |
| {RSID: "rs33972312", RiskAllele: "A", Priority: 2}, | |
| }, | |
| }, | |
| "rs1801198": { | |
| RSID: "rs1801198", Gene: "TCN2", Area: "Vitamin Metabolism", RiskAllele: "G", | |
| Description: "Pro259Arg: Transcobalamin II transport (G=Arg).", | |
| RiskAdvice: "Low B12 transport efficiency. Keep blood B12 high (>600 pg/mL).", | |
| BaselineAdvice: "B12 cellular transport is efficient.", | |
| Proxies: []Proxy{ | |
| {RSID: "rs9606756", RiskAllele: "G", Priority: 2}, // v5 Proxy | |
| }, | |
| }, | |
| // --- MODULE E: METABOLIC REGULATION --- | |
| "rs7946": { | |
| RSID: "rs7946", Gene: "PEMT", Area: "Metabolic", RiskAllele: "A", | |
| Description: "Val54Met: Poor endogenous choline synthesis (G>A Forward).", | |
| RiskAdvice: "High dietary Choline non-negotiable (Egg yolks, Liver, Lecithin).", | |
| BaselineAdvice: "Endogenous choline production is functional. Follow RDA.", | |
| }, | |
| "rs12676": { | |
| RSID: "rs12676", Gene: "CHDH", Area: "Metabolic", RiskAllele: "T", | |
| Description: "Choline Dehydrogenase deficiency.", | |
| RiskAdvice: "Impaired Choline->Betaine conversion. Support with TMG.", | |
| BaselineAdvice: "Choline oxidation is normal.", | |
| Proxies: []Proxy{ | |
| {RSID: "rs893363", RiskAllele: "G", Priority: 2}, // v5 Proxy | |
| }, | |
| }, | |
| "rs429358": { | |
| RSID: "rs429358", Gene: "APOE-e4", Area: "Metabolic", RiskAllele: "C", | |
| Description: "Primary allele for e4 status (AD/CVD risk).", | |
| RiskAdvice: "Strictly limit saturated fat (<20g/day). Avoid alcohol. High DHA/EPA.", | |
| BaselineAdvice: "Standard guidelines for saturated fat and lifestyle apply.", | |
| }, | |
| "rs9939609": { | |
| RSID: "rs9939609", Gene: "FTO", Area: "Metabolic", RiskAllele: "A", | |
| Description: "Higher Ghrelin/lower satiety.", | |
| RiskAdvice: "High-protein breakfasts to curb ghrelin. Focus on high-volume foods.", | |
| BaselineAdvice: "Satiety signaling is likely functional.", | |
| }, | |
| "rs10496731": { | |
| RSID: "rs10496731", Gene: "ACAT1", Area: "Metabolic", RiskAllele: "T", | |
| Description: "Lipid metabolism/Cholesterol balance.", | |
| RiskAdvice: "Monitor lipid panel closely. Maintain healthy weight.", | |
| BaselineAdvice: "ACAT1 function likely normal.", | |
| Proxies: []Proxy{ | |
| {RSID: "rs11887534", RiskAllele: "T", Priority: 2}, // v5 Proxy | |
| {RSID: "rs1049673", RiskAllele: "C", Priority: 3}, // Deep Proxy | |
| {RSID: "rs2234997", RiskAllele: "C", Priority: 4}, // v5 chr11 proxy (C risk assumption) | |
| {RSID: "rs3218707", RiskAllele: "G", Priority: 5}, // v5 chr11 proxy | |
| }, | |
| }, | |
| "rs225014": { | |
| RSID: "rs225014", Gene: "DIO2", Area: "Metabolic", RiskAllele: "C", | |
| Description: "Thyroid Deiodinase 2 (Thr92Ala).", | |
| RiskAdvice: "Poor T4->T3 conversion. Requires Selenium/Zinc. Test Free T3.", | |
| BaselineAdvice: "Thyroid hormone activation is efficient.", | |
| }, | |
| "rs4343": { | |
| RSID: "rs4343", Gene: "ACE", Area: "Metabolic", RiskAllele: "G", | |
| Description: "ACE Del/Ins Proxy (G = Deletion/High ACE).", | |
| RiskAdvice: "Salt Sensitivity. Higher blood pressure response to sodium.", | |
| BaselineAdvice: "Normal blood pressure response to salt.", | |
| }, | |
| "rs1815739": { | |
| RSID: "rs1815739", Gene: "ACTN3", Area: "Metabolic", RiskAllele: "T", | |
| Description: "Muscle Type (T = X allele/Endurance).", | |
| RiskAdvice: "Lack of explosive fast-twitch fiber. Advantage: Endurance. Training: High volume.", | |
| BaselineAdvice: "Sprinter/Power genotype (Functional ACTN3). Advantage: Power/Hypertrophy.", | |
| }, | |
| // --- MODULE F: SYSTEMIC INFLAMMATION & IRON --- | |
| "rs1800795": { | |
| RSID: "rs1800795", Gene: "IL-6", Area: "Systemic Health", RiskAllele: "G", | |
| Description: "Interleukin-6 (Pro-inflammatory G allele).", | |
| RiskAdvice: "Higher baseline inflammation. Prioritize Omega-3s & Mediterranean diet.", | |
| BaselineAdvice: "Normal inflammatory cytokine response.", | |
| }, | |
| "rs1800629": { | |
| RSID: "rs1800629", Gene: "TNF-a", Area: "Systemic Health", RiskAllele: "A", | |
| Description: "Tumor Necrosis Factor alpha (High secretor).", | |
| RiskAdvice: "Hyper-inflammatory response. Avoid inflammatory oils (seed oils).", | |
| BaselineAdvice: "Normal TNF-alpha secretion.", | |
| }, | |
| "rs1800562": { | |
| RSID: "rs1800562", Gene: "HFE (C282Y)", Area: "Systemic Health", RiskAllele: "A", | |
| Description: "Hemochromatosis Type 1 (Major Risk).", | |
| RiskAdvice: "Iron Overload Risk. AVOID Iron supplements/Vitamin C with meat. Monitor Ferritin.", | |
| BaselineAdvice: "No major genetic risk for iron overload.", | |
| }, | |
| "rs1799945": { | |
| RSID: "rs1799945", Gene: "HFE (H63D)", Area: "Systemic Health", RiskAllele: "G", | |
| Description: "Hemochromatosis (Minor Risk).", | |
| RiskAdvice: "Mild iron loading risk. Monitor Ferritin levels annually.", | |
| BaselineAdvice: "Iron regulation likely normal.", | |
| }, | |
| // --- MODULE G: FOOD SENSITIVITIES & GUT --- | |
| "rs10156191": { | |
| RSID: "rs10156191", Gene: "AOC1 (DAO)", Area: "Sensitivities", RiskAllele: "T", | |
| Description: "Gut Histamine Clearance (T=Met/Low Activity).", | |
| RiskAdvice: "Histamine Intolerance risk. Limit aged foods (wine, cheese). Use DAO enzymes.", | |
| BaselineAdvice: "Gut histamine breakdown is efficient.", | |
| Proxies: []Proxy{ | |
| {RSID: "rs2052129", RiskAllele: "T", Priority: 2}, // v5 Proxy (T is low activity) | |
| {RSID: "rs1049793", RiskAllele: "A", Priority: 3}, // v5 Proxy | |
| }, | |
| }, | |
| "rs601338": { | |
| RSID: "rs601338", Gene: "FUT2", Area: "Sensitivities", RiskAllele: "A", | |
| Description: "Secretor Status (A = Non-Secretor).", | |
| RiskAdvice: "Non-Secretor: Low Bifido bacteria. Requires probiotics/prebiotics. Low Norovirus risk.", | |
| BaselineAdvice: "Secretor: Good gut flora scaffolding. Higher B12 absorption.", | |
| }, | |
| "rs4988235": { | |
| RSID: "rs4988235", Gene: "MCM6", Area: "Sensitivities", RiskAllele: "C", | |
| Description: "Lactase Non-persistence (C = Intolerant).", | |
| RiskAdvice: "Likely Lactose Intolerant. Consider enzyme support or dairy elimination.", | |
| BaselineAdvice: "Likely Lactase Persistent (Tolerant).", | |
| }, | |
| "rs762551": { | |
| RSID: "rs762551", Gene: "CYP1A2", Area: "Sensitivities", RiskAllele: "C", | |
| Description: "Slow caffeine metabolizer.", | |
| RiskAdvice: "Limit to 1-2 cups of coffee early in day. Avoid caffeine after 12 PM.", | |
| BaselineAdvice: "Fast metabolizer. Standard caffeine tolerance.", | |
| }, | |
| "rs2395185": { | |
| RSID: "rs2395185", Gene: "HLA-DQ2.5", Area: "Sensitivities", RiskAllele: "G", | |
| Description: "Gluten Sensitivity Tag (HLA Complex).", | |
| RiskAdvice: "High genetic risk for Celiac/Gluten Sensitivity. Monitor for autoimmune symptoms.", | |
| BaselineAdvice: "Standard risk for gluten sensitivity.", | |
| }, | |
| // --- MODULE H: NEURODIVERSITY EXTENSION --- | |
| // Vitamin D / VDR | |
| "rs10741657": { | |
| RSID: "rs10741657", Gene: "CYP2R1", Area: "Vitamin Metabolism", RiskAllele: "G", | |
| Description: "Vitamin D 25-hydroxylase (Conversion enzyme).", | |
| RiskAdvice: "Reduced conversion of D3 to active 25(OH)D. Supplement D3 and monitor levels.", | |
| BaselineAdvice: "Vitamin D conversion enzyme function is optimal.", | |
| }, | |
| // Omega-3 | |
| "rs174548": { | |
| RSID: "rs174548", Gene: "FADS1", Area: "Metabolic", RiskAllele: "C", | |
| Description: "Fatty Acid Desaturase 1 (D5D) activity.", | |
| RiskAdvice: "Poor conversion of plant Omega-3 (ALA) to EPA. Direct EPA/DHA intake (fish oil) required.", | |
| BaselineAdvice: "Conversion of plant-based Omega-3s is efficient.", | |
| }, | |
| "rs174575": { | |
| RSID: "rs174575", Gene: "FADS2", Area: "Metabolic", RiskAllele: "G", | |
| Description: "Fatty Acid Desaturase 2 (D6D) expression.", | |
| RiskAdvice: "Reduced synthesis of LC-PUFAs. Prioritize preformed Omega-3s (Algae/Fish Oil).", | |
| BaselineAdvice: "Desaturase enzyme expression is normal.", | |
| }, | |
| // Oxytocin | |
| "rs53576": { | |
| RSID: "rs53576", Gene: "OXTR", Area: "Neurotransmitter", RiskAllele: "A", | |
| Description: "Oxytocin Receptor: Social bonding & stress buffering.", | |
| RiskAdvice: "Reduced oxytocin sensitivity. Manage stress consciously. Social support is vital.", | |
| BaselineAdvice: "Oxytocin signaling for social bonding is optimal.", | |
| }, | |
| "rs2254298": { | |
| RSID: "rs2254298", Gene: "OXTR", Area: "Neurotransmitter", RiskAllele: "A", | |
| Description: "Oxytocin Receptor: Associated with mood regulation.", | |
| RiskAdvice: "May benefit from stress-reduction techniques and strong social connections.", | |
| BaselineAdvice: "Receptor function likely normal.", | |
| }, "rs237885": { | |
| RSID: "rs237885", Gene: "OXTR", Area: "Neurodiversity", RiskAllele: "G", | |
| Description: "Oxytocin Receptor: Linked to social recognition & ASD.", | |
| RiskAdvice: "Associated with social cognitive changes. Early social skills intervention can be beneficial.", | |
| BaselineAdvice: "Standard profile for this ASD-linked marker.", | |
| }, | |
| // SHANK3 | |
| "rs9616915": { | |
| RSID: "rs9616915", Gene: "SHANK3", Area: "Neurodiversity", RiskAllele: "T", | |
| Description: "Synaptic scaffolding protein (Post-synaptic density).", | |
| RiskAdvice: "Linked to synaptic function variances (ASD risk). Support w/ Zinc/Magnesium. Sensory modulation.", | |
| BaselineAdvice: "Synaptic scaffolding variation likely normal.", | |
| }, // Serotonin | |
| "rs4570625": { | |
| RSID: "rs4570625", Gene: "TPH2", Area: "Neurotransmitter", RiskAllele: "T", | |
| Description: "Tryptophan Hydroxylase 2: Rate-limiting brain serotonin synthesis.", | |
| RiskAdvice: "Associated with amygdala hyper-reactivity (Anxiety). Stress management is key.", | |
| BaselineAdvice: "Brain serotonin synthesis rate likely normal.", | |
| }, | |
| "rs2020933": { | |
| RSID: "rs2020933", Gene: "SLC6A4", Area: "Neurotransmitter", RiskAllele: "A", | |
| Description: "Serotonin Transporter (5-HTTLPR Proxy).", | |
| RiskAdvice: "Reduced serotonin recycling. Similar to Short allele. Exercise & sunlight boost serotonin.", | |
| BaselineAdvice: "Serotonin transport function likely normal.", | |
| }, | |
| // Dopamine Extended | |
| "rs6277": { | |
| RSID: "rs6277", Gene: "DRD2", Area: "Neurotransmitter", RiskAllele: "A", | |
| Description: "C939T: DRD2 availability/stability.", | |
| RiskAdvice: "May affect dopamine stability. Support with adequate Tyrosine/B6.", | |
| BaselineAdvice: "Dopamine receptor stability appears normal.", | |
| }, | |
| // --- MODULE I: ADHD & NEURODIVERSITY RISK --- | |
| // ADRA2A | |
| "rs1800544": { | |
| RSID: "rs1800544", Gene: "ADRA2A", Area: "Neurodiversity", RiskAllele: "G", | |
| Description: "Alpha-2A Adrenergic Receptor (Norepinephrine regulation).", | |
| RiskAdvice: "High Norepinephrine release. Linked to 'Fight or Flight' & ADHD. Prioritize sleep/stress mgmt.", | |
| BaselineAdvice: "Norepinephrine regulation is likely balanced.", | |
| }, | |
| // SNAP25 | |
| "rs3746544": { | |
| RSID: "rs3746544", Gene: "SNAP25", Area: "Neurodiversity", RiskAllele: "T", | |
| Description: "Synaptic membrane protein (Neurotransmitter release).", | |
| RiskAdvice: "Linked to hyperactivity/inattention. Support synapses with Omega-3 (DHA) & Zinc.", | |
| BaselineAdvice: "Synaptic vesicle fusion likely optimal.", | |
| }, | |
| // DBH | |
| "rs1611115": { | |
| RSID: "rs1611115", Gene: "DBH", Area: "Neurodiversity", RiskAllele: "C", | |
| Description: "Dopamine Beta-Hydroxylase (DA -> NE conversion).", | |
| RiskAdvice: "Fast conversion (Low Dopamine). May improve with Tyrosine (AM). Linked to inattention.", | |
| BaselineAdvice: "Dopamine to Norepinephrine conversion rate likely normal.", | |
| }, | |
| // --- MODULE J: EXPANDED NEURODIVERSITY (ADHD/ASD) --- | |
| "rs40184": { | |
| RSID: "rs40184", Gene: "SLC6A3", Area: "Neurodiversity", RiskAllele: "C", | |
| Description: "DAT1: Dopamine Transporter (3' UTR Proxy).", | |
| RiskAdvice: "High Dopamine Reuptake. Reduced dopamine availability in synapse. Support with Zinc, Magnesium, and steady protein intake.", | |
| BaselineAdvice: "Dopamine transport efficiency likely balanced.", | |
| }, | |
| "rs936461": { | |
| RSID: "rs936461", Gene: "DRD4", Area: "Neurodiversity", RiskAllele: "A", | |
| Description: "DRD4: Dopamine Receptor D4 Promoter.", | |
| RiskAdvice: "Linked to altered D4 expression. Monitor for novelty-seeking/distraction. Support dopamine balance.", | |
| BaselineAdvice: "D4 receptor expression levels likely typical.", | |
| }, | |
| "rs1387923": { | |
| RSID: "rs1387923", Gene: "NTRK2", Area: "Neurodiversity", RiskAllele: "A", | |
| Description: "TrkB: Receptor for BDNF (Growth Factor).", | |
| RiskAdvice: "Crucial for synaptic plasticity. Support BDNF with intense exercise, Omega-3s (DHA), and Zinc.", | |
| BaselineAdvice: "Neurotrophic signaling capacity appears normal.", | |
| }, | |
| "rs1843809": { | |
| RSID: "rs1843809", Gene: "TPH2", Area: "Neurodiversity", RiskAllele: "T", | |
| Description: "TPH2: Brain Serotonin Synthesis.", | |
| RiskAdvice: "Impacts serotonin synthesis. Support with sleep hygiene & stress reduction.", | |
| BaselineAdvice: "Serotonin synthesis capacity appears standard.", | |
| }, | |
| // --- MODULE K: IMMUNE HEALTH (GENERAL) --- | |
| "rs2240340": { | |
| RSID: "rs2240340", Gene: "PADI4", Area: "Autoimmunity", RiskAllele: "T", | |
| Description: "Peptidyl Arginine Deiminase 4 (RA Susceptibility).", | |
| RiskAdvice: "Increased risk for Rheumatoid Arthritis/Citrullination. Anti-inflammatory diet essential.", | |
| BaselineAdvice: "PADI4 function appears normal.", | |
| }, | |
| "rs7574865": { | |
| RSID: "rs7574865", Gene: "STAT4", Area: "Autoimmunity", RiskAllele: "T", | |
| Description: "Signal Transducer and Activator of Transcription 4.", | |
| RiskAdvice: "Linked to SLE/RA risk. Modulate Th1 immune response (Vitamin D3).", | |
| BaselineAdvice: "STAT4 signaling likely balanced.", | |
| }, | |
| "rs3212227": { | |
| RSID: "rs3212227", Gene: "IL12B", Area: "Autoimmunity", RiskAllele: "T", | |
| Description: "Interleukin 12B (Psoriasis/PsA Link).", | |
| RiskAdvice: "Higher risk for Psoriatic Arthritis. Support skin barrier & regulate IL-12/IL-23.", | |
| BaselineAdvice: "IL-12 pathway function normal.", | |
| }, | |
| "rs10484554": { | |
| RSID: "rs10484554", Gene: "HLA-C", Area: "Joint Health", RiskAllele: "T", | |
| Description: "Major Psoriasis Driver (PSORS1).", | |
| RiskAdvice: "Strong link to Skin Psoriasis & PsA. Aggressive skin/gut support recommended.", | |
| BaselineAdvice: "Standard HLA-C risk profile.", | |
| }, | |
| "rs4349859": { | |
| RSID: "rs4349859", Gene: "HLA-B27", Area: "Joint Health", RiskAllele: "A", | |
| Description: "HLA-B27 Tag (Ankylosing Spondylitis).", | |
| RiskAdvice: "Risk for AS/Reiter's. Low starch/KLEbsiella control diet often helpful.", | |
| BaselineAdvice: "Negative for primary HLA-B27 tag.", | |
| }, | |
| "rs13202464": { | |
| RSID: "rs13202464", Gene: "HLA-B27", Area: "Joint Health", RiskAllele: "G", | |
| Description: "HLA-B27 Secondary Tag.", | |
| RiskAdvice: "Secondary indicator for AS risk. Monitor joint/spine stiffness.", | |
| BaselineAdvice: "Negative for secondary HLA-B27 tag.", | |
| }, | |
| "rs660895": { | |
| RSID: "rs660895", Gene: "HLA-DRB1", Area: "Autoimmunity", RiskAllele: "A", | |
| Description: "Shared Epitope Tag (RA Risk).", | |
| RiskAdvice: "Associated with RA severity. Early joint protection strategies.", | |
| BaselineAdvice: "No Shared Epitope tag found.", | |
| }, | |
| "rs33980500": { | |
| RSID: "rs33980500", Gene: "TRAF3IP2", Area: "Joint Health", RiskAllele: "T", | |
| Description: "ACT1 (IL-17 Pathway).", | |
| RiskAdvice: "PsA/Psoriasis link. Th17 modulation required.", | |
| BaselineAdvice: "Normal IL-17 signaling regulation.", | |
| }, | |
| // --- Missing/Proxy Candidates (e.g. CVID) --- | |
| // Note directly: These often miss on v5 but are prioritized if found. | |
| "rs439888": { | |
| RSID: "rs439888", Gene: "MET", Area: "Neurodiversity", RiskAllele: "C", | |
| Description: "MET Promoter: Reduced MET gene expression.", | |
| RiskAdvice: "Linked to altered brain connectivity/ASD risk. Support oxidative balance (Vit C, Glutathione).", | |
| BaselineAdvice: "MET gene expression likely normal.", | |
| }, | |
| "rs6280": { | |
| RSID: "rs6280", Gene: "DRD3", Area: "Neurodiversity", RiskAllele: "T", | |
| Description: "Ser9Gly: Dopamine D3 Receptor Sensitivity.", | |
| RiskAdvice: "Gly (T) variant linked to Impulsivity/ADHD. Support dopamine balance (B6, Magnesium).", | |
| BaselineAdvice: "D3 receptor sensitivity likely standard.", | |
| }, | |
| "rs4606": { | |
| RSID: "rs4606", Gene: "RGS2", Area: "Neurodiversity", RiskAllele: "G", | |
| Description: "Regulator of G-protein Signaling 2 (Anxiety 'Brake').", | |
| RiskAdvice: "Reduced RGS2 expression linked to Anxiety/Panic. Prioritize stress mgmt & GABA support (Magnesium).", | |
| BaselineAdvice: "RGS2 expression for anxiety regulation likely normal.", | |
| }, | |
| // --- MODULE K: IMMUNE HEALTH (GENERAL) --- | |
| // MBL2 (Manose Binding Lectin) | |
| "rs1800450": { | |
| RSID: "rs1800450", Gene: "MBL2", Area: "Immune Health", RiskAllele: "A", | |
| Description: "Codon 54: MBL Deficiency Variant.", | |
| RiskAdvice: "Low levels of Mannose-Binding Lectin. Increased susceptibility to bacterial/yeast infections. Early antibiotic intervention often needed.", | |
| BaselineAdvice: "Normal MBL2 genotype (Codon 54).", | |
| }, | |
| // FCGR2A (IgG Binding) | |
| "rs1801274": { | |
| RSID: "rs1801274", Gene: "FCGR2A", Area: "Immune Health", RiskAllele: "G", | |
| Description: "H131R (R131 variant). IgG2 Binding Efficiency.", | |
| RiskAdvice: "Lower affinity for IgG2 (encapsulated bacteria). May clear infections slower.", | |
| BaselineAdvice: "Normal IgG binding efficiency (H131).", | |
| }, | |
| // IL-10 (Anti-inflammatory) | |
| "rs1800896": { | |
| RSID: "rs1800896", Gene: "IL10", Area: "Immune Health", RiskAllele: "T", | |
| Description: "IL-10 Promoter (-1082): Cytokine Production.", | |
| RiskAdvice: "Low IL-10 production. Reduced ability to 'turn off' inflammation. Pro-inflammatory bias.", | |
| BaselineAdvice: "Normal IL-10 production capacity.", | |
| }, | |
| // TLR4 (Bacterial Sensing) | |
| "rs4986790": { | |
| RSID: "rs4986790", Gene: "TLR4", Area: "Immune Health", RiskAllele: "G", | |
| Description: "Asp299Gly: LPS Sensing.", | |
| RiskAdvice: "Blunted response to Gram-negative bacteria (LPS).", | |
| BaselineAdvice: "Normal Toll-Like Receptor 4 function.", | |
| }, | |
| // --- VIRAL DEFENSE --- | |
| // IFNL3 (Interferon Lambda 3 / IL28B) | |
| "rs12979860": { | |
| RSID: "rs12979860", Gene: "IFNL3", Area: "Immune Health", RiskAllele: "T", | |
| Description: "Viral Clearance (Hep C/Flu).", | |
| RiskAdvice: "Reduced spontaneous viral clearance. May require longer/stronger treatment for viral infections.", | |
| BaselineAdvice: "Efficient viral clearance genotype (CC).", | |
| }, | |
| // TMPRSS2 (Viral Entry) | |
| "rs12329760": { | |
| RSID: "rs12329760", Gene: "TMPRSS2", Area: "Immune Health", RiskAllele: "C", | |
| Description: "Androgen-regulated Protease (Viral Entry).", | |
| RiskAdvice: "Higher expression. Potentially facilitates viral entry (e.g. Coronaviruses/Flu).", | |
| BaselineAdvice: "Lower expression variant.", | |
| }, | |
| // IRF5 (Dual Edge: Viral vs Autoimmune) | |
| "rs10488631": { | |
| RSID: "rs10488631", Gene: "IRF5", Area: "Immune Health", RiskAllele: "C", | |
| Description: "Interferon Regulatory Factor 5.", | |
| RiskAdvice: "High Expression: Stronger antiviral defense but increased Autoimmune risk (SLE).", | |
| BaselineAdvice: "Balanced IRF5 expression.", | |
| }, | |
| // --- MODULE L: AUTOIMMUNITY & JOINT HEALTH (EXPANDED) --- | |
| "rs6679677": { | |
| RSID: "rs6679677", Gene: "PTPN22", Area: "Autoimmunity", RiskAllele: "A", | |
| Description: "T-Cell Regulation (R620W Proxy). Major Autoimmune Risk.", | |
| RiskAdvice: "Disrupts T-cell control. High Autoimmune risk (RA/Lupus). Prioritize Vitamin D & Omega-3s.", | |
| BaselineAdvice: "PTPN22 function appears normal.", | |
| }, | |
| "rs231775": { | |
| RSID: "rs231775", Gene: "CTLA4", Area: "Autoimmunity", RiskAllele: "G", | |
| Description: "CTLA4 (+49A/G): Immune System 'Brake'.", | |
| RiskAdvice: "Reduced braking efficiency. Susceptibility to thyroid autoimmunity. Selenium is critical.", | |
| BaselineAdvice: "CTLA4 braking function likely standard.", | |
| }, | |
| "rs3087243": { | |
| RSID: "rs3087243", Gene: "CTLA4", Area: "Autoimmunity", RiskAllele: "G", | |
| Description: "CT60 Isoform: Soluble CTLA-4 levels.", | |
| RiskAdvice: "Lowers soluble CTLA-4. Reduces threshold for immune attack. Focus on gut health.", | |
| BaselineAdvice: "Normal isoform balance likely.", | |
| }, | |
| "rs2230926": { | |
| RSID: "rs2230926", Gene: "TNFAIP3", Area: "Immune Health", RiskAllele: "G", | |
| Description: "A20 Protein (Phe127Cys): Inflammation Off-Switch.", | |
| RiskAdvice: "Impaired NF-kB inhibition. Chronic inflammation risk. Anti-inflammatory diet (Curcumin/Resveratrol).", | |
| BaselineAdvice: "Intact A20 anti-inflammatory function.", | |
| }, | |
| "rs2104286": { | |
| RSID: "rs2104286", Gene: "IL2RA", Area: "Autoimmunity", RiskAllele: "C", | |
| Description: "CD25/Treg Function.", | |
| RiskAdvice: "Altered Treg function. susceptibility to T1D/Autoimmunity. Support with Vit A & D.", | |
| BaselineAdvice: "Normal IL-2RA expression patterns.", | |
| }, | |
| "rs1883832": { | |
| RSID: "rs1883832", Gene: "CD40", Area: "Autoimmunity", RiskAllele: "C", | |
| Description: "Kozak Sequence: B-Cell Costimulation.", | |
| RiskAdvice: "Increases CD40 translation (Overactive B-cells). Graves/Thyroid risk. Manage stress/cortisol.", | |
| BaselineAdvice: "Normal translation efficiency.", | |
| }, | |
| "rs1143627": { | |
| RSID: "rs1143627", Gene: "IL1B", Area: "Joint Health", RiskAllele: "A", | |
| Description: "IL-1 Beta Promoter (-31): TATA Variant.", | |
| RiskAdvice: "High Expression. Increased inflammatory cytokines. Cartilage risk. Use Boswellia/Anti-inflammatories.", | |
| BaselineAdvice: "Normal transcriptional activity.", | |
| }, | |
| "rs16944": { | |
| RSID: "rs16944", Gene: "IL1B", Area: "Joint Health", RiskAllele: "A", | |
| Description: "IL-1 Beta Promoter (-511): Hyper-secretor.", | |
| RiskAdvice: "Increased risk of erosive arthritis/gastric issues. Quercetin & Fish Oil recommended.", | |
| BaselineAdvice: "Standard IL-1B secretion levels.", | |
| }, | |
| "rs30187": { | |
| RSID: "rs30187", Gene: "ERAP1", Area: "Joint Health", RiskAllele: "T", | |
| Description: "ERAP1 (K528R): Peptide trimming for HLA.", | |
| RiskAdvice: "Maintains high activity. AS risk if B27+. Low starch diet often advised.", | |
| BaselineAdvice: "Carrying protective/lower activity variant.", | |
| }, | |
| "rs2275913": { | |
| RSID: "rs2275913", Gene: "IL17A", Area: "Joint Health", RiskAllele: "A", | |
| Description: "IL-17A Promoter (-197): Th17 Driver.", | |
| RiskAdvice: "Hyper-expression. Drives chronic joint/gut inflammation. Berberine/Zinc to downregulate Th17.", | |
| BaselineAdvice: "Normal IL-17 expression.", | |
| }, | |
| "rs34536443": { | |
| RSID: "rs34536443", Gene: "TYK2", Area: "Autoimmunity", RiskAllele: "G", | |
| Description: "Tyrosine Kinase 2 (P1104A).", | |
| RiskAdvice: "Standard Susceptibility (Lacking Protective Variant). Focus on general immune hygiene.", | |
| BaselineAdvice: "Carrier of protective TYK2 mutation.", | |
| }, | |
| // --- MODULE M: MITOCHONDRIAL & ENERGY METABOLISM --- | |
| "rs8192678": { | |
| RSID: "rs8192678", Gene: "PPARGC1A", Area: "Mitochondrial Health", RiskAllele: "T", | |
| Description: "PGC-1alpha (Gly482Ser): Mitochondrial Biogenesis Regulator.", | |
| RiskAdvice: "Lower efficiency. Prioritize Zone 2 cardio & Cold Exposure. Fasting beneficial.", | |
| BaselineAdvice: "Mitochondrial biogenesis regulation is efficient.", | |
| }, | |
| "rs2853826": { | |
| RSID: "rs2853826", Gene: "MT-ND3", Area: "Mitochondrial Health", RiskAllele: "A", | |
| Description: "NADH Dehydrogenase 3 (G10398A): Longevity Link.", | |
| RiskAdvice: "Standard metabolic rate. Ensure high antioxidant intake.", | |
| BaselineAdvice: "Protective 'G' allele found (Associated with Longevity/Buffer against ROS).", | |
| }, | |
| "rs660339": { | |
| RSID: "rs660339", Gene: "UCP2", Area: "Mitochondrial Health", RiskAllele: "G", | |
| Description: "Uncoupling Protein 2 (Promoter): Metabolic Efficiency.", | |
| RiskAdvice: "'Thrifty' metabolism. Very efficient at storing fat. Avoid caloric surplus.", | |
| BaselineAdvice: "Higher metabolic burn rate (Thermogenic). Lower obesity risk.", | |
| }, | |
| "rs1801282": { | |
| RSID: "rs1801282", Gene: "PPARG", Area: "Mitochondrial Health", RiskAllele: "C", | |
| Description: "PPAR-gamma (Pro12Ala): Insulin Sensitivity.", | |
| RiskAdvice: "Standard insulin sensitivity. Requires exercise for optimization.", | |
| BaselineAdvice: "Carrier of protective 'Ala' variant. Enhanced insulin sensitivity.", | |
| }, | |
| } | |
| categories := []string{"Methylation", "Neurotransmitter", "Detoxification", "Vitamin Metabolism", "Metabolic", "Systemic Health", "Sensitivities", "Neurodiversity", "Immune Health", "Immune Function", "Viral Defense", "Autoimmunity", "Joint Health", "Mitochondrial Health"} | |
| scores := make(map[string]*CategoryScore) | |
| for _, cat := range categories { | |
| scores[cat] = &CategoryScore{Name: cat} | |
| } | |
| foundResults := make(map[string]ResultRow) | |
| targetMap := make(map[string][]string) | |
| for k, m := range markers { | |
| foundResults[k] = ResultRow{Marker: m, Genotype: "Not Found", Impact: "-", MatchPriority: 999} | |
| targetMap[m.RSID] = append(targetMap[m.RSID], k) | |
| for _, p := range m.Proxies { | |
| targetMap[p.RSID] = append(targetMap[p.RSID], k) | |
| } | |
| } | |
| file, err := os.Open(filePath) | |
| if err != nil { | |
| fmt.Printf("Error opening file: %v\n", err) | |
| return | |
| } | |
| defer file.Close() | |
| fmt.Println(">> Analyzing Genomic Blueprint for 23andMe v5 data...") | |
| scanner := bufio.NewScanner(file) | |
| for scanner.Scan() { | |
| line := scanner.Text() | |
| if strings.HasPrefix(line, "#") || line == "" { | |
| continue | |
| } | |
| fields := strings.Fields(line) | |
| if len(fields) < 4 { | |
| continue | |
| } | |
| fileRSID := fields[0] | |
| genotype := fields[3] | |
| if len(fields) > 4 { | |
| genotype += fields[4] | |
| } | |
| if keys, exists := targetMap[fileRSID]; exists { | |
| for _, primaryKey := range keys { | |
| marker := markers[primaryKey] | |
| priority := 999 | |
| isProxy := false | |
| if fileRSID == marker.RSID { | |
| priority = 0 | |
| } else { | |
| for _, p := range marker.Proxies { | |
| if p.RSID == fileRSID { | |
| priority = p.Priority | |
| isProxy = true | |
| break | |
| } | |
| } | |
| } | |
| if priority < foundResults[primaryKey].MatchPriority { | |
| if genotype == "--" || genotype == "__" || genotype == "DI" { | |
| continue | |
| } | |
| foundResults[primaryKey] = ResultRow{ | |
| Marker: marker, | |
| Genotype: genotype, | |
| UsedProxy: isProxy, | |
| ProxyRSID: fileRSID, | |
| MatchPriority: priority, | |
| } | |
| } | |
| } | |
| } | |
| } | |
| // Logic processing | |
| for k, row := range foundResults { | |
| if row.MatchPriority == 999 { | |
| continue | |
| } | |
| riskAllele := row.Marker.RiskAllele | |
| if row.UsedProxy { | |
| for _, p := range row.Marker.Proxies { | |
| if p.RSID == row.ProxyRSID { | |
| riskAllele = p.RiskAllele | |
| break | |
| } | |
| } | |
| } | |
| count := strings.Count(row.Genotype, riskAllele) | |
| cat := scores[row.Marker.Area] | |
| if count == 2 { | |
| row.Impact = "HOMOZYGOUS" | |
| cat.Score += 1.0 | |
| cat.MarkersFound++ | |
| row.Recommendation = row.Marker.RiskAdvice | |
| } else if count == 1 { | |
| row.Impact = "HETEROZYGOUS" | |
| cat.Score += 0.5 | |
| cat.MarkersFound++ | |
| row.Recommendation = row.Marker.RiskAdvice | |
| } else { | |
| row.Impact = "NORMAL" | |
| row.Recommendation = row.Marker.BaselineAdvice | |
| } | |
| foundResults[k] = row | |
| } | |
| // Output Formatting | |
| fmt.Println("\n" + strings.Repeat("=", 120)) | |
| fmt.Printf("%-15s %-12s %-15s %-12s %-60s\n", "AREA", "GENE", "SNP", "GENOTYPE", "NUTRITIONAL ALGORITHM / RECOMMENDATION") | |
| fmt.Println(strings.Repeat("-", 120)) | |
| // Group results by category | |
| resultsByCategory := make(map[string][]ResultRow) | |
| for _, res := range foundResults { | |
| resultsByCategory[res.Marker.Area] = append(resultsByCategory[res.Marker.Area], res) | |
| } | |
| for _, catName := range categories { | |
| rows := resultsByCategory[catName] | |
| if len(rows) == 0 { | |
| continue | |
| } | |
| // Sort by Gene within category | |
| sort.Slice(rows, func(i, j int) bool { | |
| return rows[i].Marker.Gene < rows[j].Marker.Gene | |
| }) | |
| fmt.Printf("\n--- %s ---\n", strings.ToUpper(catName)) | |
| for _, res := range rows { | |
| snpLabel := res.Marker.RSID | |
| if res.UsedProxy { | |
| snpLabel = fmt.Sprintf("~%s", res.ProxyRSID) | |
| } | |
| symbol := "" | |
| colorCode := "" | |
| if res.Impact == "HOMOZYGOUS" { | |
| symbol = "[!!]" | |
| colorCode = ColorRed | |
| } else if res.Impact == "HETEROZYGOUS" { | |
| symbol = "[!]" | |
| colorCode = ColorYellow | |
| } else { | |
| symbol = "[OK]" | |
| colorCode = ColorGreen | |
| } | |
| // Pad manually so coloring doesn't mess up alignment | |
| coloredSymbol := colorCode + fmt.Sprintf("%-15s", symbol) + ColorReset | |
| fmt.Printf("%s %-12s %-15s %-12s %-60s\n", | |
| coloredSymbol, res.Marker.Gene, snpLabel, res.Genotype, res.Recommendation) | |
| } | |
| } | |
| fmt.Println("\n" + strings.Repeat("=", 120)) | |
| fmt.Println("SUMMARY BY PATHWAY") | |
| for _, catName := range categories { | |
| if len(resultsByCategory[catName]) == 0 { | |
| continue | |
| } | |
| cat := scores[catName] | |
| status := "Optimal" | |
| statusColor := ColorGreen | |
| if cat.Score >= 2.0 { | |
| status = "High Support Needed" | |
| statusColor = ColorRed | |
| } else if cat.Score >= 1.0 { | |
| status = "Moderate Support" | |
| statusColor = ColorYellow | |
| } | |
| fmt.Printf(" • %-20s Score: %3.1f | Status: %s%s%s\n", cat.Name, cat.Score, statusColor, status, ColorReset) | |
| } | |
| fmt.Println(strings.Repeat("=", 120)) | |
| fmt.Println("Note: '~' denotes a Proxy marker was used for v5 chip compatibility.") | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment