allelix 2.3.0__tar.gz → 2.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. {allelix-2.3.0 → allelix-2.4.0}/PKG-INFO +82 -50
  2. {allelix-2.3.0 → allelix-2.4.0}/README.md +81 -49
  3. {allelix-2.3.0 → allelix-2.4.0}/allelix/__init__.py +1 -1
  4. {allelix-2.3.0 → allelix-2.4.0}/allelix/annotators/__init__.py +10 -2
  5. allelix-2.4.0/allelix/annotators/_resolution.py +259 -0
  6. {allelix-2.3.0 → allelix-2.4.0}/allelix/annotators/base.py +11 -0
  7. {allelix-2.3.0 → allelix-2.4.0}/allelix/annotators/clinvar.py +231 -231
  8. {allelix-2.3.0 → allelix-2.4.0}/allelix/annotators/gnomad.py +4 -4
  9. {allelix-2.3.0 → allelix-2.4.0}/allelix/annotators/gwas.py +51 -11
  10. {allelix-2.3.0 → allelix-2.4.0}/allelix/annotators/pharmgkb.py +32 -3
  11. allelix-2.4.0/allelix/annotators/rsid_identity.py +237 -0
  12. {allelix-2.3.0 → allelix-2.4.0}/allelix/annotators/snpedia.py +92 -13
  13. {allelix-2.3.0 → allelix-2.4.0}/allelix/cli/_helpers.py +214 -34
  14. {allelix-2.3.0 → allelix-2.4.0}/allelix/cli/_options.py +24 -1
  15. {allelix-2.3.0 → allelix-2.4.0}/allelix/cli/analyze.py +8 -0
  16. {allelix-2.3.0 → allelix-2.4.0}/allelix/cli/config.py +48 -9
  17. {allelix-2.3.0 → allelix-2.4.0}/allelix/cli/db.py +25 -2
  18. {allelix-2.3.0 → allelix-2.4.0}/allelix/cli/utility.py +124 -141
  19. {allelix-2.3.0 → allelix-2.4.0}/allelix/config.py +47 -1
  20. {allelix-2.3.0 → allelix-2.4.0}/allelix/data/clinvar_clnsig_snapshot.yaml +1 -1
  21. {allelix-2.3.0 → allelix-2.4.0}/allelix/data/high_value_snps.yaml +1 -1
  22. {allelix-2.3.0 → allelix-2.4.0}/allelix/databases/_versions.py +3 -2
  23. {allelix-2.3.0 → allelix-2.4.0}/allelix/databases/gwas_loader.py +2 -2
  24. {allelix-2.3.0 → allelix-2.4.0}/allelix/databases/manager.py +13 -13
  25. {allelix-2.3.0 → allelix-2.4.0}/allelix/databases/pharmgkb_loader.py +1 -1
  26. allelix-2.4.0/allelix/databases/rsid_identity_loader.py +377 -0
  27. {allelix-2.3.0 → allelix-2.4.0}/allelix/databases/schema.py +28 -0
  28. {allelix-2.3.0 → allelix-2.4.0}/allelix/databases/snpedia_parser.py +66 -12
  29. {allelix-2.3.0 → allelix-2.4.0}/allelix/exporters/plink.py +9 -4
  30. {allelix-2.3.0 → allelix-2.4.0}/allelix/models.py +71 -4
  31. {allelix-2.3.0 → allelix-2.4.0}/allelix/parsers/_helpers.py +24 -2
  32. {allelix-2.3.0 → allelix-2.4.0}/allelix/parsers/base.py +11 -1
  33. {allelix-2.3.0 → allelix-2.4.0}/allelix/parsers/ftdna.py +23 -12
  34. {allelix-2.3.0 → allelix-2.4.0}/allelix/parsers/ftdna_famfinder.py +5 -5
  35. {allelix-2.3.0 → allelix-2.4.0}/allelix/parsers/ftdna_illumina.py +9 -1
  36. {allelix-2.3.0 → allelix-2.4.0}/allelix/parsers/livingdna.py +2 -2
  37. allelix-2.4.0/allelix/parsers/myheritage.py +205 -0
  38. {allelix-2.3.0 → allelix-2.4.0}/allelix/parsers/twentythreeandme.py +1 -1
  39. {allelix-2.3.0 → allelix-2.4.0}/allelix/parsers/vcf.py +528 -72
  40. allelix-2.4.0/allelix/reports/__init__.py +108 -0
  41. {allelix-2.3.0 → allelix-2.4.0}/allelix/reports/_pipeline.py +303 -250
  42. {allelix-2.3.0 → allelix-2.4.0}/allelix/reports/diff.py +5 -5
  43. {allelix-2.3.0 → allelix-2.4.0}/allelix/reports/high_value.py +43 -4
  44. {allelix-2.3.0 → allelix-2.4.0}/allelix/reports/html.py +112 -11
  45. {allelix-2.3.0 → allelix-2.4.0}/allelix/reports/json_report.py +33 -5
  46. {allelix-2.3.0 → allelix-2.4.0}/allelix/reports/terminal.py +24 -4
  47. {allelix-2.3.0 → allelix-2.4.0}/allelix/reports/vcf.py +90 -10
  48. {allelix-2.3.0 → allelix-2.4.0}/allelix/utils/allele.py +84 -5
  49. {allelix-2.3.0 → allelix-2.4.0}/allelix/utils/build_detect.py +54 -17
  50. allelix-2.4.0/allelix/utils/plausibility.py +77 -0
  51. {allelix-2.3.0 → allelix-2.4.0}/allelix.egg-info/PKG-INFO +82 -50
  52. {allelix-2.3.0 → allelix-2.4.0}/allelix.egg-info/SOURCES.txt +12 -0
  53. {allelix-2.3.0 → allelix-2.4.0}/pyproject.toml +7 -7
  54. allelix-2.4.0/tests/test_allele_identity_invariants.py +492 -0
  55. {allelix-2.3.0 → allelix-2.4.0}/tests/test_changelog_sanitize.py +5 -5
  56. allelix-2.4.0/tests/test_chip_gvcf_parity.py +591 -0
  57. {allelix-2.3.0 → allelix-2.4.0}/tests/test_cli.py +246 -24
  58. {allelix-2.3.0 → allelix-2.4.0}/tests/test_cli_vcf_out.py +8 -14
  59. {allelix-2.3.0 → allelix-2.4.0}/tests/test_config.py +1 -1
  60. {allelix-2.3.0 → allelix-2.4.0}/tests/test_end_to_end.py +29 -15
  61. {allelix-2.3.0 → allelix-2.4.0}/tests/test_extract_rsidless_gh128.py +1 -1
  62. {allelix-2.3.0 → allelix-2.4.0}/tests/test_models.py +5 -5
  63. allelix-2.4.0/tests/test_myheritage_delimiter.py +100 -0
  64. allelix-2.4.0/tests/test_myheritage_lowpass.py +148 -0
  65. {allelix-2.3.0 → allelix-2.4.0}/tests/test_original_rsid_never_serializes.py +8 -8
  66. allelix-2.4.0/tests/test_plausibility.py +412 -0
  67. allelix-2.4.0/tests/test_resolution_hoist.py +306 -0
  68. allelix-2.4.0/tests/test_rsid_identity.py +674 -0
  69. allelix-2.4.0/tests/test_symbolic_vcf_rejection.py +104 -0
  70. {allelix-2.3.0 → allelix-2.4.0}/tests/test_version.py +2 -2
  71. allelix-2.3.0/allelix/parsers/myheritage.py +0 -118
  72. allelix-2.3.0/allelix/reports/__init__.py +0 -40
  73. {allelix-2.3.0 → allelix-2.4.0}/LICENSE +0 -0
  74. {allelix-2.3.0 → allelix-2.4.0}/allelix/annotators/alphamissense.py +0 -0
  75. {allelix-2.3.0 → allelix-2.4.0}/allelix/annotators/cadd.py +0 -0
  76. {allelix-2.3.0 → allelix-2.4.0}/allelix/cli/__init__.py +0 -0
  77. {allelix-2.3.0 → allelix-2.4.0}/allelix/cli/focused.py +0 -0
  78. {allelix-2.3.0 → allelix-2.4.0}/allelix/compare.py +0 -0
  79. {allelix-2.3.0 → allelix-2.4.0}/allelix/data/__init__.py +0 -0
  80. {allelix-2.3.0 → allelix-2.4.0}/allelix/databases/__init__.py +0 -0
  81. {allelix-2.3.0 → allelix-2.4.0}/allelix/databases/alphamissense_loader.py +0 -0
  82. {allelix-2.3.0 → allelix-2.4.0}/allelix/databases/cadd_loader.py +0 -0
  83. {allelix-2.3.0 → allelix-2.4.0}/allelix/databases/cpic_loader.py +0 -0
  84. {allelix-2.3.0 → allelix-2.4.0}/allelix/databases/gnomad_loader.py +0 -0
  85. {allelix-2.3.0 → allelix-2.4.0}/allelix/databases/loader_utils.py +0 -0
  86. {allelix-2.3.0 → allelix-2.4.0}/allelix/databases/snpedia_loader.py +0 -0
  87. {allelix-2.3.0 → allelix-2.4.0}/allelix/exporters/__init__.py +0 -0
  88. {allelix-2.3.0 → allelix-2.4.0}/allelix/parsers/__init__.py +0 -0
  89. {allelix-2.3.0 → allelix-2.4.0}/allelix/parsers/ancestrydna.py +0 -0
  90. {allelix-2.3.0 → allelix-2.4.0}/allelix/parsers/myhappygenes.py +0 -0
  91. {allelix-2.3.0 → allelix-2.4.0}/allelix/py.typed +0 -0
  92. {allelix-2.3.0 → allelix-2.4.0}/allelix/reports/methylation.py +0 -0
  93. {allelix-2.3.0 → allelix-2.4.0}/allelix/utils/__init__.py +0 -0
  94. {allelix-2.3.0 → allelix-2.4.0}/allelix.egg-info/dependency_links.txt +0 -0
  95. {allelix-2.3.0 → allelix-2.4.0}/allelix.egg-info/entry_points.txt +0 -0
  96. {allelix-2.3.0 → allelix-2.4.0}/allelix.egg-info/requires.txt +0 -0
  97. {allelix-2.3.0 → allelix-2.4.0}/allelix.egg-info/top_level.txt +0 -0
  98. {allelix-2.3.0 → allelix-2.4.0}/setup.cfg +0 -0
  99. {allelix-2.3.0 → allelix-2.4.0}/tests/test_cli_helpers.py +0 -0
  100. {allelix-2.3.0 → allelix-2.4.0}/tests/test_compare.py +0 -0
  101. {allelix-2.3.0 → allelix-2.4.0}/tests/test_mock_data_invariants.py +0 -0
  102. {allelix-2.3.0 → allelix-2.4.0}/tests/test_registry.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: allelix
