allelix 2.3.1__tar.gz → 2.4.1__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 (98) hide show
  1. allelix-2.4.1/MANIFEST.in +4 -0
  2. {allelix-2.3.1 → allelix-2.4.1}/PKG-INFO +88 -42
  3. {allelix-2.3.1 → allelix-2.4.1}/README.md +87 -41
  4. {allelix-2.3.1 → allelix-2.4.1}/allelix/__init__.py +2 -2
  5. {allelix-2.3.1 → allelix-2.4.1}/allelix/annotators/__init__.py +10 -2
  6. allelix-2.4.1/allelix/annotators/_resolution.py +259 -0
  7. {allelix-2.3.1 → allelix-2.4.1}/allelix/annotators/alphamissense.py +7 -3
  8. {allelix-2.3.1 → allelix-2.4.1}/allelix/annotators/base.py +11 -0
  9. {allelix-2.3.1 → allelix-2.4.1}/allelix/annotators/cadd.py +4 -3
  10. {allelix-2.3.1 → allelix-2.4.1}/allelix/annotators/clinvar.py +233 -233
  11. {allelix-2.3.1 → allelix-2.4.1}/allelix/annotators/gnomad.py +7 -9
  12. {allelix-2.3.1 → allelix-2.4.1}/allelix/annotators/gwas.py +17 -5
  13. {allelix-2.3.1 → allelix-2.4.1}/allelix/annotators/pharmgkb.py +57 -75
  14. allelix-2.4.1/allelix/annotators/rsid_identity.py +237 -0
  15. {allelix-2.3.1 → allelix-2.4.1}/allelix/annotators/snpedia.py +7 -1
  16. {allelix-2.3.1 → allelix-2.4.1}/allelix/cli/_helpers.py +298 -141
  17. {allelix-2.3.1 → allelix-2.4.1}/allelix/cli/_options.py +31 -5
  18. {allelix-2.3.1 → allelix-2.4.1}/allelix/cli/analyze.py +8 -0
  19. {allelix-2.3.1 → allelix-2.4.1}/allelix/cli/config.py +48 -9
  20. {allelix-2.3.1 → allelix-2.4.1}/allelix/cli/db.py +15 -2
  21. {allelix-2.3.1 → allelix-2.4.1}/allelix/cli/utility.py +313 -174
  22. {allelix-2.3.1 → allelix-2.4.1}/allelix/config.py +47 -1
  23. {allelix-2.3.1 → allelix-2.4.1}/allelix/data/clinvar_clnsig_snapshot.yaml +4 -4
  24. {allelix-2.3.1 → allelix-2.4.1}/allelix/data/high_value_snps.yaml +1 -1
  25. {allelix-2.3.1 → allelix-2.4.1}/allelix/databases/_versions.py +6 -2
  26. {allelix-2.3.1 → allelix-2.4.1}/allelix/databases/cpic_loader.py +3 -3
  27. {allelix-2.3.1 → allelix-2.4.1}/allelix/databases/gwas_loader.py +2 -2
  28. {allelix-2.3.1 → allelix-2.4.1}/allelix/databases/manager.py +27 -18
  29. {allelix-2.3.1 → allelix-2.4.1}/allelix/databases/pharmgkb_loader.py +1 -1
  30. allelix-2.4.1/allelix/databases/rsid_identity_loader.py +377 -0
  31. {allelix-2.3.1 → allelix-2.4.1}/allelix/databases/schema.py +28 -0
  32. {allelix-2.3.1 → allelix-2.4.1}/allelix/databases/snpedia_parser.py +2 -2
  33. {allelix-2.3.1 → allelix-2.4.1}/allelix/exporters/plink.py +60 -8
  34. {allelix-2.3.1 → allelix-2.4.1}/allelix/models.py +73 -6
  35. {allelix-2.3.1 → allelix-2.4.1}/allelix/parsers/_helpers.py +24 -2
  36. {allelix-2.3.1 → allelix-2.4.1}/allelix/parsers/ancestrydna.py +6 -3
  37. {allelix-2.3.1 → allelix-2.4.1}/allelix/parsers/base.py +58 -10
  38. {allelix-2.3.1 → allelix-2.4.1}/allelix/parsers/ftdna.py +30 -16
  39. {allelix-2.3.1 → allelix-2.4.1}/allelix/parsers/ftdna_famfinder.py +14 -12
  40. {allelix-2.3.1 → allelix-2.4.1}/allelix/parsers/ftdna_illumina.py +15 -4
  41. {allelix-2.3.1 → allelix-2.4.1}/allelix/parsers/livingdna.py +7 -23
  42. {allelix-2.3.1 → allelix-2.4.1}/allelix/parsers/myhappygenes.py +3 -3
  43. allelix-2.4.1/allelix/parsers/myheritage.py +209 -0
  44. {allelix-2.3.1 → allelix-2.4.1}/allelix/parsers/twentythreeandme.py +4 -17
  45. {allelix-2.3.1 → allelix-2.4.1}/allelix/parsers/vcf.py +540 -90
  46. allelix-2.4.1/allelix/reports/__init__.py +108 -0
  47. allelix-2.4.1/allelix/reports/_pipeline.py +1076 -0
  48. allelix-2.4.1/allelix/reports/build_text.py +220 -0
  49. {allelix-2.3.1 → allelix-2.4.1}/allelix/reports/diff.py +5 -5
  50. {allelix-2.3.1 → allelix-2.4.1}/allelix/reports/high_value.py +43 -4
  51. {allelix-2.3.1 → allelix-2.4.1}/allelix/reports/html.py +126 -20
  52. {allelix-2.3.1 → allelix-2.4.1}/allelix/reports/json_report.py +45 -7
  53. {allelix-2.3.1 → allelix-2.4.1}/allelix/reports/terminal.py +26 -6
  54. {allelix-2.3.1 → allelix-2.4.1}/allelix/reports/vcf.py +44 -8
  55. {allelix-2.3.1 → allelix-2.4.1}/allelix/utils/allele.py +85 -6
  56. allelix-2.4.1/allelix/utils/build_detect.py +689 -0
  57. allelix-2.4.1/allelix/utils/plausibility.py +77 -0
  58. {allelix-2.3.1 → allelix-2.4.1}/allelix.egg-info/PKG-INFO +88 -42
  59. {allelix-2.3.1 → allelix-2.4.1}/allelix.egg-info/SOURCES.txt +6 -13
  60. {allelix-2.3.1 → allelix-2.4.1}/pyproject.toml +9 -9
  61. allelix-2.3.1/allelix/parsers/myheritage.py +0 -118
  62. allelix-2.3.1/allelix/reports/__init__.py +0 -40
  63. allelix-2.3.1/allelix/reports/_pipeline.py +0 -987
  64. allelix-2.3.1/allelix/utils/build_detect.py +0 -232
  65. allelix-2.3.1/tests/test_changelog_sanitize.py +0 -179
  66. allelix-2.3.1/tests/test_cli.py +0 -3218
  67. allelix-2.3.1/tests/test_cli_helpers.py +0 -138
  68. allelix-2.3.1/tests/test_cli_vcf_out.py +0 -363
  69. allelix-2.3.1/tests/test_compare.py +0 -160
  70. allelix-2.3.1/tests/test_config.py +0 -400
  71. allelix-2.3.1/tests/test_end_to_end.py +0 -534
  72. allelix-2.3.1/tests/test_extract_rsidless_gh128.py +0 -201
  73. allelix-2.3.1/tests/test_mock_data_invariants.py +0 -327
  74. allelix-2.3.1/tests/test_models.py +0 -221
  75. allelix-2.3.1/tests/test_original_rsid_never_serializes.py +0 -296
  76. allelix-2.3.1/tests/test_registry.py +0 -41
  77. allelix-2.3.1/tests/test_version.py +0 -100
  78. {allelix-2.3.1 → allelix-2.4.1}/LICENSE +0 -0
  79. {allelix-2.3.1 → allelix-2.4.1}/allelix/cli/__init__.py +0 -0
  80. {allelix-2.3.1 → allelix-2.4.1}/allelix/cli/focused.py +0 -0
  81. {allelix-2.3.1 → allelix-2.4.1}/allelix/compare.py +0 -0
  82. {allelix-2.3.1 → allelix-2.4.1}/allelix/data/__init__.py +0 -0
  83. {allelix-2.3.1 → allelix-2.4.1}/allelix/databases/__init__.py +0 -0
  84. {allelix-2.3.1 → allelix-2.4.1}/allelix/databases/alphamissense_loader.py +0 -0
  85. {allelix-2.3.1 → allelix-2.4.1}/allelix/databases/cadd_loader.py +0 -0
  86. {allelix-2.3.1 → allelix-2.4.1}/allelix/databases/gnomad_loader.py +0 -0
  87. {allelix-2.3.1 → allelix-2.4.1}/allelix/databases/loader_utils.py +0 -0
  88. {allelix-2.3.1 → allelix-2.4.1}/allelix/databases/snpedia_loader.py +0 -0
  89. {allelix-2.3.1 → allelix-2.4.1}/allelix/exporters/__init__.py +0 -0
  90. {allelix-2.3.1 → allelix-2.4.1}/allelix/parsers/__init__.py +0 -0
  91. {allelix-2.3.1 → allelix-2.4.1}/allelix/py.typed +0 -0
  92. {allelix-2.3.1 → allelix-2.4.1}/allelix/reports/methylation.py +0 -0
  93. {allelix-2.3.1 → allelix-2.4.1}/allelix/utils/__init__.py +0 -0
  94. {allelix-2.3.1 → allelix-2.4.1}/allelix.egg-info/dependency_links.txt +0 -0
  95. {allelix-2.3.1 → allelix-2.4.1}/allelix.egg-info/entry_points.txt +0 -0
  96. {allelix-2.3.1 → allelix-2.4.1}/allelix.egg-info/requires.txt +0 -0
  97. {allelix-2.3.1 → allelix-2.4.1}/allelix.egg-info/top_level.txt +0 -0
  98. {allelix-2.3.1 → allelix-2.4.1}/setup.cfg +0 -0
