Personal Genomics Skill v4.4.0
Comprehensive local DNA analysis with 1600+ markers across 30 categories. Privacy-first genetic analysis for AI agents.
🆕 v4.4.0: 1000 GENOMES POPULATION COMPARISON & ANCIENT DNA
- Transparent population comparison (not black-box percentages)
- Ancient DNA signal detection (WHG, ANF, Yamnaya, Neanderthal)
- Interactive dashboard with population frequency visualizations
- Complete methodology documentation
⚠️ v4.3.0 focuses on ACCURACY AND HONESTY - improved uncertainty handling, PMIDs for all claims, and explicit limitations.
Quick Start
python comprehensive_analysis.py /path/to/dna_file.txt
⚠️ Important Limitations
Haplogroups are LOW CONFIDENCE - Consumer arrays cannot reliably call haplogroups. Recommend dedicated Y-DNA/mtDNA testing (FTDNA, YFull) for accuracy.
Ancestry shows ANCIENT SIGNALS, not modern ethnicity - Modern ethnicity percentages are unreliable. Instead we detect signals from well-characterized ancient populations (WHG, Neolithic Farmers, Steppe, Neanderthal, Denisovan).
PRS scores show RANGES, not point estimates - Polygenic risk scores have wide confidence intervals. Most conditions are 50-80% non-genetic.
Every marker has PMIDs - All claims are backed by literature citations linked to PubMed.
Triggers
Activate this skill when user mentions:
- DNA analysis, genetic analysis, genome analysis
- 23andMe, AncestryDNA, MyHeritage results
- Pharmacogenomics, drug-gene interactions
- Medication interactions, drug safety
- Genetic risk, disease risk, health risk
- Carrier status, carrier testing
- VCF file analysis
- APOE, MTHFR, CYP2D6, BRCA, or other gene names
- Polygenic risk scores
- Haplogroups, maternal lineage, paternal lineage
- Ancestry composition, ethnicity
- Hereditary cancer, Lynch syndrome
- Autoimmune genetics, HLA, celiac
- Pain sensitivity, opioid response
- Sleep optimization, chronotype, caffeine metabolism
- Dietary genetics, lactose intolerance, celiac
- Athletic genetics, sports performance
- UV sensitivity, skin type, melanoma risk
- Telomere length, longevity genetics
Supported Files
- 23andMe, AncestryDNA, MyHeritage, FTDNA
- VCF files (whole genome/exome, .vcf or .vcf.gz)
- Any tab-delimited rsid format
Output Location
~/dna-analysis/reports/
agent_summary.json - AI-optimized, priority-sorted
full_analysis.json - Complete data
report.txt - Human-readable
genetic_report.pdf - Professional PDF report
dashboard.html - Interactive visualization
New v4.3.0 Features (Accuracy Update)
Honest Haplogroup Reporting
- LOW CONFIDENCE labels on all haplogroup calls
- Explicit disclaimer that consumer arrays can't reliably call haplogroups
- Recommendations for dedicated Y-DNA/mtDNA testing services
- PMIDs for haplogroup marker sources
Ancient Ancestral Signals (Replaces Modern Ethnicity)
- Western Hunter-Gatherers (WHG) - Mesolithic Europeans (~15,000-8,000 BP)
- Early European Farmers (EEF) - Neolithic Anatolians (~10,000-5,000 BP)
- Steppe Pastoralists - Yamnaya/Bronze Age (~5,000-4,000 BP)
- Neanderthal Introgression - Archaic human (~50,000-40,000 BP)
- Denisovan Introgression - Archaic human (high-altitude adaptation)
- Shows "Signals Detected" not percentages
- Includes time periods and trait contributions
- Based on ancient DNA studies with PMIDs
PRS with Uncertainty Ranges
- Percentile RANGES instead of point estimates
- Confidence intervals based on marker coverage
- Explicit interpretation guidance ("likely average", "uncertain", etc.)
PMIDs Throughout
- Every marker has at least one literature citation
- Clickable PubMed links in dashboard
- Methodology & Limitations section in dashboard
Legacy v4.0-4.2 Features
Haplogroup Analysis (indicative only)
- Mitochondrial DNA (mtDNA) - maternal lineage
- Y-chromosome - paternal lineage (males only)
- Migration history context
- PhyloTree/ISOGG standards
Ancient Ancestry (scientifically grounded)
- Detection of ancient population signals
- Based on well-characterized ancient DNA
- Includes archaic introgression (Neanderthal/Denisovan)
Hereditary Cancer Panel
- BRCA1/BRCA2 comprehensive
- Lynch syndrome (MLH1, MSH2, MSH6, PMS2)
- Other genes (APC, TP53, CHEK2, PALB2, ATM)
- ACMG-style classification
Autoimmune HLA
- Celiac (DQ2/DQ8) - can rule out if negative
- Type 1 Diabetes
- Ankylosing spondylitis (HLA-B27)
- Rheumatoid arthritis, lupus, MS
Pain Sensitivity
- COMT Val158Met
- OPRM1 opioid receptor
- SCN9A pain signaling
- TRPV1 capsaicin sensitivity
- Migraine susceptibility
PDF Reports
- Professional format
- Physician-shareable
- Executive summary
- Detailed findings
- Disclaimers included
New v4.1.0 Features
Medication Interaction Checker
from markers.medication_interactions import check_medication_interactions
result = check_medication_interactions(
medications=["warfarin", "clopidogrel", "omeprazole"],
genotypes=user_genotypes
)
# Returns critical/serious/moderate interactions with alternatives
- Accepts brand or generic names
- CPIC guidelines integrated
- PubMed citations included
- FDA warning flags
Sleep Optimization Profile
from markers.sleep_optimization import generate_sleep_profile
profile = generate_sleep_profile(genotypes)
# Returns ideal wake/sleep times, coffee cutoff, etc.
- Chronotype (morning/evening preference)
- Caffeine metabolism speed
- Personalized timing recommendations
Dietary Interaction Matrix
from markers.dietary_interactions import analyze_dietary_interactions
diet = analyze_dietary_interactions(genotypes)
# Returns food-specific guidance
- Caffeine, alcohol, saturated fat, lactose, gluten
- APOE-specific diet recommendations
- Bitter taste perception
Athletic Performance Profile
from markers.athletic_profile import calculate_athletic_profile
profile = calculate_athletic_profile(genotypes)
# Returns power/endurance type, recovery profile, injury risk
- Sport suitability scoring
- Training recommendations
- Injury prevention guidance
UV Sensitivity Calculator
from markers.uv_sensitivity import generate_uv_sensitivity_report
uv = generate_uv_sensitivity_report(genotypes)
# Returns skin type, SPF recommendation, melanoma risk
- Fitzpatrick skin type estimation
- Vitamin D synthesis capacity
- Melanoma risk factors
Natural Language Explanations
from markers.explanations import generate_plain_english_explanation
explanation = generate_plain_english_explanation(
rsid="rs3892097", gene="CYP2D6", genotype="GA",
trait="Drug metabolism", finding="Poor metabolizer carrier"
)
- Plain-English summaries
- Research variant flagging
- PubMed links
Telomere & Longevity
from markers.advanced_genetics import estimate_telomere_length
telomere = estimate_telomere_length(genotypes)
# Returns relative estimate with appropriate caveats
- TERT, TERC, OBFC1 variants
- Longevity associations (FOXO3, APOE)
Data Quality
- Call rate analysis
- Platform detection
- Confidence scoring
- Quality warnings
Export Formats
- Genetic counselor clinical export
- Apple Health compatible
- API-ready JSON
- Integration hooks
Marker Categories (21 total)
- Pharmacogenomics (159) - Drug metabolism
- Polygenic Risk Scores (277) - Disease risk
- Carrier Status (181) - Recessive carriers
- Health Risks (233) - Disease susceptibility
- Traits (163) - Physical/behavioral
- Haplogroups (44) - Lineage markers
- Ancestry (124) - Population informative
- Hereditary Cancer (41) - BRCA, Lynch, etc.
- Autoimmune HLA (31) - HLA associations
- Pain Sensitivity (20) - Pain/opioid response
- Rare Diseases (29) - Rare conditions
- Mental Health (25) - Psychiatric genetics
- Dermatology (37) - Skin and hair
- Vision & Hearing (33) - Sensory genetics
- Fertility (31) - Reproductive health
- Nutrition (34) - Nutrigenomics
- Fitness (30) - Athletic performance
- Neurogenetics (28) - Cognition/behavior
- Longevity (30) - Aging markers
- Immunity (43) - HLA and immune
- Ancestry AIMs (24) - Admixture markers
Agent Integration
The agent_summary.json provides:
{
"critical_alerts": [],
"high_priority": [],
"medium_priority": [],
"pharmacogenomics_alerts": [],
"apoe_status": {},
"polygenic_risk_scores": {},
"haplogroups": {
"mtDNA": {"haplogroup": "H", "lineage": "maternal"},
"Y_DNA": {"haplogroup": "R1b", "lineage": "paternal"}
},
"ancestry": {
"composition": {},
"admixture": {}
},
"hereditary_cancer": {},
"autoimmune_risk": {},
"pain_sensitivity": {},
"lifestyle_recommendations": {
"diet": [],
"exercise": [],
"supplements": [],
"avoid": []
},
"drug_interaction_matrix": {},
"data_quality": {}
}
Critical Findings (Always Alert User)
Pharmacogenomics
- DPYD variants - 5-FU/capecitabine FATAL toxicity risk
- HLA-B*5701 - Abacavir hypersensitivity
- HLA-B*1502 - Carbamazepine SJS (certain populations)
- MT-RNR1 - Aminoglycoside-induced deafness
Hereditary Cancer
- BRCA1/BRCA2 pathogenic - Breast/ovarian cancer syndrome
- Lynch syndrome genes - Colorectal/endometrial cancer
- TP53 pathogenic - Li-Fraumeni syndrome (multi-cancer)
Disease Risk
- APOE ε4/ε4 - ~12x Alzheimer's risk
- Factor V Leiden - Thrombosis risk, contraceptive implications
- HLA-B27 - Ankylosing spondylitis susceptibility (OR ~70)
Carrier Status
- CFTR - Cystic fibrosis (1 in 25 Europeans)
- HBB - Sickle cell (1 in 12 African Americans)
- HEXA - Tay-Sachs (1 in 30 Ashkenazi Jews)
Usage Examples
Basic Analysis
from comprehensive_analysis import main
main() # Uses command line args
Haplogroup Analysis
from markers.haplogroups import analyze_haplogroups
result = analyze_haplogroups(genotypes)
print(result["mtDNA"]["haplogroup"]) # e.g., "H"
Ancestry
from markers.ancestry_composition import get_ancestry_summary
ancestry = get_ancestry_summary(genotypes)
Cancer Panel
from markers.cancer_panel import analyze_cancer_panel
cancer = analyze_cancer_panel(genotypes)
if cancer["pathogenic_variants"]:
print("ALERT: Pathogenic variants detected")
Generate PDF
from pdf_report import generate_pdf_report
pdf_path = generate_pdf_report(analysis_results)
Export for Genetic Counselor
from exports import generate_genetic_counselor_export
clinical = generate_genetic_counselor_export(results, "clinical.json")
Privacy
- All analysis runs locally
- Zero network requests
- No data leaves the machine
Limitations
- Consumer arrays miss rare variants (~0.1% of genome)
- Results are probabilistic, not deterministic
- Not a medical diagnosis
- Most conditions 50-80% non-genetic
- Consult healthcare providers for medical decisions
- Negative hereditary cancer result does NOT rule out cancer syndrome
- Haplogroup resolution limited without WGS
When to Recommend Genetic Counseling
- Any pathogenic hereditary cancer variant
- APOE ε4/ε4 genotype
- Multiple critical pharmacogenomic findings
- Carrier status with reproduction implications
- High-risk autoimmune HLA types with symptoms
- Results causing significant user distress
1---2name: personal-genomics3description: Personal Genomics Skill v4.4.04---5# Personal Genomics Skill v4.4.067Comprehensive local DNA analysis with **1600+ markers** across **30 categories**. Privacy-first genetic analysis for AI agents.89**🆕 v4.4.0: 1000 GENOMES POPULATION COMPARISON & ANCIENT DNA**10- Transparent population comparison (not black-box percentages)11- Ancient DNA signal detection (WHG, ANF, Yamnaya, Neanderthal)12- Interactive dashboard with population frequency visualizations13- Complete methodology documentation1415**⚠️ v4.3.0 focuses on ACCURACY AND HONESTY** - improved uncertainty handling, PMIDs for all claims, and explicit limitations.1617## Quick Start1819```bash20python comprehensive_analysis.py /path/to/dna_file.txt21```2223## ⚠️ Important Limitations24251. **Haplogroups are LOW CONFIDENCE** - Consumer arrays cannot reliably call haplogroups. Recommend dedicated Y-DNA/mtDNA testing (FTDNA, YFull) for accuracy.26272. **Ancestry shows ANCIENT SIGNALS, not modern ethnicity** - Modern ethnicity percentages are unreliable. Instead we detect signals from well-characterized ancient populations (WHG, Neolithic Farmers, Steppe, Neanderthal, Denisovan).28293. **PRS scores show RANGES, not point estimates** - Polygenic risk scores have wide confidence intervals. Most conditions are 50-80% non-genetic.30314. **Every marker has PMIDs** - All claims are backed by literature citations linked to PubMed.3233## Triggers3435Activate this skill when user mentions:36- DNA analysis, genetic analysis, genome analysis37- 23andMe, AncestryDNA, MyHeritage results38- Pharmacogenomics, drug-gene interactions39- Medication interactions, drug safety40- Genetic risk, disease risk, health risk41- Carrier status, carrier testing42- VCF file analysis43- APOE, MTHFR, CYP2D6, BRCA, or other gene names44- Polygenic risk scores45- Haplogroups, maternal lineage, paternal lineage46- Ancestry composition, ethnicity47- Hereditary cancer, Lynch syndrome48- Autoimmune genetics, HLA, celiac49- Pain sensitivity, opioid response50- Sleep optimization, chronotype, caffeine metabolism51- Dietary genetics, lactose intolerance, celiac52- Athletic genetics, sports performance53- UV sensitivity, skin type, melanoma risk54- Telomere length, longevity genetics5556## Supported Files5758- 23andMe, AncestryDNA, MyHeritage, FTDNA59- VCF files (whole genome/exome, .vcf or .vcf.gz)60- Any tab-delimited rsid format6162## Output Location6364`~/dna-analysis/reports/`6566- `agent_summary.json` - AI-optimized, priority-sorted67- `full_analysis.json` - Complete data68- `report.txt` - Human-readable69- `genetic_report.pdf` - Professional PDF report70- `dashboard.html` - Interactive visualization7172## New v4.3.0 Features (Accuracy Update)7374### Honest Haplogroup Reporting75- **LOW CONFIDENCE** labels on all haplogroup calls76- Explicit disclaimer that consumer arrays can't reliably call haplogroups77- Recommendations for dedicated Y-DNA/mtDNA testing services78- PMIDs for haplogroup marker sources7980### Ancient Ancestral Signals (Replaces Modern Ethnicity)81- **Western Hunter-Gatherers (WHG)** - Mesolithic Europeans (~15,000-8,000 BP)82- **Early European Farmers (EEF)** - Neolithic Anatolians (~10,000-5,000 BP)83- **Steppe Pastoralists** - Yamnaya/Bronze Age (~5,000-4,000 BP)84- **Neanderthal Introgression** - Archaic human (~50,000-40,000 BP)85- **Denisovan Introgression** - Archaic human (high-altitude adaptation)86- Shows "Signals Detected" not percentages87- Includes time periods and trait contributions88- Based on ancient DNA studies with PMIDs8990### PRS with Uncertainty Ranges91- Percentile RANGES instead of point estimates92- Confidence intervals based on marker coverage93- Explicit interpretation guidance ("likely average", "uncertain", etc.)9495### PMIDs Throughout96- Every marker has at least one literature citation97- Clickable PubMed links in dashboard98- Methodology & Limitations section in dashboard99100## Legacy v4.0-4.2 Features101102### Haplogroup Analysis (indicative only)103- Mitochondrial DNA (mtDNA) - maternal lineage104- Y-chromosome - paternal lineage (males only)105- Migration history context106- PhyloTree/ISOGG standards107108### Ancient Ancestry (scientifically grounded)109- Detection of ancient population signals110- Based on well-characterized ancient DNA111- Includes archaic introgression (Neanderthal/Denisovan)112113### Hereditary Cancer Panel114- BRCA1/BRCA2 comprehensive115- Lynch syndrome (MLH1, MSH2, MSH6, PMS2)116- Other genes (APC, TP53, CHEK2, PALB2, ATM)117- ACMG-style classification118119### Autoimmune HLA120- Celiac (DQ2/DQ8) - can rule out if negative121- Type 1 Diabetes122- Ankylosing spondylitis (HLA-B27)123- Rheumatoid arthritis, lupus, MS124125### Pain Sensitivity126- COMT Val158Met127- OPRM1 opioid receptor128- SCN9A pain signaling129- TRPV1 capsaicin sensitivity130- Migraine susceptibility131132### PDF Reports133- Professional format134- Physician-shareable135- Executive summary136- Detailed findings137- Disclaimers included138139## New v4.1.0 Features140141### Medication Interaction Checker142```python143from markers.medication_interactions import check_medication_interactions144145result = check_medication_interactions(146 medications=["warfarin", "clopidogrel", "omeprazole"],147 genotypes=user_genotypes148)149# Returns critical/serious/moderate interactions with alternatives150```151- Accepts brand or generic names152- CPIC guidelines integrated153- PubMed citations included154- FDA warning flags155156### Sleep Optimization Profile157```python158from markers.sleep_optimization import generate_sleep_profile159160profile = generate_sleep_profile(genotypes)161# Returns ideal wake/sleep times, coffee cutoff, etc.162```163- Chronotype (morning/evening preference)164- Caffeine metabolism speed165- Personalized timing recommendations166167### Dietary Interaction Matrix168```python169from markers.dietary_interactions import analyze_dietary_interactions170171diet = analyze_dietary_interactions(genotypes)172# Returns food-specific guidance173```174- Caffeine, alcohol, saturated fat, lactose, gluten175- APOE-specific diet recommendations176- Bitter taste perception177178### Athletic Performance Profile179```python180from markers.athletic_profile import calculate_athletic_profile181182profile = calculate_athletic_profile(genotypes)183# Returns power/endurance type, recovery profile, injury risk184```185- Sport suitability scoring186- Training recommendations187- Injury prevention guidance188189### UV Sensitivity Calculator190```python191from markers.uv_sensitivity import generate_uv_sensitivity_report192193uv = generate_uv_sensitivity_report(genotypes)194# Returns skin type, SPF recommendation, melanoma risk195```196- Fitzpatrick skin type estimation197- Vitamin D synthesis capacity198- Melanoma risk factors199200### Natural Language Explanations201```python202from markers.explanations import generate_plain_english_explanation203204explanation = generate_plain_english_explanation(205 rsid="rs3892097", gene="CYP2D6", genotype="GA",206 trait="Drug metabolism", finding="Poor metabolizer carrier"207)208```209- Plain-English summaries210- Research variant flagging211- PubMed links212213### Telomere & Longevity214```python215from markers.advanced_genetics import estimate_telomere_length216217telomere = estimate_telomere_length(genotypes)218# Returns relative estimate with appropriate caveats219```220- TERT, TERC, OBFC1 variants221- Longevity associations (FOXO3, APOE)222223### Data Quality224- Call rate analysis225- Platform detection226- Confidence scoring227- Quality warnings228229### Export Formats230- Genetic counselor clinical export231- Apple Health compatible232- API-ready JSON233- Integration hooks234235## Marker Categories (21 total)2362371. **Pharmacogenomics** (159) - Drug metabolism2382. **Polygenic Risk Scores** (277) - Disease risk2393. **Carrier Status** (181) - Recessive carriers2404. **Health Risks** (233) - Disease susceptibility2415. **Traits** (163) - Physical/behavioral2426. **Haplogroups** (44) - Lineage markers2437. **Ancestry** (124) - Population informative2448. **Hereditary Cancer** (41) - BRCA, Lynch, etc.2459. **Autoimmune HLA** (31) - HLA associations24610. **Pain Sensitivity** (20) - Pain/opioid response24711. **Rare Diseases** (29) - Rare conditions24812. **Mental Health** (25) - Psychiatric genetics24913. **Dermatology** (37) - Skin and hair25014. **Vision & Hearing** (33) - Sensory genetics25115. **Fertility** (31) - Reproductive health25216. **Nutrition** (34) - Nutrigenomics25317. **Fitness** (30) - Athletic performance25418. **Neurogenetics** (28) - Cognition/behavior25519. **Longevity** (30) - Aging markers25620. **Immunity** (43) - HLA and immune25721. **Ancestry AIMs** (24) - Admixture markers258259## Agent Integration260261The `agent_summary.json` provides:262263```json264{265 "critical_alerts": [],266 "high_priority": [],267 "medium_priority": [],268 "pharmacogenomics_alerts": [],269 "apoe_status": {},270 "polygenic_risk_scores": {},271 "haplogroups": {272 "mtDNA": {"haplogroup": "H", "lineage": "maternal"},273 "Y_DNA": {"haplogroup": "R1b", "lineage": "paternal"}274 },275 "ancestry": {276 "composition": {},277 "admixture": {}278 },279 "hereditary_cancer": {},280 "autoimmune_risk": {},281 "pain_sensitivity": {},282 "lifestyle_recommendations": {283 "diet": [],284 "exercise": [],285 "supplements": [],286 "avoid": []287 },288 "drug_interaction_matrix": {},289 "data_quality": {}290}291```292293## Critical Findings (Always Alert User)294295### Pharmacogenomics296- **DPYD** variants - 5-FU/capecitabine FATAL toxicity risk297- **HLA-B*5701** - Abacavir hypersensitivity298- **HLA-B*1502** - Carbamazepine SJS (certain populations)299- **MT-RNR1** - Aminoglycoside-induced deafness300301### Hereditary Cancer302- **BRCA1/BRCA2** pathogenic - Breast/ovarian cancer syndrome303- **Lynch syndrome** genes - Colorectal/endometrial cancer304- **TP53** pathogenic - Li-Fraumeni syndrome (multi-cancer)305306### Disease Risk307- **APOE ε4/ε4** - ~12x Alzheimer's risk308- **Factor V Leiden** - Thrombosis risk, contraceptive implications309- **HLA-B27** - Ankylosing spondylitis susceptibility (OR ~70)310311### Carrier Status312- **CFTR** - Cystic fibrosis (1 in 25 Europeans)313- **HBB** - Sickle cell (1 in 12 African Americans)314- **HEXA** - Tay-Sachs (1 in 30 Ashkenazi Jews)315316## Usage Examples317318### Basic Analysis319```python320from comprehensive_analysis import main321main() # Uses command line args322```323324### Haplogroup Analysis325```python326from markers.haplogroups import analyze_haplogroups327result = analyze_haplogroups(genotypes)328print(result["mtDNA"]["haplogroup"]) # e.g., "H"329```330331### Ancestry332```python333from markers.ancestry_composition import get_ancestry_summary334ancestry = get_ancestry_summary(genotypes)335```336337### Cancer Panel338```python339from markers.cancer_panel import analyze_cancer_panel340cancer = analyze_cancer_panel(genotypes)341if cancer["pathogenic_variants"]:342 print("ALERT: Pathogenic variants detected")343```344345### Generate PDF346```python347from pdf_report import generate_pdf_report348pdf_path = generate_pdf_report(analysis_results)349```350351### Export for Genetic Counselor352```python353from exports import generate_genetic_counselor_export354clinical = generate_genetic_counselor_export(results, "clinical.json")355```356357## Privacy358359- All analysis runs locally360- Zero network requests361- No data leaves the machine362363## Limitations364365- Consumer arrays miss rare variants (~0.1% of genome)366- Results are probabilistic, not deterministic367- Not a medical diagnosis368- Most conditions 50-80% non-genetic369- Consult healthcare providers for medical decisions370- Negative hereditary cancer result does NOT rule out cancer syndrome371- Haplogroup resolution limited without WGS372373## When to Recommend Genetic Counseling374375- Any pathogenic hereditary cancer variant376- APOE ε4/ε4 genotype377- Multiple critical pharmacogenomic findings378- Carrier status with reproduction implications379- High-risk autoimmune HLA types with symptoms380- Results causing significant user distress