3
- Version: 2.3.0
3
+ Version: 2.4.0
4
4
  Summary: Open-source genotype analysis toolkit. Format-agnostic ingestion, database-agnostic annotation, offline-first.
5
5
  Author: Allelix
6
6
  Maintainer-email: dial481 <dial481@users.noreply.github.com>
@@ -55,7 +55,7 @@ Dynamic: license-file
55
55
 
56
56
  # Allelix
57
57
 
58
- > **Status:** Production. Eight parser formats (including VCF + gVCF), four annotators (ClinVar + ClinPGx + GWAS Catalog + SNPedia), three enrichment sources (gnomAD + AlphaMissense + CADD), licensable-source gating for commercial users, dual-build ClinVar caches (GRCh37 + GRCh38), HTML/JSON/terminal reports and annotated VCF output for pipeline integration (v2.3.0+), methylation + pharmacogenomics focused commands, report diffing, persistent config with commercial-mode safety switch. Build auto-detection from position data (ADR-0021). No regex on prose anywhere in production. The [Changelog](https://github.com/allelix/allelix/blob/main/CHANGELOG.md) tracks every release.
58
+ > **Status:** Production. Nine parser formats (including VCF + gVCF), four annotators (ClinVar + ClinPGx + GWAS Catalog + SNPedia), three GRCh38 enrichment sources (gnomAD + AlphaMissense + CADD) reached from GRCh37 input through a cross-build rsID identity table, licensable-source gating for commercial users, dual-build ClinVar caches (GRCh37 + GRCh38), HTML/JSON/terminal reports and annotated VCF output for pipeline integration (v2.3.0+), methylation + pharmacogenomics focused commands, report diffing, persistent config with commercial-mode safety switch. Modern-build position detection requires at least three concordant seed SNPs and an 80% winning ratio before it overrides a fallback or header signal; a tentative GRCh36 signal instead fails closed to GRCh36 because no modern position cache is safe for it (ADR-0025, ADR-0037). No regex on prose anywhere in production. The [Changelog](https://github.com/allelix/allelix/blob/main/CHANGELOG.md) tracks every release.
59
59
 
60
60
  ## Quickstart
61
61
 
@@ -64,9 +64,10 @@ Dynamic: license-file
64
64
  ```bash
65
65
  pip install allelix
66
66
 
67
- # Download reference databases (~16 GB default install; ~22 GB if you opt into CADD).
67
+ # Download reference databases (~18 GB default install; ~24 GB if you opt into CADD).
68
68
  # Use --no-gnomad / --no-alphamissense to skip the large ones.
69
- # CADD is opt-in: allelix db update --cadd
69
+ # CADD is opt-in: download with `allelix db update --cadd`, then pass
70
+ # `--cadd` to an analysis or set `sources.cadd = true` persistently.
70
71
  allelix db update
71
72
 
72
73
  # Analyze a genotype file
@@ -78,11 +79,16 @@ allelix analyze your_wgs.vcf.gz --output report.html
78
79
  # Multi-sample VCF — pick which sample to analyze
79
80
  allelix analyze trio.vcf.gz --sample HG002 --output report.html
80
81
 
82
+ # VCF quality gate: rows the variant caller filtered (FILTER not PASS) are
83
+ # skipped and counted; calls with GQ below 20 or no reads become no-calls.
84
+ allelix analyze your_wgs.vcf.gz --keep-filtered --min-gq 10 --output report.html
85
+
81
86
  # Filter to a custom panel (rsIDs + gene names, one per line; '#' comments and blank lines ignored)
82
87
  allelix analyze your_genotype_file.txt --filter-file my_panel.txt --output report.html
83
88
 
84
89
  # Annotated VCF output — VCF-in / VCF-out for pipeline integration
85
90
  # Writes a valid VCF with annotations as INFO fields + full provenance in the header.
91
+ # Missing ##contig declarations are synthesized; raw CHROM names are preserved.
86
92
  # Refuses to overwrite; requires VCF or gVCF input.
87
93
  allelix analyze your_wgs.vcf.gz --vcf-out annotated.vcf
88
94
  ```
@@ -93,15 +99,15 @@ See [Development](#development) for source installs and running tests, [Managing
93
99
 
94
100
  | Format | Status | Notes |
95
101
  |---|---|---|
96
- | MyHappyGenes (Tempus) | ✓ | Tab-delimited, 5 columns. **Build is auto-detected** — real-world MHG exports mislabel the header as "build 37.1" while shipping GRCh38 coordinates. Allelix detects from position data and warns on header/data disagreement (ADR-0021). |
102
+ | MyHappyGenes (Tempus) | ✓ | Tab-delimited, 5 columns. **Build is auto-detected** — real-world MHG exports mislabel the header as "build 37.1" while shipping GRCh38 coordinates. Allelix detects from position data and warns on header/data disagreement (ADR-0021). See [docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#myhappygenes-tempus). |
97
103
  | 23andMe | ✓ | Tab-delimited, 4 columns, concatenated genotype. Supports build 36/37/38 from header. I-prefixed probe IDs passed through. |
98
104
  | AncestryDNA | ✓ | Tab-delimited, 5 columns. Chromosome mapping: 23→X, 24→Y, 25→X (PAR), 26→MT. V1 and V2 chip layouts. |
99
105
  | Family Tree DNA | ✓ | CSV, double-quoted fields, concatenated genotype. Build 37 default. |
100
- | MyHeritage DNA | ✓ | CSV, same structure as FTDNA. Detected by "MyHeritage" in comment header. Handles double-double-quoted field variant. |
106
+ | MyHeritage DNA | ✓ | CSV, same structure as FTDNA. Detected by "MyHeritage" in the file's preamble. Handles double-double-quoted fields and files re-saved through a spreadsheet (padded rows, signature not on line 1, tab-delimited copies). Two exports: the **array** export (pre-2026 kits) and the **low-pass WGS** export (kits from January 2026; genotypes imputed from about 2x coverage), which the report labels as imputed and whose `##reference=build37` line is used as the header build. See [docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#myheritage). |
101
107
  | Living DNA | ✓ | Tab-delimited despite `.csv` extension. Handles AX-, AFFX-prefixed and CHR:POS positional SNP IDs. |
102
108
  | FTDNA Illumina raw | ✓ | Tab-delimited variant of the FTDNA export (distinct from the CSV format above). `RSID/CHROMOSOME/POSITION/RESULT` columns. Build 37 default. |
103
109
  | FTDNA FamFinder | ✓ | Third FTDNA file shape: tab-delimited with **separate `ALLELE1` / `ALLELE2` columns** instead of a concatenated `RESULT`. Detected by the `famfinder` substring in the file header plus the 5-column canonical header. Build 37 default. |
104
- | VCF / gVCF | ✓ | REF/ALT encoding, `0/1` genotype notation. Plain VCF: absence at a position means reference. gVCF: explicit reference blocks (lines with `<NON_REF>` ALT and `END=` INFO) are skipped — they match nothing in any annotation database. Multi-sample files require `--sample <ID>`. Streams via stdlib; `.vcf.gz` handled transparently. Optional `pip install allelix[vcf-index]` enables pysam-backed tabix random access for fast `extract --snps` on huge VCFs. |
110
+ | VCF / gVCF | ✓ | REF/ALT encoding, `0/1` genotype notation. Plain VCF: absence at a position means reference. gVCF: explicit reference blocks (lines with `<NON_REF>` ALT and `END=` INFO) are not annotated — they match nothing in any annotation database — but they are read at high-value positions: a block with low genotype quality or no reads there makes the position a no-call, and so does a gVCF position no record covers. High-value no-calls list the reason (for example `low_gq_block`, `no_coverage`, `filtered`, `low_gq_call`). A plain VCF has no reference blocks, so a position without a record is reported as unknown rather than as reference or as a no-call. Multi-sample files require `--sample <ID>`. Rows the variant caller rejected (FILTER other than `PASS` or `.`) are skipped and counted in the report; `--keep-filtered` keeps them. A call with genotype quality below `--min-gq` (default 20) or with no reads (DP 0) is reported as a no-call. The spanning-deletion allele `*` is treated as symbolic. A VCF that holds only structural-variant or copy-number records (such as a provider's separate `sv` / `cnv` file) is rejected with a message naming the file to use instead; see [docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#sequencingcom-30x-whole-genome) for per-provider deliverables. Streams via stdlib; `.vcf.gz` handled transparently. Optional `pip install allelix[vcf-index]` enables pysam-backed tabix random access for fast `extract --snps` on huge VCFs. |
105
111
 
106
112
  Adding a new format means adding one file to `allelix/parsers/` and registering an instance in the `PARSERS` list in `allelix/parsers/__init__.py`.
107
113
 
@@ -110,48 +116,44 @@ Adding a new format means adding one file to `allelix/parsers/` and registering
110
116
  | Release | Theme |
111
117
  |---|---|
112
118
  | **v2.2** | Annotation model expansion (cross-source conflict surfacing, risk-allele display, structured MTAG flag), custom-panel UX improvements, methylation panel retune + citations, ClinVar source switch (VCF → `variant_summary.txt`), CLI cleanups (`db clean` / `db path`). |
113
- | **v2.3** | Per-source magnitude decomposition, Good / Bad / Neutral annotation repute, JSON v3 (AI-legible output contract), plausibility flagging via zygosity × gnomAD MAF, ClinVar review-status weighting, functional-medicine +/− notation. |
114
- | **v2.4** | ACMG/AMP automated classification engine, variant consequence annotation (VEP-equivalent). |
115
- | **v2.5+** | CNVs and repeat-expansion support, dbSNP resolution for rsID-less VCFs, gnomAD genomes (non-coding population frequencies), supplemental genotype file merging. |
116
- | **v3.0** | Ancestry estimation (PCA + 1KG/HGDP reference panels), Polygenic Risk Score (PRS) integration. |
119
+ | **v2.3** | Annotated VCF output plus v2.3.1 correctness hardening: cross-build enrichment guards, GWAS effect-type disambiguation, conservative build confidence, SNPedia orientation handling, and strict slow-suite drift verification. |
120
+ | **v2.4** | Correctness hardening: cross-build rsID identity table with explicit allele translation, plausibility flag for genotyping-artifact detection, VCF quality gate honouring FILTER and genotype quality, unified rsID-recovery step across all commands, and parser/format hygiene. |
121
+ | **Later** | Variant consequences, CNVs and repeat expansions, gnomAD genomes, supplemental genotype-file merging, ancestry estimation, and PRS support. These are directional themes rather than release commitments. |
117
122
 
118
- Issues and milestones are tracked at [github.com/allelix/allelix/issues](https://github.com/allelix/allelix/issues). Annotator-level strand-aware carrier matching (R-1) shipped in v2.1.0's ADR-0035 cluster.
123
+ Issues and milestones are tracked at [github.com/allelix/allelix/issues](https://github.com/allelix/allelix/issues). Annotator-level strand-aware carrier matching shipped in v2.1.0's ADR-0035 cluster.
119
124
 
120
125
  ## Supported Databases
121
126
 
122
127
  | Database | Status | Notes |
123
128
  |---|---|---|
124
- | ClinVar (GRCh37 + GRCh38) | ✓ | Public domain (NCBI). SNVs + indels + multi-allelic sites. **Both builds cached**; `analyze` dispatches by detected build (ADR-0021). Carrier rule (ADR-0007) requires the user to carry the ALT allele. Indel-anchor protection (ADR-0011) prevents single-base array readouts from matching anchor-base indels. |
129
+ | ClinVar (GRCh37 + GRCh38) | ✓ | Public domain (NCBI). SNVs + indels + multi-allelic sites. **Both builds cached**; `analyze` dispatches by detected build (ADR-0021). Rows are matched by chromosome, position, REF and ALT, never by rsID alone, and reference-allele records (REF = ALT) are never reported (ADR-0039). Carrier rule (ADR-0007) requires the user to carry the ALT allele. Indel-anchor protection (ADR-0011) prevents single-base array readouts from matching anchor-base indels. |
125
130
  | ClinPGx (formerly PharmGKB) | ✓ | CC BY-SA 4.0. Clinical annotations only — single-rsid SNVs; star alleles and haplotypes deferred (ADR-0009). **Primary non-finding filter is the ClinVar REF carrier rule (ADR-0023):** if ClinVar publishes a single-base REF for the rsid and the user is homozygous for it, the row is suppressed. CPIC's `(rsid, base) → function_class` join (ADR-0020) survives as a secondary tier for rsids ClinVar doesn't catalog. Earlier prose tiers (ADR-0013, ADR-0017, ADR-0018) are superseded. |
126
131
  | CPIC (per-allele function table) | ✓ | Internal data source for the ClinPGx filter. Fetched from `api.cpicpgx.org` at `db update` time. Used to populate the `pharmgkb_allele_function` table — not surfaced to end users as its own annotator. |
127
- | SNPedia | ✓ | CC BY-NC-SA 3.0 US. Pre-built cache downloaded via `db update` (~216K wiki pages, ~105K genotype rows). If the SNPedia database is absent, analysis runs without it. For commercial use, pass `--exclude-snpedia` — `analyze` runs using all other databases and omits SNPedia annotations. The cache can also be rebuilt from source via `scripts/scrape_snpedia.py` + `scripts/parse_snpedia.py`. |
128
- | GWAS Catalog | ✓ | Public domain (EBI/NHGRI). Trait–SNP associations with p-values and effect sizes. Carrier rule (ADR-0007) requires the user to carry the risk allele. P-value magnitude scoring (ADR-0024) maps continuous p-values to the 0–10 scale; unknown-risk-allele entries fire on rsID match alone but are capped at 3.0. |
129
- | gnomAD | ✓ | ODbL v1.0. **Enrichment annotator** — adds population allele frequency context to existing annotations. Shows how common each variant is in the general population (~16M exome variants from 730K individuals). A pathogenic variant that 35% of people carry reads very differently from one seen in 0.001%. Pre-built cache downloaded via `db update` (~6GB on disk). Use `--no-gnomad` to skip. |
130
- | AlphaMissense | ✓ | CC BY 4.0. **Enrichment annotator** — adds DeepMind's protein-structure-based pathogenicity predictions to existing annotations. Scores 71M missense variants on a 0–1 scale: <0.34 = likely benign, >0.564 = likely pathogenic. Complements ClinVar's expert classifications with computational predictions — especially valuable for variants ClinVar hasn't reviewed yet. Pre-built cache downloaded via `db update` (~8GB on disk). Use `--no-alphamissense` to skip. |
131
- | CADD | ✓ | LicenseRef-CADD (non-commercial). **Enrichment annotator** — adds PHRED-scaled deleteriousness scores from CADD v1.7. **Opt-in**, disabled by default; see [CADD modes](#cadd-modes) below for details. |
132
+ | SNPedia | ✓ | CC BY-NC-SA 3.0 US. Pre-built cache downloaded via `db update` (~216K wiki pages, ~105K genotype rows). The cache carries SNPedia's orientation metadata: minus-strand alleles are complemented before matching, while unknown-orientation palindromic genotypes abstain rather than risk a false match. If the database is absent, analysis runs without it. For commercial use, pass `--exclude-snpedia`. The cache can also be rebuilt from source via `scripts/scrape_snpedia.py` + `scripts/parse_snpedia.py`. |
133
+ | GWAS Catalog | ✓ | Public domain (EBI/NHGRI). Trait–SNP associations with p-values and effect sizes. Carrier rule (ADR-0007) requires the user to carry the risk allele. The reported allele is the study's effect (risk) allele, which can be the reference allele (ADR-0039). P-value magnitude scoring maps continuous p-values to the 0–10 scale; only a confidence-interval field that positively identifies a bare odds ratio receives the odds-ratio modifier. Beta coefficients and ambiguous or unit-bearing effects receive no modifier (ADR-0038). Unknown-risk-allele entries fire on rsID match alone but are capped at 3.0. GWAS risk-allele strand normalization remains deferred. |
134
+ | gnomAD | ✓ | ODbL v1.0. **GRCh38-only enrichment annotator** — adds population allele frequency context to existing annotations. Shows how common each variant is in the general population (~16M exome variants from 730K individuals). A pathogenic variant that 35% of people carry reads very differently from one seen in 0.001%. Pre-built cache downloaded via `db update` (~7 GB on disk). GRCh37 input is enriched only through the rsID identity table's explicit allele translation (ADR-0040); gnomAD's own rsID resolution stays GRCh38-only, and GRCh36 input receives nothing. Use `--no-gnomad` to skip. |
135
+ | AlphaMissense | ✓ | CC BY 4.0. **GRCh38-only enrichment annotator** — adds DeepMind's protein-structure-based pathogenicity predictions to existing annotations. Scores 71M missense variants on a 0–1 scale: <0.34 = likely benign, >0.564 = likely pathogenic. Complements ClinVar's expert classifications with computational predictions — especially valuable for variants ClinVar hasn't reviewed yet. Pre-built cache downloaded via `db update` (~8GB on disk). GRCh37 input is enriched only through the rsID identity table (ADR-0040); GRCh36 input receives nothing. Use `--no-alphamissense` to skip. |
136
+ | CADD | ✓ | LicenseRef-CADD (non-commercial). **GRCh38-only enrichment annotator** — adds PHRED-scaled deleteriousness scores from CADD v1.7. **Opt-in**, disabled by default; GRCh37 input is scored only through the rsID identity table (ADR-0040) and GRCh36 input never; see [CADD modes](#cadd-modes) below for details. |
137
+ | dbSNP rsID identity | ✓ | Public domain (NCBI dbSNP). Not an annotator: a cross-build table of each annotator rsID's GRCh37 and GRCh38 placement and alleles (ADR-0040). Supplies the reference allele for GRCh37 and GRCh38 array data, recovers rsIDs for rsID-less VCFs on both builds, and translates a GRCh37 allele to its GRCh38 coordinates so gnomAD, AlphaMissense and CADD can be looked up. Strand-inverted loci are translated explicitly; palindromic sites (A/T, C/G, or a site whose dbSNP alleles include all four bases) and alleles that became the GRCh38 reference abstain. Pre-built cache downloaded via `db update` (~4.9M rows covering ~3.0M rsIDs, from dbSNP b157). |
132
138
 
133
139
  ### CADD modes
134
140
 
135
141
  CADD ranks how deleterious any single-nucleotide variant is using 100+ annotation tracks (coding, non-coding, regulatory). PHRED 10 = top 10% most deleterious, 20 = top 1%, 30 = top 0.1%.
136
142
 
137
- **Opt-in**: enable via `allelix db update --cadd` or `allelix config set sources.cadd true`. Use `--no-cadd` to skip enrichment for a single run.
143
+ **Opt-in**: download the cache with `allelix db update --cadd`. Then pass `--cadd` to an analysis for a one-run override, or enable it persistently with `allelix config set sources.cadd true`. Downloading the cache alone does not change persistent configuration. Use `--no-cadd` to skip enrichment for a single run when it is enabled in config.
138
144
 
139
145
  Two modes:
140
146
 
141
- - **Cache mode** (default): pre-built ~5.8 GB SQLite cache (~120M variant keys). Covers nearly every position allelix can annotate from its other databases (gnomAD, AlphaMissense, ClinVar). For genotyping chip data (23andMe, AncestryDNA, MyHappyGenes, etc.), this mode is functionally complete — chip probes overwhelmingly target known, cataloged variants.
147
+ - **Cache mode** (default): pre-built ~5.8 GB SQLite cache (~120M GRCh38 variant keys). Covers nearly every GRCh38 position allelix can annotate from its other databases (gnomAD, AlphaMissense, ClinVar). GRCh37 input is scored only after translation through the rsID identity table; GRCh36 input never is.
142
148
  - **Full mode** (`options.cadd_full = true`): tabix queries against the complete CADD v1.7 file via pysam (GRCh38 only). Adds coverage for novel or private variants that appear only in WGS/WES data and are not in any pre-computed database. Requires `pip install allelix[cadd]` for the pysam dependency.
143
149
 
144
- If your input is a genotyping chip file, cache mode is all you need.
150
+ If your input is a genotyping chip file, cache mode is normally all you need. GRCh37 chip files are scored through the rsID identity table; GRCh36 files are not scored.
145
151
 
146
152
  ### Build coverage asymmetry (GRCh37 vs GRCh38)
147
153
 
148
- ClinVar dispatches per-build (ADR-0021) and ships with both GRCh37 and GRCh38 caches. The two caches are essentially equivalent in coverage: 2,896,063 rows / 2,645,206 distinct rsIDs in GRCh37 vs 2,896,102 / 2,645,243 in GRCh38 — a difference of 39 rows.
149
-
150
- Despite that equivalence, the same person's WGS file produces noticeably more annotations as GRCh37 than as GRCh38. The mechanism is in the resolution step, not in upstream-data shape. Position-keyed rsID resolution requires exact `(chromosome, position, ref, alt)` alignment between the user's variant call and ClinVar's stored row. Lift-over between builds does not preserve that alignment perfectly: the `~0.4%` of the genome where the reference assembly was rebuilt has different REF alleles, multi-allelic sites split differently, and some benchmark VCF positions drop out entirely in the GRCh38 lift. Each misalignment loses one resolution, which in turn loses all the rsID-keyed downstream annotations that rsID would have driven (ClinVar's own carrier annotation, plus GWAS Catalog, SNPedia, and ClinPGx).
151
-
152
- Real GIAB HG002 benchmark, surviving the default `--min-magnitude 5.0` filter: GRCh37 surfaces 520 distinct rsIDs across all sources, GRCh38 surfaces 341. The two sets overlap on 331 rsIDs; 189 are GRCh37-only and 10 are GRCh38-only — pure asymmetric loss in the GRCh38 lift, not different upstream coverage. The unfiltered totals (65,965 vs 4,867) magnify the same pattern at lower magnitudes, mostly via GWAS-Catalog weak-association rows.
154
+ ClinVar dispatches per build and ships with both GRCh37 and GRCh38 caches. gnomAD v4.1 exomes, AlphaMissense, and CADD v1.7 are GRCh38 datasets. Every enrichment lookup is made at GRCh38 coordinates by chromosome, position, reference and alternate allele, never by rsID. For GRCh37 input, the cross-build rsID identity table (ADR-0040) translates the allele the user carries at its GRCh37 position into the matching GRCh38 allele, written explicitly on the GRCh38 forward strand where the reference strand was inverted between assemblies. Palindromic sites (A/T, C/G, or all four bases in dbSNP, whose strand cannot be told from sequence) and alleles that are the GRCh38 reference receive no values rather than a guess. Without the identity table installed, GRCh37 analyses receive no gnomAD, AlphaMissense or CADD values; GRCh36 analyses never do.
153
155
 
154
- If you have a choice of build for the input, GRCh37 surfaces more annotations today on rsID-less VCFs that flow through position-keyed resolution. GRCh38 still surfaces every ClinVar carrier hit it has an exact alignment for.
156
+ Position-based rsID recovery for rsID-less VCFs uses ClinVar (on the selected build), the identity table (on GRCh37 and GRCh38), and gnomAD (GRCh38 only). The same recovery step runs for `analyze`, `stats`, `extract` and `export plink`, so high-value warnings, extracted genotypes and PLINK allele coding all see the recovered rsIDs (ADR-0043). The identity table covers the rsIDs the annotators hold, so an rsID-less GRCh37 VCF now recovers ClinPGx, GWAS Catalog and SNPedia rsIDs as well as ClinVar ones. If you convert between assemblies, re-normalize REF/ALT as part of the conversion and pass `--build` explicitly when the file does not carry a trustworthy build signal.
155
157
 
156
158
  ### Known ClinPGx limitation: reference-genotype rows where ClinVar and CPIC both lack data
157
159
 
@@ -168,9 +170,9 @@ The CFTR × ivacaftor leak (~30+ rows on real data, pre-v0.7.3) is fixed by the
168
170
 
169
171
  Two ClinVar rows in real-world reports are known upstream artifacts, not Allelix bugs:
170
172
 
171
- - **PKD1 rs199476100 GG (Pathogenic/Likely pathogenic, magnitude 8.5).** This is a stop-gained variant with a gnomAD frequency of 0.0005% (7 observations in 1.38 million chromosomes). Homozygosity for this variant is biologically implausible — PKD1 is autosomal dominant and the nonsense variant would be embryonic-lethal or devastating in homozygous state. The chip genotyping call is almost certainly a probe artifact. The code correctly reports what ClinVar says and what the chip reads; the error is upstream of Allelix. Future work: population-frequency filtering could flag ultra-rare variants where the chip call is likely unreliable.
173
+ - **PKD1 rs199476100 GG (Pathogenic/Likely pathogenic, magnitude 8.5).** This is a stop-gained variant with a gnomAD frequency of 0.0005% (7 observations in 1.38 million chromosomes). Homozygosity for this variant is biologically implausible — PKD1 is autosomal dominant and the nonsense variant would be embryonic-lethal or devastating in homozygous state. The chip genotyping call is almost certainly a probe artifact. The code correctly reports what ClinVar says and what the chip reads; the error is upstream of Allelix. The row is now marked implausible (see [Plausibility flag](#plausibility-flag)) but is still shown.
172
174
 
173
- - **IL10 rs1800896 CT (Pathogenic, magnitude 9.0).** This is a common polymorphism (MAF ~20–40%) in the IL-10 promoter. ClinVar's Pathogenic classification comes from a single submitter for hepatitis C susceptibility; a second submitter classifies the same allele as "Uncertain risk allele" for leprosy susceptibility. The ClinVar VCF aggregates across conditions, so the report may pair the Pathogenic classification with the wrong condition. Future work: ClinVar review-status weighting (number of submitters, star rating) could down-weight single-submitter classifications on common variants.
175
+ - **IL10 rs1800896 CT (Pathogenic, magnitude 9.0).** This is a common polymorphism (MAF ~20–40%) in the IL-10 promoter. ClinVar's Pathogenic classification comes from a single submitter for hepatitis C susceptibility; another submission classifies the allele as "Uncertain risk allele" for leprosy susceptibility. Allelix's per-SCV loader keeps each submitter's significance paired with its own condition, so it does not create cross-submission combinations. The remaining concern is the upstream strength of a single-submitter classification on a common variant. Future work: review-status weighting could down-weight that evidence.
174
176
 
175
177
  Neither issue affects Allelix's filter logic. Both are inherent to ClinVar's aggregation model and the limitations of array-based genotyping chips.
176
178
 
@@ -220,22 +222,41 @@ allelix config set license.commercial true
220
222
 
221
223
  # Assert that you hold a commercial CADD license
222
224
  allelix config set license.cadd true
225
+
226
+ # Tune the plausibility flag (allele frequencies between 0 and 1)
227
+ allelix config set plausibility.homozygous_max_af 0.0001
228
+ allelix config set plausibility.heterozygous_max_af 0
223
229
  ```
224
230
 
225
231
  CLI flags (`--no-gnomad`, `--no-alphamissense`, `--no-cadd`, `--exclude-snpedia`, `--cadd`) override the config for a single run. The config sets the baseline; flags override per-invocation.
226
232
 
233
+ ### Plausibility flag
234
+
235
+ Genotyping arrays sometimes miscall very rare variants, most visibly as a homozygous call for an allele almost nobody carries. Allelix compares each call with the allele's gnomAD frequency and marks it for review. The row is never hidden (ADR-0041).
236
+
237
+ | Call | gnomAD frequency of the allele | Flag |
238
+ |---|---|---|
239
+ | Homozygous | below `plausibility.homozygous_max_af` (default 0.0001, i.e. 0.01%) | **implausible**: often a genotyping artifact |
240
+ | Heterozygous | at or below `plausibility.heterozygous_max_af` (default 0: gnomAD has the site but no carriers) | **suspicious** |
241
+ | Either | otherwise | plausible |
242
+
243
+ The HTML report shows a ⚠ icon next to a flagged genotype, with the reason on hover and in the detail panel. The terminal table marks implausible calls with ⚠ and suspicious ones with ?. JSON reports carry `plausibility` on every annotation (`plausible`, `suspicious`, `implausible`, or empty when not assessed).
244
+
245
+ A call is not assessed when gnomAD has no frequency for the allele. Allelix's gnomAD cache covers exome sites with an rsID, so a missing value says nothing about rarity. Calls are also not assessed when the gnomAD database is skipped. Homozygous calls on X are not assessed because a male's single X reads as homozygous; heterozygous X calls are. Y and mitochondrial calls are not assessed. Confirm a flagged call with a clinical-grade test before relying on it.
246
+
227
247
  ### Database sizes and download times
228
248
 
229
249
  Not all databases are equal in size. `allelix db update` downloads them all by default, but you can skip the large ones if disk space or bandwidth is a concern:
230
250
 
231
251
  | Database | On disk | Download time | What it adds |
232
252
  |---|---|---|---|
233
- | ClinVar (GRCh37 + GRCh38) | ~900MB | 1–2 min | Core clinical variant classifications. Required. |
253
+ | ClinVar (GRCh37 + GRCh38) | ~1.6 GB | 1–2 min | Core clinical variant classifications. Required. |
234
254
  | ClinPGx + CPIC | ~6MB | seconds | Drug-gene interactions. |
235
- | GWAS Catalog | ~200MB | 1–2 min | Trait-SNP associations from genome-wide studies. |
236
- | gnomAD | ~6GB | 5–15 min | Population allele frequencies (how common is this variant?). |
255
+ | GWAS Catalog | ~950 MB | 1–2 min | Trait-SNP associations from genome-wide studies. |
256
+ | gnomAD | ~7 GB | 5–15 min | Population allele frequencies (how common is this variant?). |
237
257
  | AlphaMissense | ~8GB | 5–15 min | Missense pathogenicity predictions (how likely to break protein function?). |
238
- | CADD (opt-in) | ~5GB | 5–15 min | Variant deleteriousness scores (how damaging is this variant?). Enable with `--cadd`. |
258
+ | dbSNP rsID identity | ~460 MB | ~1 min | Cross-build placements: reference allele for array data, rsID recovery on both builds, GRCh37 enrichment translation. |
259
+ | CADD (opt-in) | ~6 GB | 5–15 min | Variant deleteriousness scores (how damaging is this variant?). Download with `db update --cadd`; enable per analysis or in config. |
239
260
 
240
261
  gnomAD and AlphaMissense are the largest but add the most interpretive context. gnomAD answers "is this variant rare or common?" — a pathogenic variant carried by 35% of the population reads very differently from one seen in 3 people. AlphaMissense answers "does this missense change likely damage the protein?" — especially valuable for the thousands of variants ClinVar hasn't reviewed yet.
241
262
 
@@ -243,25 +264,26 @@ To skip either during download: `allelix db update --no-gnomad --no-alphamissens
243
264
 
244
265
  ### Managing your data
245
266
 
246
- Allelix stores reference database caches at `~/.local/share/allelix/` (Linux/macOS) or the XDG-equivalent on other platforms. Default install (no CADD) is ~16 GB on disk; with the CADD opt-in it's ~22 GB.
267
+ Allelix stores reference database caches at `~/.local/share/allelix/` (Linux/macOS) or the XDG-equivalent on other platforms. Default install (no CADD) is ~18 GB on disk; with the CADD opt-in it's ~24 GB.
247
268
 
248
269
  ```
249
270
  ~/.local/share/allelix/
250
271
  ├── alphamissense.sqlite ~7.8 GB
251
- ├── gnomad.sqlite ~6.1 GB
272
+ ├── gnomad.sqlite ~7.1 GB
252
273
  ├── cadd.sqlite ~5.8 GB (only if you opted into --cadd)
253
- ├── clinvar.GRCh37.sqlite ~470 MB
254
- ├── clinvar.GRCh38.sqlite ~480 MB
255
- ├── gwas_catalog_associations.tsv ~700 MB
256
- ├── snpedia.sqlite ~390 MB
257
- ├── gwas.sqlite ~190 MB
258
- └── pharmgkb.sqlite ~14 MB
274
+ ├── clinvar.GRCh37.sqlite ~800 MB
275
+ ├── clinvar.GRCh38.sqlite ~800 MB
276
+ ├── gwas_catalog_associations.tsv ~745 MB
277
+ ├── rsid_identity.sqlite ~457 MB
278
+ ├── gwas.sqlite ~202 MB
279
+ ├── snpedia.sqlite ~194 MB
280
+ └── pharmgkb.sqlite ~6 MB
259
281
  ```
260
282
 
261
283
  **The caches are disposable and re-downloadable.** Everything here was fetched by `allelix db update` and can be re-fetched at any time. There's no per-user state in the cache — your genotype files never enter this directory. Safe to delete to reclaim space (or to force a full refresh if you suspect a cache went stale):
262
284
 
263
285
  ```bash
264
- # Reclaim all ~16-22 GB, with size report and confirmation prompt
286
+ # Reclaim all ~18-24 GB, with size report and confirmation prompt
265
287
  allelix db clean
266
288
 
267
289
  # Preserve the CADD cache (avoids re-downloading the slowest one, ~5.8 GB)
@@ -289,14 +311,15 @@ du -sh "$ALLELIX_DATA"
289
311
  allelix db path --check
290
312
  ```
291
313
 
292
- **The one thing worth backing up: `config.toml`.** It lives separately (XDG config dir, typically `~/.config/allelix/config.toml`) and stores your license assertions (commercial-mode toggle, CADD opt-in confirmation) and per-source enable/disable settings. It's the only non-reproducible state in the install. The caches will rebuild on the next `db update`; `config.toml` won't. `allelix db clean` preserves `config.toml` even when it lives inside the data directory (older installs).
314
+ **The one thing worth backing up: `config.toml`.** It lives inside the resolved data directory (typically `~/.local/share/allelix/config.toml`) and stores your license assertions (commercial-mode toggle, CADD opt-in confirmation) and per-source enable/disable settings. It's the only non-reproducible state in the install. The caches will rebuild on the next `db update`; `config.toml` won't. `allelix db clean` always preserves it.
293
315
 
294
316
  To fully uninstall allelix and reclaim everything:
295
317
 
296
318
  ```bash
319
+ ALLELIX_DATA=$(allelix db path)
320
+ allelix db clean --yes # reference database caches
321
+ rm -f "$ALLELIX_DATA/config.toml" # license + source-toggle config
297
322
  pip uninstall allelix
298
- allelix db clean --yes # reference database caches
299
- rm -rf ~/.config/allelix/ # license + source-toggle config
300
323
  ```
301
324
 
302
325
  ## Data Sources & Licensing
@@ -310,9 +333,10 @@ Allelix source code is licensed under the **GNU Affero General Public License v3
310
333
  | ClinPGx (formerly PharmGKB) | clinpgx.org | CC BY-SA 4.0 | Attribution required |
311
334
  | CPIC | cpicpgx.org | CC BY-SA 4.0 | Attribution required. Per-allele function data fetched from `api.cpicpgx.org` at `db update` time; used internally for the ClinPGx non-finding filter (ADR-0020), not surfaced as its own annotator. |
312
335
  | SNPedia | snpedia.com | CC BY-NC-SA 3.0 US | Attribution required, **non-commercial only**. Use `--exclude-snpedia` to omit. |
313
- | gnomAD | gnomad.broadinstitute.org | ODbL v1.0 | Attribution required. Population allele frequencies for context; not a clinical annotator. Use `--no-gnomad` to omit. |
314
- | AlphaMissense | zenodo.org/records/10813168 | CC BY 4.0 | Attribution required. Cheng et al., Science 2023. Missense variant pathogenicity predictions. Use `--no-alphamissense` to omit. |
315
- | CADD | cadd.gs.washington.edu | LicenseRef-CADD | Attribution required, **non-commercial by default**. Commercial licenses available from UW CoMotion. Opt-in via `allelix db update --cadd`. Use `--no-cadd` to omit. |
336
+ | gnomAD | gnomad.broadinstitute.org | ODbL v1.0 | Attribution required. GRCh38 population allele frequencies for context (GRCh37 input through the identity table); not a clinical annotator. Use `--no-gnomad` to omit. |
337
+ | AlphaMissense | zenodo.org/records/10813168 | CC BY 4.0 | Attribution required. Cheng et al., Science 2023. GRCh38 missense variant pathogenicity predictions (GRCh37 input through the identity table). Use `--no-alphamissense` to omit. |
338
+ | dbSNP (rsID identity table) | ncbi.nlm.nih.gov/snp | Public domain | No restrictions. Cross-build rsID placements derived from dbSNP; not surfaced as an annotator. |
339
+ | CADD | cadd.gs.washington.edu | LicenseRef-CADD | Attribution required, **non-commercial by default**. Commercial licenses available from UW CoMotion. GRCh38 scores (GRCh37 input through the identity table); download with `allelix db update --cadd`, then enable per analysis with `--cadd` or persistently in config. Use `--no-cadd` to omit. |
316
340
 
317
341
  **Commercial users:** When `license.commercial = true`, non-commercial sources are gated by a three-state permission model. SNPedia is permanently blocked (no commercial license is available). CADD is blocked by default but can be unlocked — the University of Washington offers commercial licenses at `https://els2.comotion.uw.edu/product/cadd-scores`; after purchasing, assert your license with `allelix config set license.cadd true` to re-enable CADD in commercial mode. All other databases (ClinVar, ClinPGx, GWAS Catalog, gnomAD, AlphaMissense) are compatible with commercial use. `allelix config show` displays the permission state for each source.
318
342
 
@@ -341,6 +365,8 @@ Of the 104,806 genotype pages in the archive:
341
365
 
342
366
  None of these are scraping errors. They are editorial inconsistencies on the source wiki. The annotator handles all of them correctly: incomplete entries are skipped, variant title formats are matched, and no false annotations are produced.
343
367
 
368
+ The v2.3.1 cache format also preserves each page's SNPedia orientation. Known minus-strand rows are complemented to forward orientation before genotype matching. For palindromic A/T or C/G genotypes whose orientation is unknown, Allelix abstains because the source data cannot distinguish the strands safely. Re-run `allelix db update` after upgrading so a pre-v2.3.1 SNPedia cache is rebuilt.
369
+
344
370
  ## Troubleshooting
345
371
 
346
372
  ### `ImportError: cannot import name 'UTC' from 'datetime'`
@@ -349,7 +375,7 @@ You're on Python 3.10 or older. Allelix requires 3.11+. `python --version` to ch
349
375
 
350
376
  ### `allelix db update` failed partway through
351
377
 
352
- Run it again. The update is idempotent — completed downloads are skipped (signal-matched against the upstream freshness probe), so re-running picks up where it left off. If a specific source keeps failing, you can isolate it: `allelix db update --no-gnomad` (or `--no-alphamissense` etc.) to skip the failing source for now, then retry that source standalone later.
378
+ Run it again. The update is idempotent — completed downloads are skipped (signal-matched against the upstream freshness probe), so re-running picks up where it left off. If a specific optional source keeps failing, use its `--no-*` flag to finish the other sources, then remove the skip flag and re-run the full update later. `--only clinvar` exists for the ClinVar-only CI and recovery path; other sources do not currently have standalone `--only` selectors.
353
379
 
354
380
  If the failure is a network timeout on the same source repeatedly, the issue is likely on the source's end (HuggingFace / NCBI / EBI / etc. transient outage). Wait an hour and retry.
355
381
 
@@ -359,7 +385,7 @@ Almost always a schema or interpreter version bump in a recent allelix release t
359
385
 
360
386
  ### Build mismatch warning when analyzing a known-good file
361
387
 
362
- Either: (a) the file's header claims one build and the position data is actually a different build (real-world MHG / Tempus exports do this — header says 37, positions are 38; ADR-0021 documents the auto-detection), or (b) the file is a GRCh36-era export (pre-2012), which allelix detects accurately but doesn't ship a ClinVar cache for (see [`docs/grch36-liftover.md`](https://github.com/allelix/allelix/blob/main/docs/grch36-liftover.md) for the external-liftover path).
388
+ Either: (a) the file's header claims one build and the position data confidently indicates another (real-world MHG / Tempus exports do this — header says 37, positions are 38), or (b) the position signal is too small or mixed to be authoritative. Allelix requires at least three concordant seed SNPs and an 80% winning ratio. A VCF record without an rsID counts as a seed when it sits at that seed's position on a build, so variant-caller output with an empty ID column is detected by position too. Weaker GRCh37/38 evidence is reported as tentative and the header or fallback remains effective. A tentative GRCh36 winner is the safety exception: Allelix uses GRCh36 so it cannot accidentally query a modern position cache. Modern position-keyed caches are unavailable for that build (see [`docs/grch36-liftover.md`](https://github.com/allelix/allelix/blob/main/docs/grch36-liftover.md)).
363
389
 
364
390
  If you trust the file's header more than allelix's detection, force the build: `--build grch37` or `--build grch38`. The build banner in the analyze output will reflect what was actually used.
365
391
 
@@ -388,6 +414,12 @@ Notable load-bearing ADRs:
388
414
  - **ADR-0007 — Genotype matching requires the user to carry the ALT allele.** Applies to ClinVar.
389
415
  - **ADR-0009 — ClinPGx matches the user's exact normalized diploid call.**
390
416
  - **ADR-0015 — Mock data generators are the contract.** Fixture shape must mirror real data shape; invariants tested.
417
+ - **ADR-0036 — Annotated VCF output contract.** JSON and annotated VCF schemas evolve independently.
418
+ - **ADR-0037 — Conservative position-based build confidence.** A winning build needs at least three matches and an 80% ratio; weaker signals remain diagnostic only.
419
+ - **ADR-0038 — GWAS effect-modifier disambiguation.** Only positively identified odds ratios receive an effect-size modifier; beta and ambiguous effects abstain.
420
+ - **ADR-0042 — VCF quality gate.** The variant caller's FILTER and genotype quality are honoured, low-quality reference blocks are no-calls, and every exclusion is counted in the report.
421
+ - **ADR-0043 — One rsID-recovery step.** Every command that needs rsIDs recovers them for rsID-less input through the same shared step; build detection votes by position instead.
422
+ - **ADR-0041 — Plausibility flag.** Very rare homozygous calls and heterozygous calls with no gnomAD carriers are flagged for review, never suppressed.
391
423
 
392
424
  Release history: see [`CHANGELOG.md`](https://github.com/allelix/allelix/blob/main/CHANGELOG.md).
393
425