@@ -0,0 +1,4 @@
1
+ # The source distribution ships what the package needs to build and install.
2
+ # setuptools adds tests/test*.py by default; the test suite (with its
3
+ # fixtures and conftest) lives in the repository, not in the distribution.
4
+ prune tests
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: allelix
3
- Version: 2.3.1
3
+ Version: 2.4.1
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>
@@ -47,7 +47,7 @@ Dynamic: license-file
47
47
 
48
48
  [![python](https://img.shields.io/pypi/pyversions/allelix.svg)](https://www.python.org/downloads/)
49
49
  [![pypi](https://img.shields.io/pypi/v/allelix.svg)](https://pypi.org/project/allelix/)
50
- [![license](https://img.shields.io/pypi/l/allelix.svg)](LICENSE)
50
+ [![license](https://img.shields.io/pypi/l/allelix.svg)](https://github.com/allelix/allelix/blob/main/LICENSE)
51
51
  [![CI](https://github.com/allelix/allelix/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/allelix/allelix/actions/workflows/ci.yml)
52
52
  [![privacy: local-first](https://img.shields.io/badge/privacy-local--first-success)](#privacy)
53
53
 
@@ -55,7 +55,7 @@ Dynamic: license-file
55
55
 
56
56
  # Allelix
57
57
 
58
- > **Status:** Production. Nine parser formats (including VCF + gVCF), four annotators (ClinVar + ClinPGx + GWAS Catalog + SNPedia), three GRCh38-only 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. 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.
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. The genome build is decided before annotation from the evidence the file carries: VCF contig lengths, or known-SNP positions from the whole file. Evidence that contradicts the file's label, or a VCF with no usable evidence, stops the run and asks for `--build` instead of producing a report on the wrong build; a tentative GRCh36 signal fails closed to GRCh36 because no modern position cache is safe for it (ADR-0025, ADR-0037, ADR-0044). 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,7 +64,7 @@ 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
69
  # CADD is opt-in: download with `allelix db update --cadd`, then pass
70
70
  # `--cadd` to an analysis or set `sources.cadd = true` persistently.
@@ -79,6 +79,10 @@ allelix analyze your_wgs.vcf.gz --output report.html
79
79
  # Multi-sample VCF — pick which sample to analyze
80
80
  allelix analyze trio.vcf.gz --sample HG002 --output report.html
81
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
+
82
86
  # Filter to a custom panel (rsIDs + gene names, one per line; '#' comments and blank lines ignored)
83
87
  allelix analyze your_genotype_file.txt --filter-file my_panel.txt --output report.html
84
88
 
@@ -95,15 +99,15 @@ See [Development](#development) for source installs and running tests, [Managing
95
99
 
96
100
  | Format | Status | Notes |
97
101
  |---|---|---|
98
- | 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 decides the build from position data and warns on header/data disagreement (ADR-0021, ADR-0044). See [docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#myhappygenes-tempus). |
99
103
  | 23andMe | ✓ | Tab-delimited, 4 columns, concatenated genotype. Supports build 36/37/38 from header. I-prefixed probe IDs passed through. |
100
104
  | AncestryDNA | ✓ | Tab-delimited, 5 columns. Chromosome mapping: 23→X, 24→Y, 25→X (PAR), 26→MT. V1 and V2 chip layouts. |
101
- | Family Tree DNA | ✓ | CSV, double-quoted fields, concatenated genotype. Build 37 default. |
102
- | MyHeritage DNA | ✓ | CSV, same structure as FTDNA. Detected by "MyHeritage" in comment header. Handles double-double-quoted field variant. |
105
+ | Family Tree DNA | ✓ | CSV, double-quoted fields, concatenated genotype. Build 37 default when known-SNP positions are present but do not decide; with none at all and no build line, the run stops (ADR-0044). |
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). |
103
107
  | Living DNA | ✓ | Tab-delimited despite `.csv` extension. Handles AX-, AFFX-prefixed and CHR:POS positional SNP IDs. |
104
- | FTDNA Illumina raw | ✓ | Tab-delimited variant of the FTDNA export (distinct from the CSV format above). `RSID/CHROMOSOME/POSITION/RESULT` columns. Build 37 default. |
105
- | 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. |
106
- | 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. |
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 when known-SNP positions are present but do not decide. |
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 when known-SNP positions are present but do not decide. |
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. |
107
111
 
108
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`.
109
113
 
@@ -113,23 +117,24 @@ Adding a new format means adding one file to `allelix/parsers/` and registering
113
117
  |---|---|
114
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`). |
115
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. |
116
- | **v2.4** | Forward-strand normalization for GWAS risk alleles, broader and chromosome-aware build sampling with explicit provenance, test isolation, and deferred cache-loader hardening. |
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. |
117
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. |
118
122
 
119
- 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.
120
124
 
121
125
  ## Supported Databases
122
126
 
123
127
  | Database | Status | Notes |
124
128
  |---|---|---|
125
- | 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 the decided build (ADR-0044). 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. |
126
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. |
127
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. |
128
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`. |
129
- | 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 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 to v2.4. |
130
- | 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` (~6GB on disk). It is deliberately disabled, including for rsID resolution, on GRCh37 and GRCh36 inputs. Use `--no-gnomad` to skip. |
131
- | 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). It is deliberately disabled on GRCh37 and GRCh36 inputs. Use `--no-alphamissense` to skip. |
132
- | CADD | ✓ | LicenseRef-CADD (non-commercial). **GRCh38-only enrichment annotator** — adds PHRED-scaled deleteriousness scores from CADD v1.7. **Opt-in**, disabled by default and always disabled on GRCh37 and GRCh36 inputs; see [CADD modes](#cadd-modes) below for details. |
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). |
133
138
 
134
139
  ### CADD modes
135
140
 
@@ -139,16 +144,16 @@ CADD ranks how deleterious any single-nucleotide variant is using 100+ annotatio
139
144
 
140
145
  Two modes:
141
146
 
142
- - **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). It is deliberately disabled for GRCh37 and GRCh36 input, even when an rsID happens to exist in the cache.
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.
143
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.
144
149
 
145
- If your input is a GRCh38 genotyping chip file, cache mode is normally all you need. CADD enrichment is unavailable for GRCh37 and GRCh36 chip files.
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.
146
151
 
147
152
  ### Build coverage asymmetry (GRCh37 vs GRCh38)
148
153
 
149
- ClinVar dispatches per build and ships with both GRCh37 and GRCh38 caches. gnomAD v4.1 exomes, AlphaMissense, and CADD v1.7 are GRCh38 datasets in Allelix's current data model. Their enrichment and provenance are therefore emitted only for GRCh38 analyses; GRCh37 and GRCh36 analyses intentionally receive none of those values. This guard prevents an rsID or coordinate collision from attaching a valid GRCh38 score to the wrong allele on another assembly.
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.
150
155
 
151
- The same rule applies to position-based rsID recovery: ClinVar can resolve against the selected GRCh37 or GRCh38 cache, while the broader gnomAD resolver participates only on GRCh38. GRCh37 files with rsIDs still use ClinPGx, GWAS Catalog, and SNPedia normally, but an rsID-less GRCh37 VCF has narrower recovery coverage. 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.
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.
152
157
 
153
158
  ### Known ClinPGx limitation: reference-genotype rows where ClinVar and CPIC both lack data
154
159
 
@@ -165,7 +170,7 @@ The CFTR × ivacaftor leak (~30+ rows on real data, pre-v0.7.3) is fixed by the
165
170
 
166
171
  Two ClinVar rows in real-world reports are known upstream artifacts, not Allelix bugs:
167
172
 
168
- - **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.
169
174
 
170
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.
171
176
 
@@ -217,22 +222,41 @@ allelix config set license.commercial true
217
222
 
218
223
  # Assert that you hold a commercial CADD license
219
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
220
229
  ```
221
230
 
222
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.
223
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
+
224
247
  ### Database sizes and download times
225
248
 
226
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:
227
250
 
228
251
  | Database | On disk | Download time | What it adds |
229
252
  |---|---|---|---|
230
- | 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. |
231
254
  | ClinPGx + CPIC | ~6MB | seconds | Drug-gene interactions. |
232
- | GWAS Catalog | ~200MB | 1–2 min | Trait-SNP associations from genome-wide studies. |
233
- | 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?). |
234
257
  | AlphaMissense | ~8GB | 5–15 min | Missense pathogenicity predictions (how likely to break protein function?). |
235
- | CADD (opt-in) | ~5GB | 5–15 min | Variant deleteriousness scores (how damaging is this variant?). Download with `db update --cadd`; enable per analysis or in config. |
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. |
236
260
 
237
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.
238
262
 
@@ -240,25 +264,26 @@ To skip either during download: `allelix db update --no-gnomad --no-alphamissens
240
264
 
241
265
  ### Managing your data
242
266
 
243
- 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.
244
268
 
245
269
  ```
246
270
  ~/.local/share/allelix/
247
271
  ├── alphamissense.sqlite ~7.8 GB
248
- ├── gnomad.sqlite ~6.1 GB
272
+ ├── gnomad.sqlite ~7.1 GB
249
273
  ├── cadd.sqlite ~5.8 GB (only if you opted into --cadd)
250
- ├── clinvar.GRCh37.sqlite ~470 MB
251
- ├── clinvar.GRCh38.sqlite ~480 MB
252
- ├── gwas_catalog_associations.tsv ~700 MB
253
- ├── snpedia.sqlite ~390 MB
254
- ├── gwas.sqlite ~190 MB
255
- └── 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
256
281
  ```
257
282
 
258
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):
259
284
 
260
285
  ```bash
261
- # Reclaim all ~16-22 GB, with size report and confirmation prompt
286
+ # Reclaim all ~18-24 GB, with size report and confirmation prompt
262
287
  allelix db clean
263
288
 
264
289
  # Preserve the CADD cache (avoids re-downloading the slowest one, ~5.8 GB)
@@ -308,9 +333,10 @@ Allelix source code is licensed under the **GNU Affero General Public License v3
308
333
  | ClinPGx (formerly PharmGKB) | clinpgx.org | CC BY-SA 4.0 | Attribution required |
309
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. |
310
335
  | SNPedia | snpedia.com | CC BY-NC-SA 3.0 US | Attribution required, **non-commercial only**. Use `--exclude-snpedia` to omit. |
311
- | gnomAD | gnomad.broadinstitute.org | ODbL v1.0 | Attribution required. GRCh38-only population allele frequencies for context; not a clinical annotator. Use `--no-gnomad` to omit. |
312
- | AlphaMissense | zenodo.org/records/10813168 | CC BY 4.0 | Attribution required. Cheng et al., Science 2023. GRCh38-only missense variant pathogenicity predictions. Use `--no-alphamissense` to omit. |
313
- | CADD | cadd.gs.washington.edu | LicenseRef-CADD | Attribution required, **non-commercial by default**. Commercial licenses available from UW CoMotion. GRCh38-only enrichment; download with `allelix db update --cadd`, then enable per analysis with `--cadd` or persistently in config. 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. |
314
340
 
315
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.
316
342
 
@@ -357,11 +383,27 @@ If the failure is a network timeout on the same source repeatedly, the issue is
357
383
 
358
384
  Almost always a schema or interpreter version bump in a recent allelix release that invalidates the pre-bump cache. The fix is `allelix db update` — it'll re-ingest only the affected annotators (everything else signal-skips). See the relevant `CHANGELOG.md` entry for "Cache invalidation" notes per release.
359
385
 
360
- ### Build mismatch warning when analyzing a known-good file
386
+ ### How the genome build is decided, and why a run can stop
387
+
388
+ Before anything is annotated, Allelix decides the file's genome build from the evidence the file itself carries (ADR-0044):
389
+
390
+ - **VCF contig lengths.** Every nuclear chromosome has a different length in GRCh37 and GRCh38, so the `##contig` lengths settle the build whatever the contig names look like (`chr1` or `1`). If chrM has the old hg19 length, mitochondrial records are not annotated and a note says so.
391
+ - **Known-SNP positions across the whole file.** A set of well-known SNPs sits at different positions in each build. Allelix reads the whole file for them before annotating (a few seconds on a full chip). At least three concordant positions and an 80% majority make the evidence confident (ADR-0037). A VCF record without an rsID counts when it sits at such a position.
392
+ - **The file's own label** (a build line in an array header, or a VCF `assembly=`) is used only when the evidence does not contradict it.
393
+
394
+ The banner says where the build came from, for example `Build: GRCh38 (from the contig lengths: 24 contig length(s) match GRCh38)`. If confident positions contradict the label (real-world MHG / Tempus exports say 37 and ship 38), Allelix uses the positions and prints a **Build mismatch** notice. An unlabelled chip whose known-SNP positions do not decide uses its format's documented default, with a visible note, provided at least one of those positions matches a build and the build most of them match is the default (a few that disagree do not stop it); the note gives the counts. A tentative GRCh36 winner is the safety exception: Allelix uses GRCh36 so it cannot query a modern position cache (see [`docs/grch36-liftover.md`](https://github.com/allelix/allelix/blob/main/docs/grch36-liftover.md)).
395
+
396
+ **The run stops** instead of guessing when:
361
397
 
362
- 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; 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)).
398
+ - a VCF's contig lengths contradict its `assembly=`, contradict each other, or match no supported assembly;
399
+ - weaker (tentative) position evidence contradicts the file's label, or points an unlabelled chip away from its default;
400
+ - the known-SNP positions are tied between builds and the build that would otherwise decide (the label, the format default, or the contig-length build) is not one of them. When it is one of them, Allelix proceeds on it and prints an "inconclusive" warning, also shown in the HTML report. Without contig lengths, a tie that includes GRCh36 instead takes the GRCh36 safety exception described above, with the same warning;
401
+ - a VCF has no contig lengths, no assembly and too few known-SNP positions;
402
+ - a chip states no build and carries none of the known-SNP positions at all (for example an X-chromosome-only export, since they are all on autosomes);
403
+ - the file has known-SNP positions but none of them sits at any supported build's coordinate, whether or not it states a build (contig lengths, when a VCF declares them, still decide);
404
+ - contig lengths decided, but the known-SNP positions met while annotating point to the other build (for example a lifted-over file that kept its old header). The message says the annotation pass ran; nothing is written.
363
405
 
364
- 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.
406
+ The message names the evidence and asks you to say which build the file uses: `--build grch37` or `--build grch38`, or `--build grch36` for an old GRCh36 / hg18 file, which then runs with position-keyed lookups off (see [`docs/grch36-liftover.md`](https://github.com/allelix/allelix/blob/main/docs/grch36-liftover.md)). For `compare`, use `--build1` / `--build2`. A stop leaves no report, annotated VCF, diff, PLINK files or extract table behind. A forced build is recorded as such in every report.
365
407
 
366
408
  ### Is my database stale? How fresh is the data?
367
409
 
@@ -391,6 +433,10 @@ Notable load-bearing ADRs:
391
433
  - **ADR-0036 — Annotated VCF output contract.** JSON and annotated VCF schemas evolve independently.
392
434
  - **ADR-0037 — Conservative position-based build confidence.** A winning build needs at least three matches and an 80% ratio; weaker signals remain diagnostic only.
393
435
  - **ADR-0038 — GWAS effect-modifier disambiguation.** Only positively identified odds ratios receive an effect-size modifier; beta and ambiguous effects abstain.
436
+ - **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.
437
+ - **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.
438
+ - **ADR-0044 — Evidence before labels.** The build is decided before annotation from contig lengths or whole-file known-SNP positions; evidence that contradicts the label, or no usable evidence, stops the run instead of producing a report on the wrong build.
439
+ - **ADR-0041 — Plausibility flag.** Very rare homozygous calls and heterozygous calls with no gnomAD carriers are flagged for review, never suppressed.
394
440
 
395
441
  Release history: see [`CHANGELOG.md`](https://github.com/allelix/allelix/blob/main/CHANGELOG.md).
396
442
 
@@ -410,7 +456,7 @@ pytest
410
456
 
411
457
  The pre-commit hook enforces `ruff check` + `ruff format --check`. If a commit is blocked, fix the underlying problem rather than skipping the hook.
412
458
 
413
- For the full real-data release-validation battery — every parser format, VCF/gVCF, PLINK round-trip, edge cases, the GIAB/1000G corpus — see [`test_data/FULL_TEST_PROTOCOL.md`](test_data/FULL_TEST_PROTOCOL.md). That document is the project's real-data testing story; running `pytest` covers the fast suite that gates every commit.
459
+ For the full real-data release-validation battery — every parser format, VCF/gVCF, PLINK round-trip, edge cases, the GIAB/1000G corpus — see [`test_data/FULL_TEST_PROTOCOL.md`](https://github.com/allelix/allelix/blob/main/test_data/FULL_TEST_PROTOCOL.md). That document is the project's real-data testing story; running `pytest` covers the fast suite that gates every commit.
414
460
 
415
461
  ## License
416
462