allelix 2.6.1__tar.gz → 2.6.3__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 (93) hide show
  1. {allelix-2.6.1/allelix.egg-info → allelix-2.6.3}/PKG-INFO +9 -9
  2. {allelix-2.6.1 → allelix-2.6.3}/README.md +8 -8
  3. {allelix-2.6.1 → allelix-2.6.3}/allelix/cli/__init__.py +43 -10
  4. {allelix-2.6.1 → allelix-2.6.3}/allelix/cli/_helpers.py +55 -27
  5. {allelix-2.6.1 → allelix-2.6.3}/allelix/cli/_options.py +14 -0
  6. {allelix-2.6.1 → allelix-2.6.3}/allelix/cli/analyze.py +4 -0
  7. {allelix-2.6.1 → allelix-2.6.3}/allelix/cli/config.py +8 -7
  8. {allelix-2.6.1 → allelix-2.6.3}/allelix/cli/db.py +18 -16
  9. {allelix-2.6.1 → allelix-2.6.3}/allelix/cli/focused.py +7 -0
  10. {allelix-2.6.1 → allelix-2.6.3}/allelix/cli/utility.py +37 -28
  11. {allelix-2.6.1 → allelix-2.6.3}/allelix/compare.py +4 -2
  12. {allelix-2.6.1 → allelix-2.6.3}/allelix/exporters/plink.py +31 -8
  13. {allelix-2.6.1 → allelix-2.6.3}/allelix/models.py +9 -0
  14. {allelix-2.6.1 → allelix-2.6.3}/allelix/parsers/_helpers.py +42 -0
  15. {allelix-2.6.1 → allelix-2.6.3}/allelix/parsers/ancestrydna.py +1 -0
  16. {allelix-2.6.1 → allelix-2.6.3}/allelix/parsers/decodeme.py +4 -0
  17. {allelix-2.6.1 → allelix-2.6.3}/allelix/parsers/ftdna_famfinder.py +4 -0
  18. {allelix-2.6.1 → allelix-2.6.3}/allelix/parsers/ftdna_illumina.py +4 -0
  19. {allelix-2.6.1 → allelix-2.6.3}/allelix/parsers/vcf.py +13 -1
  20. {allelix-2.6.1 → allelix-2.6.3}/allelix/reports/_pipeline.py +22 -1
  21. {allelix-2.6.1 → allelix-2.6.3}/allelix/reports/high_value.py +102 -2
  22. {allelix-2.6.1 → allelix-2.6.3}/allelix/reports/html.py +100 -66
  23. {allelix-2.6.1 → allelix-2.6.3}/allelix/reports/terminal.py +41 -43
  24. {allelix-2.6.1 → allelix-2.6.3}/allelix/utils/build_detect.py +9 -3
  25. allelix-2.6.3/allelix/utils/markup.py +30 -0
  26. {allelix-2.6.1 → allelix-2.6.3/allelix.egg-info}/PKG-INFO +9 -9
  27. {allelix-2.6.1 → allelix-2.6.3}/allelix.egg-info/SOURCES.txt +1 -0
  28. {allelix-2.6.1 → allelix-2.6.3}/pyproject.toml +8 -3
  29. {allelix-2.6.1 → allelix-2.6.3}/LICENSE +0 -0
  30. {allelix-2.6.1 → allelix-2.6.3}/MANIFEST.in +0 -0
  31. {allelix-2.6.1 → allelix-2.6.3}/allelix/__init__.py +0 -0
  32. {allelix-2.6.1 → allelix-2.6.3}/allelix/annotators/__init__.py +0 -0
  33. {allelix-2.6.1 → allelix-2.6.3}/allelix/annotators/_placement.py +0 -0
  34. {allelix-2.6.1 → allelix-2.6.3}/allelix/annotators/_resolution.py +0 -0
  35. {allelix-2.6.1 → allelix-2.6.3}/allelix/annotators/alphamissense.py +0 -0
  36. {allelix-2.6.1 → allelix-2.6.3}/allelix/annotators/base.py +0 -0
  37. {allelix-2.6.1 → allelix-2.6.3}/allelix/annotators/cadd.py +0 -0
  38. {allelix-2.6.1 → allelix-2.6.3}/allelix/annotators/clinvar.py +0 -0
  39. {allelix-2.6.1 → allelix-2.6.3}/allelix/annotators/gnomad.py +0 -0
  40. {allelix-2.6.1 → allelix-2.6.3}/allelix/annotators/gwas.py +0 -0
  41. {allelix-2.6.1 → allelix-2.6.3}/allelix/annotators/pharmgkb.py +0 -0
  42. {allelix-2.6.1 → allelix-2.6.3}/allelix/annotators/reference_fallback.py +0 -0
  43. {allelix-2.6.1 → allelix-2.6.3}/allelix/annotators/rsid_identity.py +0 -0
  44. {allelix-2.6.1 → allelix-2.6.3}/allelix/annotators/snpedia.py +0 -0
  45. {allelix-2.6.1 → allelix-2.6.3}/allelix/attribution.py +0 -0
  46. {allelix-2.6.1 → allelix-2.6.3}/allelix/config.py +0 -0
  47. {allelix-2.6.1 → allelix-2.6.3}/allelix/data/__init__.py +0 -0
  48. {allelix-2.6.1 → allelix-2.6.3}/allelix/data/clinvar_clnsig_snapshot.yaml +0 -0
  49. {allelix-2.6.1 → allelix-2.6.3}/allelix/data/high_value_snps.yaml +0 -0
  50. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/__init__.py +0 -0
  51. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/_versions.py +0 -0
  52. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/alphamissense_loader.py +0 -0
  53. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/cache_state.py +0 -0
  54. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/cadd_loader.py +0 -0
  55. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/cpic_loader.py +0 -0
  56. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/gnomad_loader.py +0 -0
  57. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/gwas_loader.py +0 -0
  58. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/loader_utils.py +0 -0
  59. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/manager.py +0 -0
  60. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/pharmgkb_loader.py +0 -0
  61. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/rsid_identity_loader.py +0 -0
  62. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/schema.py +0 -0
  63. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/snpedia_loader.py +0 -0
  64. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/snpedia_parser.py +0 -0
  65. {allelix-2.6.1 → allelix-2.6.3}/allelix/databases/staging.py +0 -0
  66. {allelix-2.6.1 → allelix-2.6.3}/allelix/exporters/__init__.py +0 -0
  67. {allelix-2.6.1 → allelix-2.6.3}/allelix/parsers/__init__.py +0 -0
  68. {allelix-2.6.1 → allelix-2.6.3}/allelix/parsers/base.py +0 -0
  69. {allelix-2.6.1 → allelix-2.6.3}/allelix/parsers/ftdna.py +0 -0
  70. {allelix-2.6.1 → allelix-2.6.3}/allelix/parsers/genesforgood.py +0 -0
  71. {allelix-2.6.1 → allelix-2.6.3}/allelix/parsers/livingdna.py +0 -0
  72. {allelix-2.6.1 → allelix-2.6.3}/allelix/parsers/myhappygenes.py +0 -0
  73. {allelix-2.6.1 → allelix-2.6.3}/allelix/parsers/myheritage.py +0 -0
  74. {allelix-2.6.1 → allelix-2.6.3}/allelix/parsers/rsidlist.py +0 -0
  75. {allelix-2.6.1 → allelix-2.6.3}/allelix/parsers/twentythreeandme.py +0 -0
  76. {allelix-2.6.1 → allelix-2.6.3}/allelix/py.typed +0 -0
  77. {allelix-2.6.1 → allelix-2.6.3}/allelix/reports/__init__.py +0 -0
  78. {allelix-2.6.1 → allelix-2.6.3}/allelix/reports/_sources.py +0 -0
  79. {allelix-2.6.1 → allelix-2.6.3}/allelix/reports/association_text.py +0 -0
  80. {allelix-2.6.1 → allelix-2.6.3}/allelix/reports/build_text.py +0 -0
  81. {allelix-2.6.1 → allelix-2.6.3}/allelix/reports/clinvar_text.py +0 -0
  82. {allelix-2.6.1 → allelix-2.6.3}/allelix/reports/diff.py +0 -0
  83. {allelix-2.6.1 → allelix-2.6.3}/allelix/reports/json_report.py +0 -0
  84. {allelix-2.6.1 → allelix-2.6.3}/allelix/reports/methylation.py +0 -0
  85. {allelix-2.6.1 → allelix-2.6.3}/allelix/reports/vcf.py +0 -0
  86. {allelix-2.6.1 → allelix-2.6.3}/allelix/utils/__init__.py +0 -0
  87. {allelix-2.6.1 → allelix-2.6.3}/allelix/utils/allele.py +0 -0
  88. {allelix-2.6.1 → allelix-2.6.3}/allelix/utils/plausibility.py +0 -0
  89. {allelix-2.6.1 → allelix-2.6.3}/allelix.egg-info/dependency_links.txt +0 -0
  90. {allelix-2.6.1 → allelix-2.6.3}/allelix.egg-info/entry_points.txt +0 -0
  91. {allelix-2.6.1 → allelix-2.6.3}/allelix.egg-info/requires.txt +0 -0
  92. {allelix-2.6.1 → allelix-2.6.3}/allelix.egg-info/top_level.txt +0 -0
  93. {allelix-2.6.1 → allelix-2.6.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: allelix
3
- Version: 2.6.1
3
+ Version: 2.6.3
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>
@@ -107,7 +107,7 @@ See [Development](#development) for source installs and running tests, [Managing
107
107
  | Format | Status | Notes |
108
108
  |---|---|---|
109
109
  | 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). |
110
- | 23andMe | ✓ | Tab-delimited, 4 columns, concatenated genotype; a copy a spreadsheet re-saved as CSV (quoted or not) or with spaces is read too ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#23andme)). Reads build 36, 37 or 38; the header's build is used when the known-SNP positions agree. I-prefixed probe IDs are passed through but not matched against ClinVar, and `D`/`I` indel calls (mixed calls such as `AD` too) are matched by no source (ADR-0070), except that a `D`/`I` call at a 23andMe `i` probe reads SNPedia's page for that probe; the report counts both (ADR-0051). A `D`/`I` call at a high-value rsID, or at one ClinVar classifies Pathogenic or Likely pathogenic, is also named as not checked (gene, variant name, rsID and call) on the console, in HTML and in JSON. Such calls are never interpreted, also at known variants such as BRCA1 5382insC, BRCA2 6174delT and CFTR F508del; carrier status for these needs clinical testing ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#d-and-i-calls)). |
110
+ | 23andMe | ✓ | Tab-delimited, 4 columns, concatenated genotype; a copy a spreadsheet re-saved as CSV (quoted or not) or with spaces is read too ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#23andme)). Reads build 36, 37 or 38; the header's build is used when the known-SNP positions agree. I-prefixed probe IDs are passed through but not matched against ClinVar, and `D`/`I` indel calls (mixed calls such as `AD` too) are matched by no source (ADR-0070), except that a `D`/`I` call at a 23andMe `i` probe reads SNPedia's page for that probe; the report counts both (ADR-0051). A `D`/`I` call at a high-value rsID, or at one ClinVar classifies Pathogenic or Likely pathogenic, is also named as not checked (gene, variant name, rsID and call) in JSON, and in HTML and on the console where the rsID is high-value; since 2.6.2 the console and HTML give the others as one count, and `--show-unchecked` lists them. Such calls are never interpreted, also at known variants such as BRCA1 5382insC, BRCA2 6174delT and CFTR F508del; carrier status for these needs clinical testing ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#d-and-i-calls)). |
111
111
  | Genes for Good | ✓ | The 23andMe-style `.txt` from a Genes for Good download (23andMe's columns under a PLINK banner). The imputed text file (about 7.7 million rows) and the imputed VCF are labelled imputed in every report; the measured files are not. The download's VCFs are read as VCF; see [docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#genes-for-good). |
112
112
  | rsID and genotype list | ✓ | Two tab-separated columns, an rsID and a call, with no chromosome, position or build (IYG files, for one). Detected strictly: every one of the first 50 data lines is `ID<TAB>call`, and at least three of their IDs, and at least 80%, are rsIDs. Each row is placed on GRCh38 from the rsID identity table when exactly one strand reading of its call fits the site, and is otherwise counted by reason and kept without a locus for ClinPGx, SNPedia and the GWAS Catalog (ADR-0069). Needs the identity table; only `analyze`, `methylation` and `pharmacogenomics` read it. See [docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#rsid-and-genotype-lists). |
113
113
  | AncestryDNA | ✓ | Tab-delimited, 5 columns. Chromosome mapping: 23→X, 24→Y, 25→X (PAR), 26→MT. V1 and V2 chip layouts. |
@@ -144,21 +144,21 @@ Issues and milestones are tracked at [github.com/allelix/allelix/issues](https:/
144
144
 
145
145
  | Database | Status | Notes |
146
146
  |---|---|---|
147
- | 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. A record written REF = ALT, where this build's reference itself carries the record's allele (Factor V Leiden on GRCh37, or a record for the normal allele), is reported for a user who carries that allele; Pathogenic and Likely pathogenic classifications of a normal allele are dropped (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. Array calls ClinVar cannot match are counted in the report: vendor probes without an rsID at a locus ClinVar classifies as Pathogenic or Likely pathogenic, `D`/`I` calls, and, at such a locus, a chip call that names a base that is none of its own rsID's alleles there (from the rsID identity table's SNV rows, ClinVar's own rows of the rsID and gnomAD's), or whose rsID's alleles no source knows; such a call is matched only to its own rsID's rows, so that another rsID's row cannot be taken for it (ADR-0051). A `D`/`I` call at a high-value or Pathogenic / Likely pathogenic rsID is named as not checked, not only counted; it is still not interpreted. Variants scored down by ClinVar's Conflicting or Benign classification, or as an outranked Pathogenic / Likely pathogenic submission (ADR-0045), are named with their submitter split. ClinVar variants without an rsID are matched for VCF input only, where REF comes from the file (ADR-0046). A VCF allele written with bases it shares with REF (`GTT>GT,G`, `CA>TA`) is trimmed per carried allele before matching, by ClinPGx, SNPedia and the GWAS Catalog as well as ClinVar, and a VCF homozygous deletion to one base matches; indels are not left-aligned, so one the file places at a different position from ClinVar's still does not match (ADR-0047). |
147
+ | 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. A record written REF = ALT, where this build's reference itself carries the record's allele (Factor V Leiden on GRCh37, or a record for the normal allele), is reported for a user who carries that allele; Pathogenic and Likely pathogenic classifications of a normal allele are dropped (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. Array calls ClinVar cannot match are counted in the report: vendor probes without an rsID at a locus ClinVar classifies as Pathogenic or Likely pathogenic, `D`/`I` calls, and, at such a locus, a chip call that names a base that is none of its own rsID's alleles there (from the rsID identity table's SNV rows, ClinVar's own rows of the rsID and gnomAD's), or whose rsID's alleles no source knows; such a call is matched only to its own rsID's rows, so that another rsID's row cannot be taken for it (ADR-0051). A `D`/`I` call at a high-value or Pathogenic / Likely pathogenic rsID is named as not checked, not only counted (in JSON; since 2.6.2 the console and HTML name those at high-value rsIDs and count the rest); it is still not interpreted. Variants scored down by ClinVar's Conflicting or Benign classification, or as an outranked Pathogenic / Likely pathogenic submission (ADR-0045), are named with their submitter split. ClinVar variants without an rsID are matched for VCF input only, where REF comes from the file (ADR-0046). A VCF allele written with bases it shares with REF (`GTT>GT,G`, `CA>TA`) is trimmed per carried allele before matching, by ClinPGx, SNPedia and the GWAS Catalog as well as ClinVar, and a VCF homozygous deletion to one base matches; indels are not left-aligned, so one the file places at a different position from ClinVar's still does not match (ADR-0047). |
148
148
  | 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. |
149
149
  | 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. |
150
150
  | 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, pass `--exclude-snpedia`. The cache can also be rebuilt from source via `scripts/scrape_snpedia.py` + `scripts/parse_snpedia.py`. |
151
151
  | 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. 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
152
  | 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). |
153
153
  | 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. |
154
- | 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. |
154
+ | 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. |
155
155
  | 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). |
156
156
 
157
157
  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).
158
158
 
159
159
  ### CADD modes
160
160
 
161
- CADD ranks how deleterious any single-nucleotide variant is using 100+ annotation tracks (coding, non-coding, regulatory). PHRED 10 = top 10% most deleterious, 20 = top 1%, 30 = top 0.1%.
161
+ CADD ranks how deleterious any single-nucleotide variant is predicted to be, using 100+ annotation tracks (coding, non-coding, regulatory). PHRED 10 = top 10% predicted deleterious, 20 = top 1%, 30 = top 0.1%. CADD predicts how disruptive a change is, not whether its effect is good or bad for you: ClinVar and the other sources say that, and a protective variant can score high.
162
162
 
163
163
  **Opt-in**: download the cache with `allelix db update --cadd`, then enable it with `allelix config set sources.cadd true`. Downloading the cache alone does not change persistent configuration. Use `--no-cadd` to skip enrichment for a single run when it is enabled in config.
164
164
 
@@ -266,7 +266,7 @@ Genotyping arrays sometimes miscall very rare variants, most visibly as a homozy
266
266
  | Heterozygous | at or below `plausibility.heterozygous_max_af` (default 0: gnomAD has the site but no carriers) | **suspicious** |
267
267
  | Either | otherwise | plausible |
268
268
 
269
- The HTML report shows a ⚠ icon next to a flagged genotype, with the reason on hover and in the detail panel, and a muted ○ with the reason when the call was not assessed. The terminal table marks implausible calls with ⚠, suspicious ones with ? and not-assessed ones with ○. JSON reports carry `plausibility` on every annotation (`plausible`, `suspicious`, `implausible` or `not_assessed`) and, when not assessed, `plausibility_reason` (`no_frequency`, `gnomad_not_run`, `chromosome`, `half_call` or `no_allele`; ADR-0050).
269
+ ⚠ means the call looks doubtful because the variant's frequency in gnomAD is at or under Allelix's limit for that call (under it for two copies): with the default limits in the table, two copies of an allele below 0.01%, or one copy of an allele that gnomAD lists with no carriers. A call this rare can be a genotyping or sequencing error; confirm it before relying on it. Allelix can only check variants with population counts in gnomAD, so no ⚠ is not a guarantee. The HTML report shows ⚠ 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 ?. A call that was not assessed gets no mark in either. JSON reports carry `plausibility` on every annotation (`plausible`, `suspicious`, `implausible` or `not_assessed`) and, when not assessed, `plausibility_reason` (`no_frequency`, `gnomad_not_run`, `chromosome`, `half_call` or `no_allele`; ADR-0050).
270
270
 
271
271
  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. A call the file itself declares as one copy (a one-letter array call such as 23andMe's male X calls, or a one-index VCF genotype) is shown as Hemizygous and assessed as one copy. Y and mitochondrial calls are not assessed. When records at one position disagree on ploidy (one copy in one record, two in another), each finding keeps its own record's genotype and zygosity, and the report counts them in a warning, `contradictory_calls` (ADR-0062). Confirm a flagged call with a clinical-grade test before relying on it.
272
272
 
@@ -284,7 +284,7 @@ Not all databases are equal in size. `allelix db update` downloads them all by d
284
284
  | gnomAD | ~7 GB | 5–15 min | Population allele frequencies (how common is this variant?). |
285
285
  | AlphaMissense | ~8GB | 5–15 min | Missense pathogenicity predictions (how likely to break protein function?). |
286
286
  | dbSNP rsID identity | ~460 MB | ~1 min | Cross-build placements: reference allele for array data, rsID recovery on both builds, GRCh37 enrichment translation. |
287
- | CADD (opt-in) | ~6 GB | 5–15 min | Variant deleteriousness scores (how damaging is this variant?). Download with `db update --cadd`; enable in config. |
287
+ | 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. |
288
288
 
289
289
  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.
290
290
 
@@ -513,9 +513,9 @@ Notable load-bearing ADRs:
513
513
  - **ADR-0048: Caches are read-only at analyze time.** With `--no-update`, `analyze` writes nothing to the data directory; every cache opens read-only, installs in rollback-journal mode, and a skipped source is named with its reason (missing, outdated, unreadable, damaged, or WAL mode from an older Allelix). Local migrations run in the update step.
514
514
  - **ADR-0049: Every report names its sources.** JSON `sources` gives every registered source's part in the run (used, ready but not used, or skipped with a reason); `report_warnings` carries report-level warnings, starting with ClinVar not used; the annotated VCF names skipped sources.
515
515
  - **ADR-0050: Zygosity codes and haploid calls.** JSON zygosity and plausibility are codes, a call the file declares haploid is shown as hemizygous, "not assessed" carries a reason, and three rare homozygous P/LP calls give a report warning.
516
- - **ADR-0051: Array calls ClinVar cannot match are counted.** Vendor probes at P/LP loci, `D`/`I` calls and (since 2.6.1) chip calls naming a base their own rsID's known alleles do not include, or whose rsID's alleles no source knows, are counted in the report; since 2.5.2, a `D`/`I` call at a high-value or P/LP rsID is also named as not checked (JSON `high_value_unchecked` and `report_warnings` code `di_calls_not_checked`), and panel coverage puts each requested rsID in one of four states. Since 2.6.1, every such call at a high-value or P/LP site is named, not only counted, whatever the reason: a `D`/`I` call (also at a vendor probe), a base call at a vendor probe without an rsID, an unplaced rsID-list row, an identity locus conflict or a foreign-allele chip call (JSON `high_value_unchecked` reasons `di_call`, `vendor_probe`, `unplaced`, `identity_locus_conflict`, `foreign_alleles`, `unknown_alleles`). Each says what ClinVar did not check; it claims nothing about the sources that look a call up by rsID.
516
+ - **ADR-0051: Array calls ClinVar cannot match are counted.** Vendor probes at P/LP loci, `D`/`I` calls and (since 2.6.1) chip calls naming a base their own rsID's known alleles do not include, or whose rsID's alleles no source knows, are counted in the report; since 2.5.2, a `D`/`I` call at a high-value or P/LP rsID is also named as not checked (JSON `high_value_unchecked` and `report_warnings` code `di_calls_not_checked`), and panel coverage puts each requested rsID in one of four states. Since 2.6.1, every such call at a high-value or P/LP site is named, not only counted, whatever the reason: a `D`/`I` call (also at a vendor probe), a base call at a vendor probe without an rsID, an unplaced rsID-list row, an identity locus conflict or a foreign-allele chip call (JSON `high_value_unchecked` reasons `di_call`, `vendor_probe`, `unplaced`, `identity_locus_conflict`, `foreign_alleles`, `unknown_alleles`). Each says what ClinVar did not check; it claims nothing about the sources that look a call up by rsID. Since 2.6.2 the console and HTML name only the high-value sites and the non-`D`/`I` calls at rsIDs ClinVar itself classifies P/LP, and count the rest by kind; `--show-unchecked` lists every site on the console, HTML keeps them in a collapsed section, and JSON lists them all.
517
517
  - **ADR-0052: Zero-star P/LP on a common allele.** A ClinVar P/LP row without assertion criteria whose allele has a gnomAD frequency of 5% or more is scored down, marked and counted.
518
- - **ADR-0070: A chip D/I call is interpreted by no source.** A `D` or `I` code does not say which indel was called, so ClinVar, SNPedia, the GWAS Catalog and ClinPGx skip it; it is counted, and named at high-value and P/LP rsIDs as not checked. Since 2.6.1, SNPedia reads 23andMe's own `i`-probe page for a D/I call in a file the 23andMe parser read.
518
+ - **ADR-0070: A chip D/I call is interpreted by no source.** A `D` or `I` code does not say which indel was called, so ClinVar, SNPedia, the GWAS Catalog and ClinPGx skip it; it is counted, and named at high-value and P/LP rsIDs as not checked (since 2.6.2 the console and HTML name only those at high-value rsIDs, and count the rest). Since 2.6.1, SNPedia reads 23andMe's own `i`-probe page for a D/I call in a file the 23andMe parser read.
519
519
 
520
520
  Release history: see [`CHANGELOG.md`](https://github.com/allelix/allelix/blob/main/CHANGELOG.md).
521
521
 
@@ -67,7 +67,7 @@ See [Development](#development) for source installs and running tests, [Managing
67
67
  | Format | Status | Notes |
68
68
  |---|---|---|
69
69
  | 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). |
70
- | 23andMe | ✓ | Tab-delimited, 4 columns, concatenated genotype; a copy a spreadsheet re-saved as CSV (quoted or not) or with spaces is read too ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#23andme)). Reads build 36, 37 or 38; the header's build is used when the known-SNP positions agree. I-prefixed probe IDs are passed through but not matched against ClinVar, and `D`/`I` indel calls (mixed calls such as `AD` too) are matched by no source (ADR-0070), except that a `D`/`I` call at a 23andMe `i` probe reads SNPedia's page for that probe; the report counts both (ADR-0051). A `D`/`I` call at a high-value rsID, or at one ClinVar classifies Pathogenic or Likely pathogenic, is also named as not checked (gene, variant name, rsID and call) on the console, in HTML and in JSON. Such calls are never interpreted, also at known variants such as BRCA1 5382insC, BRCA2 6174delT and CFTR F508del; carrier status for these needs clinical testing ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#d-and-i-calls)). |
70
+ | 23andMe | ✓ | Tab-delimited, 4 columns, concatenated genotype; a copy a spreadsheet re-saved as CSV (quoted or not) or with spaces is read too ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#23andme)). Reads build 36, 37 or 38; the header's build is used when the known-SNP positions agree. I-prefixed probe IDs are passed through but not matched against ClinVar, and `D`/`I` indel calls (mixed calls such as `AD` too) are matched by no source (ADR-0070), except that a `D`/`I` call at a 23andMe `i` probe reads SNPedia's page for that probe; the report counts both (ADR-0051). A `D`/`I` call at a high-value rsID, or at one ClinVar classifies Pathogenic or Likely pathogenic, is also named as not checked (gene, variant name, rsID and call) in JSON, and in HTML and on the console where the rsID is high-value; since 2.6.2 the console and HTML give the others as one count, and `--show-unchecked` lists them. Such calls are never interpreted, also at known variants such as BRCA1 5382insC, BRCA2 6174delT and CFTR F508del; carrier status for these needs clinical testing ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#d-and-i-calls)). |
71
71
  | Genes for Good | ✓ | The 23andMe-style `.txt` from a Genes for Good download (23andMe's columns under a PLINK banner). The imputed text file (about 7.7 million rows) and the imputed VCF are labelled imputed in every report; the measured files are not. The download's VCFs are read as VCF; see [docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#genes-for-good). |
72
72
  | rsID and genotype list | ✓ | Two tab-separated columns, an rsID and a call, with no chromosome, position or build (IYG files, for one). Detected strictly: every one of the first 50 data lines is `ID<TAB>call`, and at least three of their IDs, and at least 80%, are rsIDs. Each row is placed on GRCh38 from the rsID identity table when exactly one strand reading of its call fits the site, and is otherwise counted by reason and kept without a locus for ClinPGx, SNPedia and the GWAS Catalog (ADR-0069). Needs the identity table; only `analyze`, `methylation` and `pharmacogenomics` read it. See [docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#rsid-and-genotype-lists). |
73
73
  | AncestryDNA | ✓ | Tab-delimited, 5 columns. Chromosome mapping: 23→X, 24→Y, 25→X (PAR), 26→MT. V1 and V2 chip layouts. |
@@ -104,21 +104,21 @@ Issues and milestones are tracked at [github.com/allelix/allelix/issues](https:/
104
104
 
105
105
  | Database | Status | Notes |
106
106
  |---|---|---|
107
- | 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. A record written REF = ALT, where this build's reference itself carries the record's allele (Factor V Leiden on GRCh37, or a record for the normal allele), is reported for a user who carries that allele; Pathogenic and Likely pathogenic classifications of a normal allele are dropped (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. Array calls ClinVar cannot match are counted in the report: vendor probes without an rsID at a locus ClinVar classifies as Pathogenic or Likely pathogenic, `D`/`I` calls, and, at such a locus, a chip call that names a base that is none of its own rsID's alleles there (from the rsID identity table's SNV rows, ClinVar's own rows of the rsID and gnomAD's), or whose rsID's alleles no source knows; such a call is matched only to its own rsID's rows, so that another rsID's row cannot be taken for it (ADR-0051). A `D`/`I` call at a high-value or Pathogenic / Likely pathogenic rsID is named as not checked, not only counted; it is still not interpreted. Variants scored down by ClinVar's Conflicting or Benign classification, or as an outranked Pathogenic / Likely pathogenic submission (ADR-0045), are named with their submitter split. ClinVar variants without an rsID are matched for VCF input only, where REF comes from the file (ADR-0046). A VCF allele written with bases it shares with REF (`GTT>GT,G`, `CA>TA`) is trimmed per carried allele before matching, by ClinPGx, SNPedia and the GWAS Catalog as well as ClinVar, and a VCF homozygous deletion to one base matches; indels are not left-aligned, so one the file places at a different position from ClinVar's still does not match (ADR-0047). |
107
+ | 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. A record written REF = ALT, where this build's reference itself carries the record's allele (Factor V Leiden on GRCh37, or a record for the normal allele), is reported for a user who carries that allele; Pathogenic and Likely pathogenic classifications of a normal allele are dropped (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. Array calls ClinVar cannot match are counted in the report: vendor probes without an rsID at a locus ClinVar classifies as Pathogenic or Likely pathogenic, `D`/`I` calls, and, at such a locus, a chip call that names a base that is none of its own rsID's alleles there (from the rsID identity table's SNV rows, ClinVar's own rows of the rsID and gnomAD's), or whose rsID's alleles no source knows; such a call is matched only to its own rsID's rows, so that another rsID's row cannot be taken for it (ADR-0051). A `D`/`I` call at a high-value or Pathogenic / Likely pathogenic rsID is named as not checked, not only counted (in JSON; since 2.6.2 the console and HTML name those at high-value rsIDs and count the rest); it is still not interpreted. Variants scored down by ClinVar's Conflicting or Benign classification, or as an outranked Pathogenic / Likely pathogenic submission (ADR-0045), are named with their submitter split. ClinVar variants without an rsID are matched for VCF input only, where REF comes from the file (ADR-0046). A VCF allele written with bases it shares with REF (`GTT>GT,G`, `CA>TA`) is trimmed per carried allele before matching, by ClinPGx, SNPedia and the GWAS Catalog as well as ClinVar, and a VCF homozygous deletion to one base matches; indels are not left-aligned, so one the file places at a different position from ClinVar's still does not match (ADR-0047). |
108
108
  | 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. |
109
109
  | 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. |
110
110
  | 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, pass `--exclude-snpedia`. The cache can also be rebuilt from source via `scripts/scrape_snpedia.py` + `scripts/parse_snpedia.py`. |
111
111
  | 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. 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
112
  | 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). |
113
113
  | 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. |
114
- | 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. |
114
+ | 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. |
115
115
  | 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). |
116
116
 
117
117
  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).
118
118
 
119
119
  ### CADD modes
120
120
 
121
- CADD ranks how deleterious any single-nucleotide variant is using 100+ annotation tracks (coding, non-coding, regulatory). PHRED 10 = top 10% most deleterious, 20 = top 1%, 30 = top 0.1%.
121
+ CADD ranks how deleterious any single-nucleotide variant is predicted to be, using 100+ annotation tracks (coding, non-coding, regulatory). PHRED 10 = top 10% predicted deleterious, 20 = top 1%, 30 = top 0.1%. CADD predicts how disruptive a change is, not whether its effect is good or bad for you: ClinVar and the other sources say that, and a protective variant can score high.
122
122
 
123
123
  **Opt-in**: download the cache with `allelix db update --cadd`, then enable it with `allelix config set sources.cadd true`. Downloading the cache alone does not change persistent configuration. Use `--no-cadd` to skip enrichment for a single run when it is enabled in config.
124
124
 
@@ -226,7 +226,7 @@ Genotyping arrays sometimes miscall very rare variants, most visibly as a homozy
226
226
  | Heterozygous | at or below `plausibility.heterozygous_max_af` (default 0: gnomAD has the site but no carriers) | **suspicious** |
227
227
  | Either | otherwise | plausible |
228
228
 
229
- The HTML report shows a ⚠ icon next to a flagged genotype, with the reason on hover and in the detail panel, and a muted ○ with the reason when the call was not assessed. The terminal table marks implausible calls with ⚠, suspicious ones with ? and not-assessed ones with ○. JSON reports carry `plausibility` on every annotation (`plausible`, `suspicious`, `implausible` or `not_assessed`) and, when not assessed, `plausibility_reason` (`no_frequency`, `gnomad_not_run`, `chromosome`, `half_call` or `no_allele`; ADR-0050).
229
+ ⚠ means the call looks doubtful because the variant's frequency in gnomAD is at or under Allelix's limit for that call (under it for two copies): with the default limits in the table, two copies of an allele below 0.01%, or one copy of an allele that gnomAD lists with no carriers. A call this rare can be a genotyping or sequencing error; confirm it before relying on it. Allelix can only check variants with population counts in gnomAD, so no ⚠ is not a guarantee. The HTML report shows ⚠ 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 ?. A call that was not assessed gets no mark in either. JSON reports carry `plausibility` on every annotation (`plausible`, `suspicious`, `implausible` or `not_assessed`) and, when not assessed, `plausibility_reason` (`no_frequency`, `gnomad_not_run`, `chromosome`, `half_call` or `no_allele`; ADR-0050).
230
230
 
231
231
  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. A call the file itself declares as one copy (a one-letter array call such as 23andMe's male X calls, or a one-index VCF genotype) is shown as Hemizygous and assessed as one copy. Y and mitochondrial calls are not assessed. When records at one position disagree on ploidy (one copy in one record, two in another), each finding keeps its own record's genotype and zygosity, and the report counts them in a warning, `contradictory_calls` (ADR-0062). Confirm a flagged call with a clinical-grade test before relying on it.
232
232
 
@@ -244,7 +244,7 @@ Not all databases are equal in size. `allelix db update` downloads them all by d
244
244
  | gnomAD | ~7 GB | 5–15 min | Population allele frequencies (how common is this variant?). |
245
245
  | AlphaMissense | ~8GB | 5–15 min | Missense pathogenicity predictions (how likely to break protein function?). |
246
246
  | dbSNP rsID identity | ~460 MB | ~1 min | Cross-build placements: reference allele for array data, rsID recovery on both builds, GRCh37 enrichment translation. |
247
- | CADD (opt-in) | ~6 GB | 5–15 min | Variant deleteriousness scores (how damaging is this variant?). Download with `db update --cadd`; enable in config. |
247
+ | 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. |
248
248
 
249
249
  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.
250
250
 
@@ -473,9 +473,9 @@ Notable load-bearing ADRs:
473
473
  - **ADR-0048: Caches are read-only at analyze time.** With `--no-update`, `analyze` writes nothing to the data directory; every cache opens read-only, installs in rollback-journal mode, and a skipped source is named with its reason (missing, outdated, unreadable, damaged, or WAL mode from an older Allelix). Local migrations run in the update step.
474
474
  - **ADR-0049: Every report names its sources.** JSON `sources` gives every registered source's part in the run (used, ready but not used, or skipped with a reason); `report_warnings` carries report-level warnings, starting with ClinVar not used; the annotated VCF names skipped sources.
475
475
  - **ADR-0050: Zygosity codes and haploid calls.** JSON zygosity and plausibility are codes, a call the file declares haploid is shown as hemizygous, "not assessed" carries a reason, and three rare homozygous P/LP calls give a report warning.
476
- - **ADR-0051: Array calls ClinVar cannot match are counted.** Vendor probes at P/LP loci, `D`/`I` calls and (since 2.6.1) chip calls naming a base their own rsID's known alleles do not include, or whose rsID's alleles no source knows, are counted in the report; since 2.5.2, a `D`/`I` call at a high-value or P/LP rsID is also named as not checked (JSON `high_value_unchecked` and `report_warnings` code `di_calls_not_checked`), and panel coverage puts each requested rsID in one of four states. Since 2.6.1, every such call at a high-value or P/LP site is named, not only counted, whatever the reason: a `D`/`I` call (also at a vendor probe), a base call at a vendor probe without an rsID, an unplaced rsID-list row, an identity locus conflict or a foreign-allele chip call (JSON `high_value_unchecked` reasons `di_call`, `vendor_probe`, `unplaced`, `identity_locus_conflict`, `foreign_alleles`, `unknown_alleles`). Each says what ClinVar did not check; it claims nothing about the sources that look a call up by rsID.
476
+ - **ADR-0051: Array calls ClinVar cannot match are counted.** Vendor probes at P/LP loci, `D`/`I` calls and (since 2.6.1) chip calls naming a base their own rsID's known alleles do not include, or whose rsID's alleles no source knows, are counted in the report; since 2.5.2, a `D`/`I` call at a high-value or P/LP rsID is also named as not checked (JSON `high_value_unchecked` and `report_warnings` code `di_calls_not_checked`), and panel coverage puts each requested rsID in one of four states. Since 2.6.1, every such call at a high-value or P/LP site is named, not only counted, whatever the reason: a `D`/`I` call (also at a vendor probe), a base call at a vendor probe without an rsID, an unplaced rsID-list row, an identity locus conflict or a foreign-allele chip call (JSON `high_value_unchecked` reasons `di_call`, `vendor_probe`, `unplaced`, `identity_locus_conflict`, `foreign_alleles`, `unknown_alleles`). Each says what ClinVar did not check; it claims nothing about the sources that look a call up by rsID. Since 2.6.2 the console and HTML name only the high-value sites and the non-`D`/`I` calls at rsIDs ClinVar itself classifies P/LP, and count the rest by kind; `--show-unchecked` lists every site on the console, HTML keeps them in a collapsed section, and JSON lists them all.
477
477
  - **ADR-0052: Zero-star P/LP on a common allele.** A ClinVar P/LP row without assertion criteria whose allele has a gnomAD frequency of 5% or more is scored down, marked and counted.
478
- - **ADR-0070: A chip D/I call is interpreted by no source.** A `D` or `I` code does not say which indel was called, so ClinVar, SNPedia, the GWAS Catalog and ClinPGx skip it; it is counted, and named at high-value and P/LP rsIDs as not checked. Since 2.6.1, SNPedia reads 23andMe's own `i`-probe page for a D/I call in a file the 23andMe parser read.
478
+ - **ADR-0070: A chip D/I call is interpreted by no source.** A `D` or `I` code does not say which indel was called, so ClinVar, SNPedia, the GWAS Catalog and ClinPGx skip it; it is counted, and named at high-value and P/LP rsIDs as not checked (since 2.6.2 the console and HTML name only those at high-value rsIDs, and count the rest). Since 2.6.1, SNPedia reads 23andMe's own `i`-probe page for a D/I call in a file the 23andMe parser read.
479
479
 
480
480
  Release history: see [`CHANGELOG.md`](https://github.com/allelix/allelix/blob/main/CHANGELOG.md).
481
481
 
@@ -68,27 +68,60 @@ def _signals_end_normally() -> Iterator[None]:
68
68
  signal.signal(ending, handler)
69
69
 
70
70
 
71
+ # A character no encoding can lose: the stream's error mode is tried on it.
72
+ _UNENCODABLE_PROBE = "\U0010fffd"
73
+ _ESCAPE_OR_REPLACE = "allelix.surrogateescape-or-replace"
74
+
75
+
76
+ def _escape_or_replace(exc: UnicodeError) -> tuple[bytes, int]:
77
+ """Write back a byte a file name was decoded from; replace anything else with "?".
78
+
79
+ A POSIX ASCII locale's stdout is ``surrogateescape``: a path holding
80
+ bytes the locale cannot decode prints those bytes back unchanged. Other
81
+ characters it cannot encode, such as "✓" or "…", become "?" (2.6.2).
82
+ """
83
+ if not isinstance(exc, UnicodeEncodeError):
84
+ raise exc
85
+ out = bytearray()
86
+ for char in exc.object[exc.start : exc.end]:
87
+ if 0xDC80 <= ord(char) <= 0xDCFF:
88
+ out.append(ord(char) - 0xDC00)
89
+ else:
90
+ out += "?".encode(exc.encoding)
91
+ return bytes(out), exc.end
92
+
93
+
94
+ codecs.register_error(_ESCAPE_OR_REPLACE, _escape_or_replace)
95
+
96
+
71
97
  def _replace_unencodable_output(stream: object) -> None:
72
- """Make ``stream`` replace a character its encoding cannot hold, instead of raising (2.6.1).
98
+ """Make ``stream`` replace a character its encoding cannot hold, instead of raising.
73
99
 
74
100
  For a console, pipe or redirect that is not UTF-8 (Windows' cp1252, an
75
101
  ASCII locale): `analyze` crashed with UnicodeEncodeError on a character
76
- such as the plausibility marker "○". A UTF-8 stream, one with a
77
- non-strict error mode (``PYTHONIOENCODING=cp1252:ignore`` or
78
- ``:backslashreplace``), and one that cannot be reconfigured are left as
79
- they are; a strict one, given (``cp1252:strict``) or by default, is
80
- switched. Files are written as UTF-8.
102
+ such as the plausibility marker "○" (2.6.1). Any stream whose error mode
103
+ raises on such a character is switched: a strict one, given
104
+ (``cp1252:strict``) or by default, and a POSIX ASCII locale's
105
+ ``surrogateescape``, which still writes back the bytes of an undecodable
106
+ file name (2.6.2). A stream whose error mode does not raise
107
+ (``PYTHONIOENCODING=cp1252:ignore`` or ``:backslashreplace``), one whose
108
+ encoding holds every character (UTF-8), and one that cannot be
109
+ reconfigured are left as they are. Files are written as UTF-8.
81
110
  """
82
111
  encoding = getattr(stream, "encoding", None)
112
+ errors = getattr(stream, "errors", None) or "strict"
83
113
  reconfigure = getattr(stream, "reconfigure", None)
84
- if not encoding or reconfigure is None or getattr(stream, "errors", None) != "strict":
114
+ if not encoding or reconfigure is None:
85
115
  return
86
116
  try:
87
- if codecs.lookup(encoding).name == "utf-8":
88
- return
117
+ _UNENCODABLE_PROBE.encode(encoding, errors)
118
+ except UnicodeEncodeError:
119
+ pass
89
120
  except LookupError:
90
121
  return
91
- reconfigure(errors="replace")
122
+ else:
123
+ return
124
+ reconfigure(errors=_ESCAPE_OR_REPLACE if errors == "surrogateescape" else "replace")
92
125
 
93
126
 
94
127
  class _Group(click.Group):
@@ -21,7 +21,6 @@ from typing import TYPE_CHECKING, NamedTuple, cast
21
21
 
22
22
  import click
23
23
  from rich.console import Console
24
- from rich.markup import escape
25
24
 
26
25
  from allelix.annotators import get_annotators
27
26
  from allelix.annotators.clinvar import (
@@ -65,12 +64,14 @@ from allelix.reports.high_value import (
65
64
  format_warnings,
66
65
  load_high_value_snps,
67
66
  scan_no_calls,
67
+ unchecked_rollup,
68
68
  unchecked_sites,
69
69
  )
70
70
  from allelix.reports.html import render_html
71
71
  from allelix.reports.json_report import render_json
72
72
  from allelix.reports.terminal import render_terminal, render_terminal_diff
73
73
  from allelix.utils.build_detect import BuildDecisionError, needs_late_seeds
74
+ from allelix.utils.markup import literal
74
75
 
75
76
  if TYPE_CHECKING:
76
77
  from collections.abc import Collection, Iterator
@@ -89,7 +90,8 @@ if TYPE_CHECKING:
89
90
  from allelix.reports._pipeline import BuildDiagnostics, StreamBuild
90
91
  from allelix.utils.build_detect import BuildDecision
91
92
 
92
- console = Console()
93
+ # No :name: emoji codes: database and input text is printed as it is.
94
+ console = Console(emoji=False)
93
95
 
94
96
  # Sort 1-22 numerically, then X, Y, MT, then anything else alphabetically.
95
97
  _NAMED_CHROM_ORDER = {"X": 0, "Y": 1, "MT": 2}
@@ -213,8 +215,8 @@ def note_imputed_input(
213
215
  prefix = f"{which}: " if which else ""
214
216
  tail = f" {extra}" if extra else ""
215
217
  console.print(
216
- f"[yellow]Note:[/yellow] {escape(prefix)}input method: "
217
- f"{escape(input_method_label(method))}.{escape(tail)}"
218
+ f"[yellow]Note:[/yellow] {literal(prefix)}input method: "
219
+ f"{literal(input_method_label(method))}.{literal(tail)}"
218
220
  )
219
221
 
220
222
 
@@ -311,7 +313,7 @@ def _forced_format_warning(file_path: Path, parser: GenotypeParser) -> str | Non
311
313
  def _mark_forced(parser: GenotypeParser, warning: str | None) -> GenotypeParser:
312
314
  """Print the forced-format warning and keep it on the parser for the reports."""
313
315
  if warning is not None:
314
- console.print(f"[bold yellow]Warning:[/bold yellow] {escape(warning)}")
316
+ console.print(f"[bold yellow]Warning:[/bold yellow] {literal(warning)}")
315
317
  parser.forced_warning = warning
316
318
  return parser
317
319
 
@@ -654,10 +656,10 @@ def _run_setup(annotator: Annotator, *, force: bool = False) -> bool:
654
656
  except Exception as exc:
655
657
  if hasattr(exc, "close"):
656
658
  exc.close()
657
- console.print(f" [red]{annotator.name}: {exc}[/red]")
659
+ console.print(f" [red]{annotator.name}: {literal(str(exc))}[/red]")
658
660
  return False
659
661
  for note in getattr(annotator, "shrink_notes", ()):
660
- console.print(f" [yellow]{escape(note)}[/yellow]")
662
+ console.print(f" [yellow]{literal(note)}[/yellow]")
661
663
  sig = getattr(annotator, "cached_remote_signal", lambda: None)()
662
664
  # No freshness signal stored: none at all, or (ClinPGx) only the CPIC mark.
663
665
  no_pgkb_part = isinstance(annotator, PharmGKBAnnotator) and not (sig or "").startswith("pgkb:")
@@ -693,7 +695,9 @@ def _prepare_caches(
693
695
  if db_path.name in untouched:
694
696
  continue
695
697
  if convert_to_rollback_journal(db_path):
696
- console.print(f" [dim]{db_path.name}: converted to rollback-journal mode[/dim]")
698
+ console.print(
699
+ f" [dim]{literal(db_path.name)}: converted to rollback-journal mode[/dim]"
700
+ )
697
701
  for annotator in annotators:
698
702
  with annotator:
699
703
  if annotator.cache_status().state is CacheState.OUTDATED:
@@ -748,7 +752,7 @@ def _maybe_refresh_databases(
748
752
  if _run_setup(annotator):
749
753
  console.print(
750
754
  f"[green]✓ {annotator.display_name} updated[/green] "
751
- f"(version {annotator.version() or '(unknown)'})"
755
+ f"(version {literal(annotator.version() or '(unknown)')})"
752
756
  )
753
757
 
754
758
 
@@ -894,9 +898,12 @@ def _emit_build_notices(
894
898
 
895
899
  prefix = f"{heading}: " if heading else ""
896
900
  if banner:
897
- console.print(f"[dim]{prefix}Build: {diag.effective_build} ({source_text(diag)})[/dim]")
901
+ console.print(
902
+ f"[dim]{literal(prefix)}Build: {diag.effective_build} "
903
+ f"({literal(source_text(diag))})[/dim]"
904
+ )
898
905
  for notice in build_notices(diag):
899
- console.print(f"[yellow]{prefix}{notice.text}[/yellow]")
906
+ console.print(f"[yellow]{literal(prefix + notice.text)}[/yellow]")
900
907
 
901
908
 
902
909
  def _emit_runtime_nudges(result: object, missing_resolvers: tuple[str, ...] = ()) -> None:
@@ -932,7 +939,7 @@ def _emit_runtime_nudges(result: object, missing_resolvers: tuple[str, ...] = ()
932
939
  if scored_down:
933
940
  console.print(f"[dim]{scored_down}[/dim]")
934
941
  for ann in getattr(result, "clinvar_scored_down_variants", []):
935
- console.print(f"[dim] {escape(scored_down_variant_text(ann))}[/dim]")
942
+ console.print(f"[dim] {literal(scored_down_variant_text(ann))}[/dim]")
936
943
  common_allele = common_allele_line(getattr(result, "clinvar_common_allele", 0))
937
944
  if common_allele:
938
945
  console.print(f"[dim]{common_allele}[/dim]")
@@ -943,7 +950,7 @@ def _emit_runtime_nudges(result: object, missing_resolvers: tuple[str, ...] = ()
943
950
  "is not one Allelix scores yet.[/yellow]"
944
951
  )
945
952
  for line in strand_abstention_lines(getattr(result, "strand_abstentions", {})):
946
- console.print(f"[dim]{escape(line)}[/dim]")
953
+ console.print(f"[dim]{literal(line)}[/dim]")
947
954
 
948
955
  no_ref = getattr(result, "no_ref_variant_count", 0)
949
956
  rsidless = getattr(result, "rsidless_variant_count", 0)
@@ -1011,6 +1018,7 @@ def _run_analysis_command(
1011
1018
  keep_filtered: bool = False,
1012
1019
  min_gq: int | None = None,
1013
1020
  filter_path: Path | None = None,
1021
+ show_unchecked: bool = False,
1014
1022
  ) -> None:
1015
1023
  from allelix.reports import check_writable, same_destination, validate_output_path
1016
1024
 
@@ -1107,7 +1115,7 @@ def _run_analysis_command(
1107
1115
  # A source the user turned off is not reported as unusable.
1108
1116
  unready = [(a, a.cache_status()) for a in not_ready if a.name not in choices]
1109
1117
  for annotator, status in unready:
1110
- console.print(f"[yellow]Skipping {escape(unready_line(annotator, status))}[/yellow]")
1118
+ console.print(f"[yellow]Skipping {literal(unready_line(annotator, status))}[/yellow]")
1111
1119
 
1112
1120
  all_active: list[Annotator] = list(ready)
1113
1121
  if gnomad_annotator is not None and gnomad_annotator.is_ready():
@@ -1119,7 +1127,7 @@ def _run_analysis_command(
1119
1127
  if identity_annotator is not None and identity_annotator.is_ready():
1120
1128
  all_active.append(identity_annotator)
1121
1129
  versions = ", ".join(f"{a.display_name} ({a.version() or 'unknown'})" for a in all_active)
1122
- console.print(f"[dim]Analyzing against: {versions}[/dim]")
1130
+ console.print(f"[dim]Analyzing against: {literal(versions)}[/dim]")
1123
1131
 
1124
1132
  high_value = load_high_value_snps()
1125
1133
  hv_rsids = set(high_value)
@@ -1162,8 +1170,8 @@ def _run_analysis_command(
1162
1170
  status = other.cache_status()
1163
1171
  failures[annotator.name] = (status.state.value, unready_line(other, status))
1164
1172
  console.print(
1165
- f"[yellow]Skipping {escape(unready_line(other, status))}"
1166
- f" (input is {escape(result.build)})[/yellow]"
1173
+ f"[yellow]Skipping {literal(unready_line(other, status))}"
1174
+ f" (input is {literal(result.build)})[/yellow]"
1167
1175
  )
1168
1176
  else:
1169
1177
  not_applicable.append(annotator.name)
@@ -1236,8 +1244,8 @@ def _run_analysis_command(
1236
1244
  ):
1237
1245
  continue # already printed: a "warning:" line, or the build notice
1238
1246
  if report_warning.code == DI_CALLS_NOT_CHECKED:
1239
- continue # named in the high-value block below
1240
- console.print(f"[bold yellow]Warning:[/bold yellow] {escape(report_warning.message)}")
1247
+ continue # in the unchecked block below: counted there, named in JSON (2.6.2)
1248
+ console.print(f"[bold yellow]Warning:[/bold yellow] {literal(report_warning.message)}")
1241
1249
 
1242
1250
  missing_resolvers = tuple(
1243
1251
  label
@@ -1257,14 +1265,30 @@ def _run_analysis_command(
1257
1265
  f"[bold red]Warning:[/bold red] {len(hv_warnings)} high-value SNP(s) returned no-call:"
1258
1266
  )
1259
1267
  for line in format_warnings(hv_warnings):
1260
- console.print(f" [red]⚠[/red] {line}")
1261
- if unchecked:
1268
+ console.print(f" [red]⚠[/red] {literal(line)}")
1269
+ # 2.6.2: only the high-value sites and the non-D/I calls at P/LP rsIDs
1270
+ # are named; the rest are counted by kind, unless --show-unchecked.
1271
+ inline, counted = unchecked_rollup(unchecked)
1272
+ if unchecked and (show_unchecked or not counted):
1262
1273
  console.print(
1263
1274
  f"[bold red]Warning:[/bold red] {len(unchecked)} high-value or Pathogenic "
1264
1275
  "site(s) could not be checked:"
1265
1276
  )
1266
1277
  for site in unchecked:
1267
- console.print(f" [red]⚠[/red] {escape(site.text)}")
1278
+ console.print(f" [red]⚠[/red] {literal(site.text)}")
1279
+ elif unchecked:
1280
+ console.print(
1281
+ f"[bold red]Warning:[/bold red] {len(unchecked):,} high-value or Pathogenic "
1282
+ f"site(s) could not be checked: {len(inline):,} named here, "
1283
+ f"{len(unchecked) - len(inline):,} counted by reason."
1284
+ )
1285
+ for site in inline:
1286
+ console.print(f" [red]⚠[/red] {literal(site.text)}")
1287
+ for line in counted:
1288
+ console.print(f" [red]⚠[/red] {literal(line)}")
1289
+ console.print(
1290
+ " Run again with --show-unchecked to list every site; a JSON report lists them all."
1291
+ )
1268
1292
 
1269
1293
  if counter.count:
1270
1294
  console.print(
@@ -1276,10 +1300,11 @@ def _run_analysis_command(
1276
1300
  + array_quality_lines(result.array_quality, result.probe_classes)
1277
1301
  + placement_lines(result.placement)
1278
1302
  ):
1279
- console.print(f"[yellow]Note:[/yellow] {line}")
1303
+ console.print(f"[yellow]Note:[/yellow] {literal(line)}")
1280
1304
  if result.input_method:
1281
1305
  console.print(
1282
- f"[yellow]Note:[/yellow] input method: {input_method_label(result.input_method)}."
1306
+ "[yellow]Note:[/yellow] input method: "
1307
+ f"{literal(input_method_label(result.input_method))}."
1283
1308
  + (
1284
1309
  " Rare variants are the least reliable imputed calls; confirm any finding"
1285
1310
  " by direct genotyping."
@@ -1331,7 +1356,7 @@ def _run_analysis_command(
1331
1356
  if previous_input and previous_input != file_path.name:
1332
1357
  console.print(
1333
1358
  f"[bold yellow]Warning:[/bold yellow] the --diff baseline was made from "
1334
- f"{escape(previous_input)}, not {escape(file_path.name)}; the comparison "
1359
+ f"{literal(previous_input)}, not {literal(file_path.name)}; the comparison "
1335
1360
  "may be between two different people or files."
1336
1361
  )
1337
1362
 
@@ -1388,8 +1413,10 @@ def _run_analysis_command(
1388
1413
  diff=diff_result,
1389
1414
  high_value_no_calls=hv_warning_lines,
1390
1415
  high_value_unchecked=[site.text for site in unchecked] or None,
1416
+ high_value_unchecked_named=[site.text for site in inline],
1417
+ high_value_unchecked_counts=counted,
1391
1418
  )
1392
- console.print(f"[green]Wrote {rendered:,} annotation(s) to {output}[/green]")
1419
+ console.print(f"[green]Wrote {rendered:,} annotation(s) to {literal(str(output))}[/green]")
1393
1420
 
1394
1421
  if vcf_out is not None:
1395
1422
  from allelix.reports.vcf import render_vcf
@@ -1420,7 +1447,8 @@ def _run_analysis_command(
1420
1447
  record_recovered=result.vcf_write_inputs.record_recovered,
1421
1448
  )
1422
1449
  console.print(
1423
- f"[green]Wrote annotated VCF with {stamped:,} stamped row(s) to {vcf_out}[/green]"
1450
+ f"[green]Wrote annotated VCF with {stamped:,} stamped row(s) to "
1451
+ f"{literal(str(vcf_out))}[/green]"
1424
1452
  )
1425
1453
 
1426
1454
  console.print(
@@ -269,6 +269,20 @@ _KEEP_FILTERED_OPT = click.option(
269
269
  "skipped and counted."
270
270
  ),
271
271
  )
272
+ # 2.6.2: the terminal names only the unchecked sites that are high-value or
273
+ # P/LP by their own rsID, and counts the rest by kind, unless asked for all.
274
+ _SHOW_UNCHECKED_OPT = click.option(
275
+ "--show-unchecked",
276
+ is_flag=True,
277
+ default=False,
278
+ help=(
279
+ "On the terminal, list every high-value or Pathogenic site that could "
280
+ "not be checked. By default the terminal names only high-value sites "
281
+ "and non-D/I calls at rsIDs ClinVar classifies Pathogenic or Likely "
282
+ "pathogenic, and counts the rest by kind. The HTML report keeps the full "
283
+ "list in a collapsed section and the JSON report lists every site."
284
+ ),
285
+ )
272
286
  _MIN_GQ_OPT = click.option(
273
287
  "--min-gq",
274
288
  type=click.IntRange(min=0),
@@ -30,6 +30,7 @@ from allelix.cli._options import (
30
30
  _OUTPUT_OPT,
31
31
  _REPORT_FORMAT_OPT,
32
32
  _SAMPLE_OPT,
33
+ _SHOW_UNCHECKED_OPT,
33
34
  _SNPEDIA_MIN_MAG_OPT,
34
35
  _VCF_OUT_OPT,
35
36
  )
@@ -67,6 +68,7 @@ if TYPE_CHECKING:
67
68
  @_KEEP_FILTERED_OPT
68
69
  @_MIN_GQ_OPT
69
70
  @_VCF_OUT_OPT
71
+ @_SHOW_UNCHECKED_OPT
70
72
  def analyze(
71
73
  file_path: Path,
72
74
  fmt: str | None,
@@ -91,6 +93,7 @@ def analyze(
91
93
  keep_filtered: bool,
92
94
  min_gq: int,
93
95
  vcf_out: Path | None,
96
+ show_unchecked: bool,
94
97
  ) -> None:
95
98
  """Annotate a genotype file against all ready reference databases."""
96
99
  filter_genes: frozenset[str] | None = None
@@ -126,4 +129,5 @@ def analyze(
126
129
  min_gq=min_gq,
127
130
  vcf_out=vcf_out,
128
131
  filter_path=filter_file,
132
+ show_unchecked=show_unchecked,
129
133
  )