allelix 2.7.1__tar.gz → 2.8.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 (117) hide show
  1. {allelix-2.7.1/allelix.egg-info → allelix-2.8.0}/PKG-INFO +16 -7
  2. {allelix-2.7.1 → allelix-2.8.0}/README.md +15 -6
  3. {allelix-2.7.1 → allelix-2.8.0}/allelix/annotators/__init__.py +17 -1
  4. allelix-2.8.0/allelix/annotators/_resolution.py +1325 -0
  5. {allelix-2.7.1 → allelix-2.8.0}/allelix/annotators/alphamissense.py +34 -0
  6. allelix-2.8.0/allelix/annotators/alt_naming.py +70 -0
  7. {allelix-2.7.1 → allelix-2.8.0}/allelix/annotators/base.py +11 -0
  8. {allelix-2.7.1 → allelix-2.8.0}/allelix/annotators/clinvar.py +335 -36
  9. {allelix-2.7.1 → allelix-2.8.0}/allelix/annotators/gnomad.py +138 -22
  10. {allelix-2.7.1 → allelix-2.8.0}/allelix/annotators/gwas.py +79 -26
  11. allelix-2.8.0/allelix/annotators/naming_chain.py +872 -0
  12. allelix-2.8.0/allelix/annotators/rare_alleles.py +151 -0
  13. {allelix-2.7.1 → allelix-2.8.0}/allelix/annotators/rsid_identity.py +224 -26
  14. allelix-2.8.0/allelix/annotators/transcripts.py +281 -0
  15. {allelix-2.7.1 → allelix-2.8.0}/allelix/attribution.py +33 -1
  16. {allelix-2.7.1 → allelix-2.8.0}/allelix/cli/_helpers.py +82 -27
  17. {allelix-2.7.1 → allelix-2.8.0}/allelix/cli/db.py +56 -11
  18. {allelix-2.7.1 → allelix-2.8.0}/allelix/cli/utility.py +559 -76
  19. {allelix-2.7.1 → allelix-2.8.0}/allelix/config.py +1 -0
  20. allelix-2.8.0/allelix/consequence/__init__.py +11 -0
  21. allelix-2.8.0/allelix/consequence/cache.py +317 -0
  22. allelix-2.8.0/allelix/consequence/caller.py +494 -0
  23. allelix-2.8.0/allelix/consequence/coding.py +913 -0
  24. allelix-2.8.0/allelix/consequence/codons.py +82 -0
  25. allelix-2.8.0/allelix/consequence/csq.py +640 -0
  26. allelix-2.8.0/allelix/consequence/hgvs.py +1385 -0
  27. allelix-2.8.0/allelix/consequence/lift37_source.py +142 -0
  28. allelix-2.8.0/allelix/consequence/location.py +278 -0
  29. allelix-2.8.0/allelix/consequence/mane_source.py +290 -0
  30. allelix-2.8.0/allelix/consequence/model.py +220 -0
  31. allelix-2.8.0/allelix/consequence/mt_source.py +162 -0
  32. allelix-2.8.0/allelix/consequence/report.py +228 -0
  33. allelix-2.8.0/allelix/consequence/terms.py +61 -0
  34. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/_versions.py +5 -1
  35. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/gwas_loader.py +140 -11
  36. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/manager.py +6 -3
  37. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/schema.py +108 -0
  38. allelix-2.8.0/allelix/databases/sidecar.py +178 -0
  39. allelix-2.8.0/allelix/databases/transcript_loader.py +75 -0
  40. {allelix-2.7.1 → allelix-2.8.0}/allelix/models.py +67 -7
  41. {allelix-2.7.1 → allelix-2.8.0}/allelix/parsers/_helpers.py +22 -1
  42. allelix-2.8.0/allelix/parsers/split_site.py +813 -0
  43. {allelix-2.7.1 → allelix-2.8.0}/allelix/parsers/twentythreeandme.py +1 -1
  44. {allelix-2.7.1 → allelix-2.8.0}/allelix/parsers/vcf.py +737 -304
  45. {allelix-2.7.1 → allelix-2.8.0}/allelix/reports/__init__.py +3 -2
  46. {allelix-2.7.1 → allelix-2.8.0}/allelix/reports/_pipeline.py +1063 -106
  47. {allelix-2.7.1 → allelix-2.8.0}/allelix/reports/association_text.py +30 -0
  48. {allelix-2.7.1 → allelix-2.8.0}/allelix/reports/diff.py +43 -2
  49. {allelix-2.7.1 → allelix-2.8.0}/allelix/reports/high_value.py +36 -4
  50. {allelix-2.7.1 → allelix-2.8.0}/allelix/reports/html.py +44 -8
  51. {allelix-2.7.1 → allelix-2.8.0}/allelix/reports/json_report.py +45 -6
  52. {allelix-2.7.1 → allelix-2.8.0}/allelix/reports/terminal.py +2 -0
  53. {allelix-2.7.1 → allelix-2.8.0}/allelix/reports/vcf.py +399 -19
  54. {allelix-2.7.1 → allelix-2.8.0}/allelix/utils/allele.py +19 -2
  55. allelix-2.8.0/allelix/utils/numbers.py +22 -0
  56. allelix-2.8.0/allelix/utils/source_id.py +78 -0
  57. {allelix-2.7.1 → allelix-2.8.0/allelix.egg-info}/PKG-INFO +16 -7
  58. {allelix-2.7.1 → allelix-2.8.0}/allelix.egg-info/SOURCES.txt +24 -1
  59. {allelix-2.7.1 → allelix-2.8.0}/pyproject.toml +16 -16
  60. allelix-2.7.1/allelix/annotators/_resolution.py +0 -451
  61. {allelix-2.7.1 → allelix-2.8.0}/LICENSE +0 -0
  62. {allelix-2.7.1 → allelix-2.8.0}/MANIFEST.in +0 -0
  63. {allelix-2.7.1 → allelix-2.8.0}/allelix/__init__.py +0 -0
  64. {allelix-2.7.1 → allelix-2.8.0}/allelix/annotators/_placement.py +0 -0
  65. {allelix-2.7.1 → allelix-2.8.0}/allelix/annotators/cadd.py +0 -0
  66. {allelix-2.7.1 → allelix-2.8.0}/allelix/annotators/pharmgkb.py +0 -0
  67. {allelix-2.7.1 → allelix-2.8.0}/allelix/annotators/reference_fallback.py +0 -0
  68. {allelix-2.7.1 → allelix-2.8.0}/allelix/annotators/snpedia.py +0 -0
  69. {allelix-2.7.1 → allelix-2.8.0}/allelix/cli/__init__.py +0 -0
  70. {allelix-2.7.1 → allelix-2.8.0}/allelix/cli/_options.py +0 -0
  71. {allelix-2.7.1 → allelix-2.8.0}/allelix/cli/analyze.py +0 -0
  72. {allelix-2.7.1 → allelix-2.8.0}/allelix/cli/config.py +0 -0
  73. {allelix-2.7.1 → allelix-2.8.0}/allelix/cli/focused.py +0 -0
  74. {allelix-2.7.1 → allelix-2.8.0}/allelix/compare.py +0 -0
  75. {allelix-2.7.1 → allelix-2.8.0}/allelix/data/__init__.py +0 -0
  76. {allelix-2.7.1 → allelix-2.8.0}/allelix/data/clinvar_clnsig_snapshot.yaml +0 -0
  77. {allelix-2.7.1 → allelix-2.8.0}/allelix/data/high_value_snps.yaml +0 -0
  78. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/__init__.py +0 -0
  79. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/alphamissense_loader.py +0 -0
  80. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/cache_state.py +0 -0
  81. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/cadd_loader.py +0 -0
  82. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/cpic_loader.py +0 -0
  83. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/gnomad_loader.py +0 -0
  84. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/loader_utils.py +0 -0
  85. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/pharmgkb_loader.py +0 -0
  86. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/rsid_identity_loader.py +0 -0
  87. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/snpedia_loader.py +0 -0
  88. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/snpedia_parser.py +0 -0
  89. {allelix-2.7.1 → allelix-2.8.0}/allelix/databases/staging.py +0 -0
  90. {allelix-2.7.1 → allelix-2.8.0}/allelix/exporters/__init__.py +0 -0
  91. {allelix-2.7.1 → allelix-2.8.0}/allelix/exporters/plink.py +0 -0
  92. {allelix-2.7.1 → allelix-2.8.0}/allelix/parsers/__init__.py +0 -0
  93. {allelix-2.7.1 → allelix-2.8.0}/allelix/parsers/ancestrydna.py +0 -0
  94. {allelix-2.7.1 → allelix-2.8.0}/allelix/parsers/base.py +0 -0
  95. {allelix-2.7.1 → allelix-2.8.0}/allelix/parsers/decodeme.py +0 -0
  96. {allelix-2.7.1 → allelix-2.8.0}/allelix/parsers/ftdna.py +0 -0
  97. {allelix-2.7.1 → allelix-2.8.0}/allelix/parsers/ftdna_famfinder.py +0 -0
  98. {allelix-2.7.1 → allelix-2.8.0}/allelix/parsers/ftdna_illumina.py +0 -0
  99. {allelix-2.7.1 → allelix-2.8.0}/allelix/parsers/genesforgood.py +0 -0
  100. {allelix-2.7.1 → allelix-2.8.0}/allelix/parsers/livingdna.py +0 -0
  101. {allelix-2.7.1 → allelix-2.8.0}/allelix/parsers/myhappygenes.py +0 -0
  102. {allelix-2.7.1 → allelix-2.8.0}/allelix/parsers/myheritage.py +0 -0
  103. {allelix-2.7.1 → allelix-2.8.0}/allelix/parsers/rsidlist.py +0 -0
  104. {allelix-2.7.1 → allelix-2.8.0}/allelix/py.typed +0 -0
  105. {allelix-2.7.1 → allelix-2.8.0}/allelix/reports/_sources.py +0 -0
  106. {allelix-2.7.1 → allelix-2.8.0}/allelix/reports/build_text.py +0 -0
  107. {allelix-2.7.1 → allelix-2.8.0}/allelix/reports/clinvar_text.py +0 -0
  108. {allelix-2.7.1 → allelix-2.8.0}/allelix/reports/methylation.py +0 -0
  109. {allelix-2.7.1 → allelix-2.8.0}/allelix/utils/__init__.py +0 -0
  110. {allelix-2.7.1 → allelix-2.8.0}/allelix/utils/build_detect.py +0 -0
  111. {allelix-2.7.1 → allelix-2.8.0}/allelix/utils/markup.py +0 -0
  112. {allelix-2.7.1 → allelix-2.8.0}/allelix/utils/plausibility.py +0 -0
  113. {allelix-2.7.1 → allelix-2.8.0}/allelix.egg-info/dependency_links.txt +0 -0
  114. {allelix-2.7.1 → allelix-2.8.0}/allelix.egg-info/entry_points.txt +0 -0
  115. {allelix-2.7.1 → allelix-2.8.0}/allelix.egg-info/requires.txt +0 -0
  116. {allelix-2.7.1 → allelix-2.8.0}/allelix.egg-info/top_level.txt +0 -0
  117. {allelix-2.7.1 → allelix-2.8.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: allelix
3
- Version: 2.7.1
3
+ Version: 2.8.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>
@@ -56,7 +56,7 @@ Dynamic: license-file
56
56
 
57
57
  # Allelix
58
58
 
59
- > **Status:** Production. Reads twelve file formats, including VCF and gVCF and lists of rsIDs and genotypes. Reports what ClinVar, ClinPGx, the GWAS Catalog and SNPedia say about your variants, with frequencies and scores from gnomAD, AlphaMissense and CADD. It decides the genome build from the file itself and stops rather than guess. HTML, JSON, terminal or annotated VCF. The analysis runs on your machine, and your genotypes are never sent anywhere. The [Changelog](https://github.com/allelix/allelix/blob/main/CHANGELOG.md) tracks every release.
59
+ > **Status:** Production. Reads twelve file formats, including VCF and gVCF and lists of rsIDs and genotypes. Reports what ClinVar, ClinPGx, the GWAS Catalog and SNPedia say about your variants, with frequencies and scores from gnomAD, AlphaMissense and CADD, and gene effects from MANE v1.5 and Ensembl mitochondrial transcripts where they cover the variant. It decides the genome build from the file itself and stops rather than guess. HTML, JSON, terminal or annotated VCF. The analysis runs on your machine, and your genotypes are never sent anywhere. The [Changelog](https://github.com/allelix/allelix/blob/main/CHANGELOG.md) tracks every release.
60
60
 
61
61
  ## Quickstart
62
62
 
@@ -118,7 +118,7 @@ See [Development](#development) for source installs and running tests, [Managing
118
118
  | deCODEme | ✓ | `deCODEme_scan.csv` (deCODE genetics, service closed 2013): comma-separated, a per-row `Strand` column; minus-strand calls are complemented to the plus strand. Build 36: decided from known-SNP positions, then run with position lookups off (ADR-0025). See [docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#decodeme). |
119
119
  | 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 (subject to the stops and the GRCh36 exception in [How the genome build is decided](#how-the-genome-build-is-decided-and-why-a-run-can-stop)). |
120
120
  | 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 (subject to the stops and the GRCh36 exception in [How the genome build is decided](#how-the-genome-build-is-decided-and-why-a-run-can-stop)). |
121
- | VCF / gVCF | ✓ | REF/ALT encoding, `0/1` genotype notation. A confident homozygous-reference call (`0/0`, `0|0`, haploid `0`) is read by ClinPGx, SNPedia and the GWAS Catalog as the same chip call would be (ADR-0064). A gVCF reference block (lines with `<NON_REF>` ALT and `END=` INFO) is not expanded for them. For ClinVar, a reference call matches only where the reference genome itself carries a ClinVar allele (Factor V Leiden on GRCh37, for example): there a `0/0` call, or a reference block that passes the genotype-quality gate, is assessed as homozygous for that allele. See [docs/formats.md, Reference calls in VCFs](https://github.com/allelix/allelix/blob/main/docs/formats.md#reference-calls-in-vcfs) (ADR-0039, ADR-0059). At high-value positions, a block with low genotype quality or no reads 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 record counts for a high-value or panel rsID when it is at one of the rsID's identity placements with that placement's REF, whatever its ID or ALT; an rsID the identity table does not place is matched by ID (ADR-0055). 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; at such a ClinVar site the report counts the positions no record covers, and names the high-value ones (such as CYP3A5*3 rs776746 on GRCh37) as not checked. Multi-sample files require `--sample <ID>`. Rows the variant caller rejected (FILTER other than `PASS` or `.`, or a selected sample whose FORMAT `FT` is not `PASS` or `.`) are skipped and counted in the report under each filter code; `--keep-filtered` keeps them (ADR-0060). 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: such calls are not assessed, and the report counts them and lists their positions. A standalone half call (`./1`) is assessed on its called allele by ClinVar and the GWAS Catalog and shown as `T/.` with zygosity "Half call"; ClinPGx and SNPedia, which need both alleles, skip it. Two complementary half calls at one site (`1/.` and `./1`) are one full call for every source, unless the two records name, or are found by position under, two different rsIDs: then each stays a half call under its own rsID ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#one-site-written-over-several-records)). Malformed rows, rows without a genotype, genotypes naming an allele the record lacks and genotypes naming a symbolic allele such as `<NON_REF>` beside a real ALT are counted in the report; a no-call written `./.` stays a no-call (ADR-0047). 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. A VCF whose header declares an imputation tool's fields (Minimac, Beagle, GLIMPSE) is labelled imputed in every report; see [docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#imputed-vcfs). 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. |
121
+ | VCF / gVCF | ✓ | REF/ALT encoding, `0/1` genotype notation. A confident homozygous-reference call (`0/0`, `0|0`, haploid `0`) is read by ClinPGx, SNPedia and the GWAS Catalog as the same chip call would be (ADR-0064). A gVCF reference block (lines with `<NON_REF>` ALT and `END=` INFO) is not expanded for them. For ClinVar, a reference call matches only where the reference genome itself carries a ClinVar allele (Factor V Leiden on GRCh37, for example): there a `0/0` call, or a reference block that passes the genotype-quality gate, is assessed as homozygous for that allele. See [docs/formats.md, Reference calls in VCFs](https://github.com/allelix/allelix/blob/main/docs/formats.md#reference-calls-in-vcfs) (ADR-0039, ADR-0059). At high-value positions, a block with low genotype quality or no reads 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 record counts for a high-value or panel rsID when it is at one of the rsID's identity placements with that placement's REF, whatever its ID or ALT; an rsID the identity table does not place is matched by ID (ADR-0055). 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; at such a ClinVar site the report counts the positions no record covers, and names the high-value ones (such as CYP3A5*3 rs776746 on GRCh37) as not checked. Multi-sample files require `--sample <ID>`. Rows the variant caller rejected (FILTER other than `PASS` or `.`, or a selected sample whose FORMAT `FT` is not `PASS` or `.`) are skipped and counted in the report under each filter code; `--keep-filtered` keeps them (ADR-0060). 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: the star allele is not assessed, and the report counts such calls and lists their positions; a passing real ALT beside it (`1/2` on `A,*`) is assessed as a half call (2.8). A standalone half call (`./1`) is assessed on its called allele by ClinVar and the GWAS Catalog and shown as `T/.` with zygosity "Half call"; ClinPGx and SNPedia, which need both alleles, skip it. Two complementary half calls at one site (`1/.` and `./1`) are one full call; where its two ALTs belong to two different rsIDs, ClinVar and the GWAS Catalog read the full call under each ALT's own rsID, and ClinPGx and SNPedia, which need one rsID for the genotype, do not ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#one-site-written-over-several-records)). Malformed rows, rows without a genotype, genotypes naming an allele the record lacks and genotypes naming a symbolic allele such as `<NON_REF>` beside a real ALT are counted in the report; a no-call written `./.` stays a no-call (ADR-0047). 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. A VCF whose header declares an imputation tool's fields (Minimac, Beagle, GLIMPSE) is labelled imputed in every report; see [docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#imputed-vcfs). 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. |
122
122
 
123
123
  Files can be passed as delivered: gzipped (Family Tree DNA's `.csv.gz`, for example), or a zip holding one genotype file. A zip with several files, a password or an unusual compression stops with a message to unzip it first. Windows, Linux and old-Mac line endings are read; a leading byte order mark or blank line is ignored.
124
124
 
@@ -137,7 +137,7 @@ Shipped releases are listed for history; the [Changelog](https://github.com/alle
137
137
  | **v2.4** (shipped) | 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. |
138
138
  | **v2.5** (shipped) | ClinVar's own classification caps each row; ClinVar variants without an rsID; VCF calls counted, not dropped; read-only caches and named sources in every report; zip input; Genes for Good and deCODEme; imputed input labelled. |
139
139
  | **v2.6** | Validated calls: the sample's FT filter, padded calls without an rsID, one record per finding, identity contradictions, explicit reference calls for every genotype source, both strand readings together; a switched-off source fully off; rsID and genotype lists; Python 3.12 and newer. |
140
- | **Later** (planned) | 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. |
140
+ | **Later** (planned) | CNVs and repeat expansions, gnomAD genomes, supplemental genotype-file merging, ancestry estimation, and PRS support. These are directional themes rather than release commitments. |
141
141
 
142
142
  Issues and milestones are tracked at [github.com/allelix/allelix/issues](https://github.com/allelix/allelix/issues).
143
143
 
@@ -149,10 +149,11 @@ Issues and milestones are tracked at [github.com/allelix/allelix/issues](https:/
149
149
  | 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):** where ClinVar for the input's build is installed and places the rsID at the call's position, a user homozygous for the normal allele ClinVar resolves there is not reported. That is usually ClinVar's single-base REF. The exception is a site where this build's reference itself carries ClinVar's variant allele (a REF = ALT row, F5 rs6025 on GRCh37): there the normal allele is the other build's REF, written on the input build's strand, so a TT call is reported as a carrier and CC is the non-finding. Where that normal allele cannot be told, nothing is suppressed. Without that cache, only sites where the two builds' references differ are decided: by the other build's ClinVar, written on the input build's strand, else by gnomAD's major allele. Where the strand relation between the builds cannot be told (F5 rs6025 is such a site), the other build's ClinVar is not used: a GRCh38 call is decided by gnomAD alone, and a GRCh37 call is not decided. gnomAD is GRCh38's own reading: a GRCh38 call can use its evidence as it is, and a GRCh37 call only written on its own strand. Where none of these can tell (no evidence, a tie, or, for a GRCh37 call, a strand relation between the builds that cannot be told), the row shows. Every other site is then not 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. |
150
150
  | 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. |
151
151
  | 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. Single-base genotypes at rsIDs are then checked against the site's forward alleles in the rsID identity table. A page that states its orientation is kept wherever its genotype is among them, A/T and C/G sites included. A page without one is read on its own: as written when only that fits, complemented when only the complement fits. It abstains when both fit (an A/T or C/G site, or a site with more alleles) or neither does (ADR-0066). Sites that abstain are counted in the report. If the database is absent, analysis runs without it. For commercial use, switch it off with `allelix config set sources.snpedia false`, or pass `--exclude-snpedia` to `analyze` or `methylation` for one run (`pharmacogenomics` refuses that option). The cache can also be rebuilt from source via `scripts/scrape_snpedia.py` + `scripts/parse_snpedia.py`. |
152
- | 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. A single-base risk allele is taken only from a catalog row whose risk-allele field names the row's own SNP; a row whose single-base risk allele is written under another rsID (`other_snp`) or under something that is not an rsID (`unattributed`) is skipped, and `db update` and `db status` show how many rows the cached release skipped. A field without a single-base risk allele (`rs123-?`, `rs123-AT`) still loads the row without a risk allele, as before, whatever rsID it names. Risk alleles are read on the forward strand against the site's alleles in the rsID identity table. A risk allele is read as written when only that fits and complemented when only the complement fits. It abstains when both fit (an A/T or C/G site, or a site with more alleles), when neither fits, or when the table does not place the rsID at the call, and the report counts each abstention (ADR-0066). Every row says whether the effect allele raises or lowers the odds or the measured value (JSON `effect_direction`). GWAS rows must meet the larger of `--min-magnitude` and `--gwas-min-magnitude` (default 9.0); the must-include rsIDs skip the GWAS floor (ADR-0024). |
152
+ | 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. A single-base risk allele is taken only from a catalog row whose risk-allele field names the row's own SNP; a row whose single-base risk allele is written under another rsID (`other_snp`) or under something that is not an rsID (`unattributed`) is skipped, and `db update` and `db status` show how many rows the cached release skipped. When odds-raising rows for the same rsID and trait name different risk alleles, only the allele named by the most rows is kept, none on a tie, and the rows left out are counted (`direction_conflict`) in `db status` and the report. An allele and its complement count as one allele written on the other strand (A with T, C with G). Rows of one rsID and trait that a run reads as two different forward-strand alleles are not assessed for any genotype (`forward_conflict` in the report's strand counts). A field without a single-base risk allele (`rs123-?`, `rs123-AT`) still loads the row without a risk allele, as before, whatever rsID it names. Risk alleles are read on the forward strand against the site's alleles in the rsID identity table. A risk allele is read as written when only that fits and complemented when only the complement fits. It abstains when both fit (an A/T or C/G site, or a site with more alleles), when neither fits, or when the table does not place the rsID at the call, and the report counts each abstention (ADR-0066). For that reading only, an ALT the call does not carry and gnomAD measures below 1 in 1,000 is set aside, so a rare third allele alone does not make both strands fit (docs/formats.md). Every row says whether the effect allele raises or lowers the odds or the measured value (JSON `effect_direction`). GWAS rows must meet the larger of `--min-magnitude` and `--gwas-min-magnitude` (default 9.0); the must-include rsIDs skip the GWAS floor (ADR-0024). |
153
153
  | 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 (~57M exome variants with an rsID, 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. `--no-gnomad` switches it off for the run (see below). |
154
154
  | 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. |
155
155
  | CADD | ✓ | LicenseRef-CADD (non-commercial). **GRCh38-only enrichment annotator** — adds PHRED-scaled predicted 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. |
156
+ | Transcripts (MANE v1.5, Ensembl 116 MT) | ✓ | CC0 1.0 ([allelix-transcripts](https://huggingface.co/datasets/allelix/allelix-transcripts)). Not an annotator: the gene map for gene effects (2.8). A finding's `consequence` (JSON) is its own ALT's effect on its own named gene's main transcript (MANE Select or the mitochondrial transcript, else MANE Plus Clinical) where a kept transcript covers the ALT, and null otherwise. `--vcf-out` assesses every ALT and writes a VEP-compatible `CSQ` field with the transcript entries available for it ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md)). GRCh38 holds the MANE v1.5 transcripts and Ensembl 116's mitochondrial ones; GRCh37 holds the MANE transcripts GENCODE 50's lift37 annotation carries over whole (the others are counted as dropped), less RPS17's, which lift37 places on the paralogous RPS17L locus. Pre-built caches downloaded via `db update`, pinned to the dataset's commit and each file's SHA-256. |
156
157
  | 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. A row the table flags palindromic (its dbSNP allele set equals its own complement: A/T, C/G, or all four bases) abstains where the GRCh37 and GRCh38 reference bases differ, and translates as written where they are equal; rows the table does not flag translate by their alleles. Alleles that became the GRCh38 reference abstain. Pre-built cache downloaded via `db update` (~4.9M rows covering ~3.0M rsIDs, from dbSNP b157). |
157
158
 
158
159
  A single-base call whose rsID the identity table places only elsewhere on the analysis build (a stale rsID, or coordinates from another build) is given to no source, ClinPGx included, and the report counts it in a warning, `identity_locus_conflict`; one at a high-value rsID, or at one ClinVar classifies Pathogenic or Likely pathogenic, is also named as not checked. Indels and chip `D`/`I` calls are not checked this way, and an rsID the table does not place is not affected (ADR-0063). ClinVar also has a check of its own, with or without the identity table, and it rejects only ClinVar findings: a call whose rsID ClinVar places only elsewhere is not matched to another variant's ClinVar row at its position. Since 2.7.0 the report counts such a call where it carries that row's exact allele, in a warning, `clinvar_rsid_placed_elsewhere`, and names one at a high-value or own Pathogenic or Likely pathogenic rsID (ADR-0051). A call the identity table has already set aside is not counted again there.
@@ -289,6 +290,7 @@ Not all databases are equal in size. `allelix db update` downloads them all by d
289
290
  | GWAS Catalog | ~950 MB | 1–2 min | Trait-SNP associations from genome-wide studies. |
290
291
  | gnomAD | ~7 GB | 5–15 min | Population allele frequencies (how common is this variant?). |
291
292
  | AlphaMissense | ~8GB | 5–15 min | Missense pathogenicity predictions (how likely to break protein function?). |
293
+ | Transcripts (MANE v1.5) | ~112 MB (68 MB download) | seconds | Gene effects on MANE transcripts: the report's `consequence` and the annotated VCF's `CSQ`. |
292
294
  | dbSNP rsID identity | ~460 MB | ~1 min | Cross-build placements: reference allele for array data, rsID recovery on both builds, GRCh37 enrichment translation. |
293
295
  | CADD (opt-in) | ~6 GB | 5–15 min | Predicted variant deleteriousness scores (how disruptive a change is predicted to be, not whether it is good or bad for you). Download with `db update --cadd`; enable in config. |
294
296
 
@@ -312,9 +314,15 @@ Allelix keeps its caches in `~/.local/share/allelix/`, or `$XDG_DATA_HOME/alleli
312
314
  ├── rsid_identity.sqlite ~457 MB
313
315
  ├── gwas.sqlite ~202 MB
314
316
  ├── snpedia.sqlite ~194 MB
317
+ ├── transcript_windows.GRCh38.sqlite ~39 MB
318
+ ├── transcript_windows.GRCh37.sqlite ~36 MB
319
+ ├── transcripts.GRCh38.sqlite ~18 MB
320
+ ├── transcripts.GRCh37.sqlite ~18 MB
315
321
  └── pharmgkb.sqlite ~6 MB
316
322
  ```
317
323
 
324
+ `db update` also writes a small sidecar beside each ClinVar cache and the identity cache (`clinvar.GRCh38.sqlite.keys`, `rsid_identity.sqlite.keys`): answers read once from the cache, so a run need not read them again (ADR-0071). A run reads the same with or without it; `analyze` never writes one, and ignores one written for an earlier state of its cache.
325
+
318
326
  Downloaded or rebuilt caches are staged beside their final names and moved into place only when complete, so two updates running at once cannot install each other's files. If a rebuild fails before publication, its previous cache remains in place. Freshness and interpreter stamps can instead be updated in the existing database. Each cache is published on its own, so an update of several sources can fail after some have already been updated. ClinVar's two builds are published one build at a time; a publication failure names any build already updated. An update stopped with Ctrl-C, SIGTERM or SIGHUP removes its staging files (hidden `.<name>…` files and directories, which can be several GB) on the way out. One killed outright (SIGKILL, a crash, a power cut) cannot, and no later run removes what it left, since that cannot be told from a running update's files; `db clean` removes them (it removes only names allelix creates, and keeps and lists a staging directory holding a finished cache or an extracted table). It does not reach a ClinVar build's temporary index of `variant_summary`, a `tmp….sqlite` file in the system temp directory (such as `/tmp`), outside the data directory; delete one a killed update left by hand. On Windows a forced end (TerminateProcess, as `taskkill /F` and Task Manager use, and SIGTERM there), closing the console and Ctrl-Break do not run this cleanup either; `db clean` removes what they leave by the same rule. Do not run `db clean` while an update is running in the same data directory, including an `analyze` without `--no-update`, whose refresh can build a cache there: it would remove that update's staging files.
319
327
 
320
328
  **The caches are disposable and re-downloadable.** Every cache here was fetched or built by `allelix db update` and can be fetched again at any time; the ClinVar build log cannot (below). There's no per-user state in the cache — allelix never writes your genotype files into this directory. `db clean` removes only what allelix created there: the caches, their side files, GWAS's kept table, the ClinVar build log, staging entries and earlier releases' downloads. A directory is removed only when it is one of allelix's staging directories and every entry in it is a name allelix writes there (its downloads, the partial files of a download or of a cache being built, an empty `extracted/`), and a link is removed, not followed; a hidden directory of the same shape that holds anything else (a dated backup like `.clinvar-20261101/`, a finished cache not yet moved into place, an extracted table) is kept and listed, as possibly an interrupted update's leftovers to delete by hand. Everything else stays, and `db clean` lists it: CADD full-mode files (which `db update` cannot fetch), any file or folder you keep there, even one named like a cache. `config.toml` always stays too, and is not listed. Safe to run to reclaim space (or to force a full refresh if you suspect a cache went stale):
@@ -361,7 +369,7 @@ pip uninstall allelix
361
369
 
362
370
  ## Data Sources & Licensing
363
371
 
364
- Allelix source code is licensed under the **GNU Affero General Public License v3.0 or later** (AGPL-3.0-or-later). The Allelix package contains **no third-party data**. The reference databases are downloaded at run time, by `allelix db update` or the freshness check before an analysis (see [Privacy](#privacy)): ClinVar, the GWAS Catalog, ClinPGx and CPIC from their publishers, and gnomAD, AlphaMissense, CADD, SNPedia and the rsID identity table as pre-built caches from Hugging Face dataset repositories. Each database retains its original license on the user's machine:
372
+ Allelix source code is licensed under the **GNU Affero General Public License v3.0 or later** (AGPL-3.0-or-later). The Allelix package contains **no third-party data**. The reference databases are downloaded at run time, by `allelix db update` or the freshness check before an analysis (see [Privacy](#privacy)): ClinVar, the GWAS Catalog, ClinPGx and CPIC from their publishers, and gnomAD, AlphaMissense, CADD, SNPedia, the rsID identity table and the transcript caches as pre-built caches from Hugging Face dataset repositories. Each database retains its original license on the user's machine:
365
373
 
366
374
  | Database | Source | License | Usage |
367
375
  |---|---|---|---|
@@ -372,6 +380,7 @@ Allelix source code is licensed under the **GNU Affero General Public License v3
372
380
  | SNPedia | snpedia.com | CC BY-NC-SA 3.0 US | Attribution required, **non-commercial only**. Omit it with `allelix config set sources.snpedia false`, or with `--exclude-snpedia` on `analyze` and `methylation`. |
373
381
  | 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. |
374
382
  | 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. |
383
+ | Transcript caches | huggingface.co/datasets/allelix/allelix-transcripts | CC0 1.0 | No restrictions. Built from MANE v1.5 (NCBI and EMBL-EBI), GENCODE 50 / Ensembl 116 and UCSC's GRC reference sequences; the gene map for gene effects. |
375
384
  | 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. |
376
385
  | 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 in config (`allelix config set sources.cadd true`). Use `--no-cadd` to omit it for one run. |
377
386
 
@@ -436,7 +445,7 @@ With `--no-update`, `analyze` writes nothing to the data directory, so a data di
436
445
  Before anything is annotated, Allelix decides the file's genome build from the evidence the file itself carries (ADR-0044):
437
446
 
438
447
  - **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 (16,571 bp), no mitochondrial record is annotated or compared and a note says so, also when the build comes from `--build` or the file's assembly header. In a GRCh37 VCF, mitochondrial records named `chrM` or `M` (UCSC hg19 names) are left out (of `compare` too), counted and noted, unless the file declares that name with the 16,569 bp reference length; `MT` and `chrMT` are read.
439
- - **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.
448
+ - **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 (about 4.2 seconds on a synthetic 645,000-row chip file). 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.
440
449
  - **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 and at least one known-SNP position is there to check it. A chip labelled GRCh36 is the exception: its label is used without one, because GRCh36 turns position-keyed lookups off.
441
450
 
442
451
  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)).
@@ -16,7 +16,7 @@
16
16
 
17
17
  # Allelix
18
18
 
19
- > **Status:** Production. Reads twelve file formats, including VCF and gVCF and lists of rsIDs and genotypes. Reports what ClinVar, ClinPGx, the GWAS Catalog and SNPedia say about your variants, with frequencies and scores from gnomAD, AlphaMissense and CADD. It decides the genome build from the file itself and stops rather than guess. HTML, JSON, terminal or annotated VCF. The analysis runs on your machine, and your genotypes are never sent anywhere. The [Changelog](https://github.com/allelix/allelix/blob/main/CHANGELOG.md) tracks every release.
19
+ > **Status:** Production. Reads twelve file formats, including VCF and gVCF and lists of rsIDs and genotypes. Reports what ClinVar, ClinPGx, the GWAS Catalog and SNPedia say about your variants, with frequencies and scores from gnomAD, AlphaMissense and CADD, and gene effects from MANE v1.5 and Ensembl mitochondrial transcripts where they cover the variant. It decides the genome build from the file itself and stops rather than guess. HTML, JSON, terminal or annotated VCF. The analysis runs on your machine, and your genotypes are never sent anywhere. The [Changelog](https://github.com/allelix/allelix/blob/main/CHANGELOG.md) tracks every release.
20
20
 
21
21
  ## Quickstart
22
22
 
@@ -78,7 +78,7 @@ See [Development](#development) for source installs and running tests, [Managing
78
78
  | deCODEme | ✓ | `deCODEme_scan.csv` (deCODE genetics, service closed 2013): comma-separated, a per-row `Strand` column; minus-strand calls are complemented to the plus strand. Build 36: decided from known-SNP positions, then run with position lookups off (ADR-0025). See [docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#decodeme). |
79
79
  | 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 (subject to the stops and the GRCh36 exception in [How the genome build is decided](#how-the-genome-build-is-decided-and-why-a-run-can-stop)). |
80
80
  | 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 (subject to the stops and the GRCh36 exception in [How the genome build is decided](#how-the-genome-build-is-decided-and-why-a-run-can-stop)). |
81
- | VCF / gVCF | ✓ | REF/ALT encoding, `0/1` genotype notation. A confident homozygous-reference call (`0/0`, `0|0`, haploid `0`) is read by ClinPGx, SNPedia and the GWAS Catalog as the same chip call would be (ADR-0064). A gVCF reference block (lines with `<NON_REF>` ALT and `END=` INFO) is not expanded for them. For ClinVar, a reference call matches only where the reference genome itself carries a ClinVar allele (Factor V Leiden on GRCh37, for example): there a `0/0` call, or a reference block that passes the genotype-quality gate, is assessed as homozygous for that allele. See [docs/formats.md, Reference calls in VCFs](https://github.com/allelix/allelix/blob/main/docs/formats.md#reference-calls-in-vcfs) (ADR-0039, ADR-0059). At high-value positions, a block with low genotype quality or no reads 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 record counts for a high-value or panel rsID when it is at one of the rsID's identity placements with that placement's REF, whatever its ID or ALT; an rsID the identity table does not place is matched by ID (ADR-0055). 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; at such a ClinVar site the report counts the positions no record covers, and names the high-value ones (such as CYP3A5*3 rs776746 on GRCh37) as not checked. Multi-sample files require `--sample <ID>`. Rows the variant caller rejected (FILTER other than `PASS` or `.`, or a selected sample whose FORMAT `FT` is not `PASS` or `.`) are skipped and counted in the report under each filter code; `--keep-filtered` keeps them (ADR-0060). 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: such calls are not assessed, and the report counts them and lists their positions. A standalone half call (`./1`) is assessed on its called allele by ClinVar and the GWAS Catalog and shown as `T/.` with zygosity "Half call"; ClinPGx and SNPedia, which need both alleles, skip it. Two complementary half calls at one site (`1/.` and `./1`) are one full call for every source, unless the two records name, or are found by position under, two different rsIDs: then each stays a half call under its own rsID ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#one-site-written-over-several-records)). Malformed rows, rows without a genotype, genotypes naming an allele the record lacks and genotypes naming a symbolic allele such as `<NON_REF>` beside a real ALT are counted in the report; a no-call written `./.` stays a no-call (ADR-0047). 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. A VCF whose header declares an imputation tool's fields (Minimac, Beagle, GLIMPSE) is labelled imputed in every report; see [docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#imputed-vcfs). 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. |
81
+ | VCF / gVCF | ✓ | REF/ALT encoding, `0/1` genotype notation. A confident homozygous-reference call (`0/0`, `0|0`, haploid `0`) is read by ClinPGx, SNPedia and the GWAS Catalog as the same chip call would be (ADR-0064). A gVCF reference block (lines with `<NON_REF>` ALT and `END=` INFO) is not expanded for them. For ClinVar, a reference call matches only where the reference genome itself carries a ClinVar allele (Factor V Leiden on GRCh37, for example): there a `0/0` call, or a reference block that passes the genotype-quality gate, is assessed as homozygous for that allele. See [docs/formats.md, Reference calls in VCFs](https://github.com/allelix/allelix/blob/main/docs/formats.md#reference-calls-in-vcfs) (ADR-0039, ADR-0059). At high-value positions, a block with low genotype quality or no reads 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 record counts for a high-value or panel rsID when it is at one of the rsID's identity placements with that placement's REF, whatever its ID or ALT; an rsID the identity table does not place is matched by ID (ADR-0055). 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; at such a ClinVar site the report counts the positions no record covers, and names the high-value ones (such as CYP3A5*3 rs776746 on GRCh37) as not checked. Multi-sample files require `--sample <ID>`. Rows the variant caller rejected (FILTER other than `PASS` or `.`, or a selected sample whose FORMAT `FT` is not `PASS` or `.`) are skipped and counted in the report under each filter code; `--keep-filtered` keeps them (ADR-0060). 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: the star allele is not assessed, and the report counts such calls and lists their positions; a passing real ALT beside it (`1/2` on `A,*`) is assessed as a half call (2.8). A standalone half call (`./1`) is assessed on its called allele by ClinVar and the GWAS Catalog and shown as `T/.` with zygosity "Half call"; ClinPGx and SNPedia, which need both alleles, skip it. Two complementary half calls at one site (`1/.` and `./1`) are one full call; where its two ALTs belong to two different rsIDs, ClinVar and the GWAS Catalog read the full call under each ALT's own rsID, and ClinPGx and SNPedia, which need one rsID for the genotype, do not ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#one-site-written-over-several-records)). Malformed rows, rows without a genotype, genotypes naming an allele the record lacks and genotypes naming a symbolic allele such as `<NON_REF>` beside a real ALT are counted in the report; a no-call written `./.` stays a no-call (ADR-0047). 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. A VCF whose header declares an imputation tool's fields (Minimac, Beagle, GLIMPSE) is labelled imputed in every report; see [docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#imputed-vcfs). 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. |
82
82
 
83
83
  Files can be passed as delivered: gzipped (Family Tree DNA's `.csv.gz`, for example), or a zip holding one genotype file. A zip with several files, a password or an unusual compression stops with a message to unzip it first. Windows, Linux and old-Mac line endings are read; a leading byte order mark or blank line is ignored.
84
84
 
@@ -97,7 +97,7 @@ Shipped releases are listed for history; the [Changelog](https://github.com/alle
97
97
  | **v2.4** (shipped) | 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. |
98
98
  | **v2.5** (shipped) | ClinVar's own classification caps each row; ClinVar variants without an rsID; VCF calls counted, not dropped; read-only caches and named sources in every report; zip input; Genes for Good and deCODEme; imputed input labelled. |
99
99
  | **v2.6** | Validated calls: the sample's FT filter, padded calls without an rsID, one record per finding, identity contradictions, explicit reference calls for every genotype source, both strand readings together; a switched-off source fully off; rsID and genotype lists; Python 3.12 and newer. |
100
- | **Later** (planned) | 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. |
100
+ | **Later** (planned) | CNVs and repeat expansions, gnomAD genomes, supplemental genotype-file merging, ancestry estimation, and PRS support. These are directional themes rather than release commitments. |
101
101
 
102
102
  Issues and milestones are tracked at [github.com/allelix/allelix/issues](https://github.com/allelix/allelix/issues).
103
103
 
@@ -109,10 +109,11 @@ Issues and milestones are tracked at [github.com/allelix/allelix/issues](https:/
109
109
  | 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):** where ClinVar for the input's build is installed and places the rsID at the call's position, a user homozygous for the normal allele ClinVar resolves there is not reported. That is usually ClinVar's single-base REF. The exception is a site where this build's reference itself carries ClinVar's variant allele (a REF = ALT row, F5 rs6025 on GRCh37): there the normal allele is the other build's REF, written on the input build's strand, so a TT call is reported as a carrier and CC is the non-finding. Where that normal allele cannot be told, nothing is suppressed. Without that cache, only sites where the two builds' references differ are decided: by the other build's ClinVar, written on the input build's strand, else by gnomAD's major allele. Where the strand relation between the builds cannot be told (F5 rs6025 is such a site), the other build's ClinVar is not used: a GRCh38 call is decided by gnomAD alone, and a GRCh37 call is not decided. gnomAD is GRCh38's own reading: a GRCh38 call can use its evidence as it is, and a GRCh37 call only written on its own strand. Where none of these can tell (no evidence, a tie, or, for a GRCh37 call, a strand relation between the builds that cannot be told), the row shows. Every other site is then not 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. |
110
110
  | 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. |
111
111
  | 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. Single-base genotypes at rsIDs are then checked against the site's forward alleles in the rsID identity table. A page that states its orientation is kept wherever its genotype is among them, A/T and C/G sites included. A page without one is read on its own: as written when only that fits, complemented when only the complement fits. It abstains when both fit (an A/T or C/G site, or a site with more alleles) or neither does (ADR-0066). Sites that abstain are counted in the report. If the database is absent, analysis runs without it. For commercial use, switch it off with `allelix config set sources.snpedia false`, or pass `--exclude-snpedia` to `analyze` or `methylation` for one run (`pharmacogenomics` refuses that option). The cache can also be rebuilt from source via `scripts/scrape_snpedia.py` + `scripts/parse_snpedia.py`. |
112
- | 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. A single-base risk allele is taken only from a catalog row whose risk-allele field names the row's own SNP; a row whose single-base risk allele is written under another rsID (`other_snp`) or under something that is not an rsID (`unattributed`) is skipped, and `db update` and `db status` show how many rows the cached release skipped. A field without a single-base risk allele (`rs123-?`, `rs123-AT`) still loads the row without a risk allele, as before, whatever rsID it names. Risk alleles are read on the forward strand against the site's alleles in the rsID identity table. A risk allele is read as written when only that fits and complemented when only the complement fits. It abstains when both fit (an A/T or C/G site, or a site with more alleles), when neither fits, or when the table does not place the rsID at the call, and the report counts each abstention (ADR-0066). Every row says whether the effect allele raises or lowers the odds or the measured value (JSON `effect_direction`). GWAS rows must meet the larger of `--min-magnitude` and `--gwas-min-magnitude` (default 9.0); the must-include rsIDs skip the GWAS floor (ADR-0024). |
112
+ | 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. A single-base risk allele is taken only from a catalog row whose risk-allele field names the row's own SNP; a row whose single-base risk allele is written under another rsID (`other_snp`) or under something that is not an rsID (`unattributed`) is skipped, and `db update` and `db status` show how many rows the cached release skipped. When odds-raising rows for the same rsID and trait name different risk alleles, only the allele named by the most rows is kept, none on a tie, and the rows left out are counted (`direction_conflict`) in `db status` and the report. An allele and its complement count as one allele written on the other strand (A with T, C with G). Rows of one rsID and trait that a run reads as two different forward-strand alleles are not assessed for any genotype (`forward_conflict` in the report's strand counts). A field without a single-base risk allele (`rs123-?`, `rs123-AT`) still loads the row without a risk allele, as before, whatever rsID it names. Risk alleles are read on the forward strand against the site's alleles in the rsID identity table. A risk allele is read as written when only that fits and complemented when only the complement fits. It abstains when both fit (an A/T or C/G site, or a site with more alleles), when neither fits, or when the table does not place the rsID at the call, and the report counts each abstention (ADR-0066). For that reading only, an ALT the call does not carry and gnomAD measures below 1 in 1,000 is set aside, so a rare third allele alone does not make both strands fit (docs/formats.md). Every row says whether the effect allele raises or lowers the odds or the measured value (JSON `effect_direction`). GWAS rows must meet the larger of `--min-magnitude` and `--gwas-min-magnitude` (default 9.0); the must-include rsIDs skip the GWAS floor (ADR-0024). |
113
113
  | 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 (~57M exome variants with an rsID, 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. `--no-gnomad` switches it off for the run (see below). |
114
114
  | 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. |
115
115
  | CADD | ✓ | LicenseRef-CADD (non-commercial). **GRCh38-only enrichment annotator** — adds PHRED-scaled predicted 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. |
116
+ | Transcripts (MANE v1.5, Ensembl 116 MT) | ✓ | CC0 1.0 ([allelix-transcripts](https://huggingface.co/datasets/allelix/allelix-transcripts)). Not an annotator: the gene map for gene effects (2.8). A finding's `consequence` (JSON) is its own ALT's effect on its own named gene's main transcript (MANE Select or the mitochondrial transcript, else MANE Plus Clinical) where a kept transcript covers the ALT, and null otherwise. `--vcf-out` assesses every ALT and writes a VEP-compatible `CSQ` field with the transcript entries available for it ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md)). GRCh38 holds the MANE v1.5 transcripts and Ensembl 116's mitochondrial ones; GRCh37 holds the MANE transcripts GENCODE 50's lift37 annotation carries over whole (the others are counted as dropped), less RPS17's, which lift37 places on the paralogous RPS17L locus. Pre-built caches downloaded via `db update`, pinned to the dataset's commit and each file's SHA-256. |
116
117
  | 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. A row the table flags palindromic (its dbSNP allele set equals its own complement: A/T, C/G, or all four bases) abstains where the GRCh37 and GRCh38 reference bases differ, and translates as written where they are equal; rows the table does not flag translate by their alleles. Alleles that became the GRCh38 reference abstain. Pre-built cache downloaded via `db update` (~4.9M rows covering ~3.0M rsIDs, from dbSNP b157). |
117
118
 
118
119
  A single-base call whose rsID the identity table places only elsewhere on the analysis build (a stale rsID, or coordinates from another build) is given to no source, ClinPGx included, and the report counts it in a warning, `identity_locus_conflict`; one at a high-value rsID, or at one ClinVar classifies Pathogenic or Likely pathogenic, is also named as not checked. Indels and chip `D`/`I` calls are not checked this way, and an rsID the table does not place is not affected (ADR-0063). ClinVar also has a check of its own, with or without the identity table, and it rejects only ClinVar findings: a call whose rsID ClinVar places only elsewhere is not matched to another variant's ClinVar row at its position. Since 2.7.0 the report counts such a call where it carries that row's exact allele, in a warning, `clinvar_rsid_placed_elsewhere`, and names one at a high-value or own Pathogenic or Likely pathogenic rsID (ADR-0051). A call the identity table has already set aside is not counted again there.
@@ -249,6 +250,7 @@ Not all databases are equal in size. `allelix db update` downloads them all by d
249
250
  | GWAS Catalog | ~950 MB | 1–2 min | Trait-SNP associations from genome-wide studies. |
250
251
  | gnomAD | ~7 GB | 5–15 min | Population allele frequencies (how common is this variant?). |
251
252
  | AlphaMissense | ~8GB | 5–15 min | Missense pathogenicity predictions (how likely to break protein function?). |
253
+ | Transcripts (MANE v1.5) | ~112 MB (68 MB download) | seconds | Gene effects on MANE transcripts: the report's `consequence` and the annotated VCF's `CSQ`. |
252
254
  | dbSNP rsID identity | ~460 MB | ~1 min | Cross-build placements: reference allele for array data, rsID recovery on both builds, GRCh37 enrichment translation. |
253
255
  | CADD (opt-in) | ~6 GB | 5–15 min | Predicted variant deleteriousness scores (how disruptive a change is predicted to be, not whether it is good or bad for you). Download with `db update --cadd`; enable in config. |
254
256
 
@@ -272,9 +274,15 @@ Allelix keeps its caches in `~/.local/share/allelix/`, or `$XDG_DATA_HOME/alleli
272
274
  ├── rsid_identity.sqlite ~457 MB
273
275
  ├── gwas.sqlite ~202 MB
274
276
  ├── snpedia.sqlite ~194 MB
277
+ ├── transcript_windows.GRCh38.sqlite ~39 MB
278
+ ├── transcript_windows.GRCh37.sqlite ~36 MB
279
+ ├── transcripts.GRCh38.sqlite ~18 MB
280
+ ├── transcripts.GRCh37.sqlite ~18 MB
275
281
  └── pharmgkb.sqlite ~6 MB
276
282
  ```
277
283
 
284
+ `db update` also writes a small sidecar beside each ClinVar cache and the identity cache (`clinvar.GRCh38.sqlite.keys`, `rsid_identity.sqlite.keys`): answers read once from the cache, so a run need not read them again (ADR-0071). A run reads the same with or without it; `analyze` never writes one, and ignores one written for an earlier state of its cache.
285
+
278
286
  Downloaded or rebuilt caches are staged beside their final names and moved into place only when complete, so two updates running at once cannot install each other's files. If a rebuild fails before publication, its previous cache remains in place. Freshness and interpreter stamps can instead be updated in the existing database. Each cache is published on its own, so an update of several sources can fail after some have already been updated. ClinVar's two builds are published one build at a time; a publication failure names any build already updated. An update stopped with Ctrl-C, SIGTERM or SIGHUP removes its staging files (hidden `.<name>…` files and directories, which can be several GB) on the way out. One killed outright (SIGKILL, a crash, a power cut) cannot, and no later run removes what it left, since that cannot be told from a running update's files; `db clean` removes them (it removes only names allelix creates, and keeps and lists a staging directory holding a finished cache or an extracted table). It does not reach a ClinVar build's temporary index of `variant_summary`, a `tmp….sqlite` file in the system temp directory (such as `/tmp`), outside the data directory; delete one a killed update left by hand. On Windows a forced end (TerminateProcess, as `taskkill /F` and Task Manager use, and SIGTERM there), closing the console and Ctrl-Break do not run this cleanup either; `db clean` removes what they leave by the same rule. Do not run `db clean` while an update is running in the same data directory, including an `analyze` without `--no-update`, whose refresh can build a cache there: it would remove that update's staging files.
279
287
 
280
288
  **The caches are disposable and re-downloadable.** Every cache here was fetched or built by `allelix db update` and can be fetched again at any time; the ClinVar build log cannot (below). There's no per-user state in the cache — allelix never writes your genotype files into this directory. `db clean` removes only what allelix created there: the caches, their side files, GWAS's kept table, the ClinVar build log, staging entries and earlier releases' downloads. A directory is removed only when it is one of allelix's staging directories and every entry in it is a name allelix writes there (its downloads, the partial files of a download or of a cache being built, an empty `extracted/`), and a link is removed, not followed; a hidden directory of the same shape that holds anything else (a dated backup like `.clinvar-20261101/`, a finished cache not yet moved into place, an extracted table) is kept and listed, as possibly an interrupted update's leftovers to delete by hand. Everything else stays, and `db clean` lists it: CADD full-mode files (which `db update` cannot fetch), any file or folder you keep there, even one named like a cache. `config.toml` always stays too, and is not listed. Safe to run to reclaim space (or to force a full refresh if you suspect a cache went stale):
@@ -321,7 +329,7 @@ pip uninstall allelix
321
329
 
322
330
  ## Data Sources & Licensing
323
331
 
324
- Allelix source code is licensed under the **GNU Affero General Public License v3.0 or later** (AGPL-3.0-or-later). The Allelix package contains **no third-party data**. The reference databases are downloaded at run time, by `allelix db update` or the freshness check before an analysis (see [Privacy](#privacy)): ClinVar, the GWAS Catalog, ClinPGx and CPIC from their publishers, and gnomAD, AlphaMissense, CADD, SNPedia and the rsID identity table as pre-built caches from Hugging Face dataset repositories. Each database retains its original license on the user's machine:
332
+ Allelix source code is licensed under the **GNU Affero General Public License v3.0 or later** (AGPL-3.0-or-later). The Allelix package contains **no third-party data**. The reference databases are downloaded at run time, by `allelix db update` or the freshness check before an analysis (see [Privacy](#privacy)): ClinVar, the GWAS Catalog, ClinPGx and CPIC from their publishers, and gnomAD, AlphaMissense, CADD, SNPedia, the rsID identity table and the transcript caches as pre-built caches from Hugging Face dataset repositories. Each database retains its original license on the user's machine:
325
333
 
326
334
  | Database | Source | License | Usage |
327
335
  |---|---|---|---|
@@ -332,6 +340,7 @@ Allelix source code is licensed under the **GNU Affero General Public License v3
332
340
  | SNPedia | snpedia.com | CC BY-NC-SA 3.0 US | Attribution required, **non-commercial only**. Omit it with `allelix config set sources.snpedia false`, or with `--exclude-snpedia` on `analyze` and `methylation`. |
333
341
  | 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. |
334
342
  | 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. |
343
+ | Transcript caches | huggingface.co/datasets/allelix/allelix-transcripts | CC0 1.0 | No restrictions. Built from MANE v1.5 (NCBI and EMBL-EBI), GENCODE 50 / Ensembl 116 and UCSC's GRC reference sequences; the gene map for gene effects. |
335
344
  | 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. |
336
345
  | 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 in config (`allelix config set sources.cadd true`). Use `--no-cadd` to omit it for one run. |
337
346
 
@@ -396,7 +405,7 @@ With `--no-update`, `analyze` writes nothing to the data directory, so a data di
396
405
  Before anything is annotated, Allelix decides the file's genome build from the evidence the file itself carries (ADR-0044):
397
406
 
398
407
  - **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 (16,571 bp), no mitochondrial record is annotated or compared and a note says so, also when the build comes from `--build` or the file's assembly header. In a GRCh37 VCF, mitochondrial records named `chrM` or `M` (UCSC hg19 names) are left out (of `compare` too), counted and noted, unless the file declares that name with the 16,569 bp reference length; `MT` and `chrMT` are read.
399
- - **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.
408
+ - **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 (about 4.2 seconds on a synthetic 645,000-row chip file). 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.
400
409
  - **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 and at least one known-SNP position is there to check it. A chip labelled GRCh36 is the exception: its label is used without one, because GRCh36 turns position-keyed lookups off.
401
410
 
402
411
  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)).
@@ -15,9 +15,11 @@ from allelix.annotators.clinvar import CLINVAR_SUPPORTED_BUILDS, ClinVarAnnotato
15
15
  from allelix.annotators.gnomad import GnomadAnnotator
16
16
  from allelix.annotators.gwas import GWASCatalogAnnotator
17
17
  from allelix.annotators.pharmgkb import PharmGKBAnnotator
18
+ from allelix.annotators.rare_alleles import RareThirdAlleles
18
19
  from allelix.annotators.reference_fallback import ReferenceCarriedFallback
19
20
  from allelix.annotators.rsid_identity import RsidIdentityAnnotator
20
21
  from allelix.annotators.snpedia import SNPediaAnnotator
22
+ from allelix.annotators.transcripts import TranscriptAnnotator
21
23
 
22
24
  if TYPE_CHECKING:
23
25
  from collections.abc import Collection
@@ -143,6 +145,8 @@ def get_annotators(
143
145
  data_dir,
144
146
  filter_traits=gwas_filter_traits,
145
147
  forward_site_provider=identity.forward_sites,
148
+ # GWAS only: gnomAD-rare third ALTs are set aside for its strand reading.
149
+ rare_allele_provider=RareThirdAlleles(identity, gnomad_ref),
146
150
  )
147
151
  snpedia = SNPediaAnnotator(
148
152
  data_dir,
@@ -153,7 +157,18 @@ def get_annotators(
153
157
  )
154
158
  alphamissense = AlphaMissenseAnnotator(data_dir)
155
159
  cadd = CaddAnnotator(data_dir, full_mode=cadd_full)
156
- return [clinvar, pharmgkb, gwas, snpedia, gnomad, alphamissense, cadd, rsid_identity]
160
+ transcripts = TranscriptAnnotator(data_dir)
161
+ return [
162
+ clinvar,
163
+ pharmgkb,
164
+ gwas,
165
+ snpedia,
166
+ gnomad,
167
+ alphamissense,
168
+ cadd,
169
+ rsid_identity,
170
+ transcripts,
171
+ ]
157
172
 
158
173
 
159
174
  _ANNOTATOR_CLASS_LIST: list[type[Annotator]] = [
@@ -165,6 +180,7 @@ _ANNOTATOR_CLASS_LIST: list[type[Annotator]] = [
165
180
  AlphaMissenseAnnotator,
166
181
  CaddAnnotator,
167
182
  RsidIdentityAnnotator,
183
+ TranscriptAnnotator,
168
184
  ]
169
185
  _ANNOTATOR_CLASSES: dict[str, type[Annotator]] = {cls.name: cls for cls in _ANNOTATOR_CLASS_LIST}
170
186