allelix 2.6.3__tar.gz → 2.7.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {allelix-2.6.3/allelix.egg-info → allelix-2.7.1}/PKG-INFO +23 -17
- {allelix-2.6.3 → allelix-2.7.1}/README.md +22 -16
- {allelix-2.6.3 → allelix-2.7.1}/allelix/annotators/__init__.py +1 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/annotators/_resolution.py +86 -3
- {allelix-2.6.3 → allelix-2.7.1}/allelix/annotators/clinvar.py +101 -4
- {allelix-2.6.3 → allelix-2.7.1}/allelix/annotators/gwas.py +19 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/annotators/pharmgkb.py +174 -20
- {allelix-2.6.3 → allelix-2.7.1}/allelix/annotators/rsid_identity.py +143 -32
- {allelix-2.6.3 → allelix-2.7.1}/allelix/cli/_helpers.py +40 -6
- {allelix-2.6.3 → allelix-2.7.1}/allelix/cli/_options.py +6 -4
- {allelix-2.6.3 → allelix-2.7.1}/allelix/cli/db.py +31 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/cli/focused.py +71 -7
- {allelix-2.6.3 → allelix-2.7.1}/allelix/cli/utility.py +136 -23
- {allelix-2.6.3 → allelix-2.7.1}/allelix/config.py +2 -1
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/_versions.py +4 -1
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/cpic_loader.py +3 -2
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/gwas_loader.py +96 -8
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/loader_utils.py +50 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/manager.py +85 -25
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/pharmgkb_loader.py +45 -14
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/rsid_identity_loader.py +2 -3
- {allelix-2.6.3 → allelix-2.7.1}/allelix/models.py +37 -1
- {allelix-2.6.3 → allelix-2.7.1}/allelix/parsers/__init__.py +4 -1
- {allelix-2.6.3 → allelix-2.7.1}/allelix/parsers/_helpers.py +30 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/parsers/ancestrydna.py +2 -1
- {allelix-2.6.3 → allelix-2.7.1}/allelix/parsers/decodeme.py +2 -1
- {allelix-2.6.3 → allelix-2.7.1}/allelix/parsers/ftdna.py +2 -1
- {allelix-2.6.3 → allelix-2.7.1}/allelix/parsers/ftdna_famfinder.py +2 -1
- {allelix-2.6.3 → allelix-2.7.1}/allelix/parsers/ftdna_illumina.py +2 -1
- {allelix-2.6.3 → allelix-2.7.1}/allelix/parsers/livingdna.py +2 -1
- {allelix-2.6.3 → allelix-2.7.1}/allelix/parsers/myhappygenes.py +7 -2
- {allelix-2.6.3 → allelix-2.7.1}/allelix/parsers/myheritage.py +2 -1
- {allelix-2.6.3 → allelix-2.7.1}/allelix/parsers/twentythreeandme.py +2 -1
- {allelix-2.6.3 → allelix-2.7.1}/allelix/parsers/vcf.py +528 -13
- {allelix-2.6.3 → allelix-2.7.1}/allelix/reports/__init__.py +135 -15
- {allelix-2.6.3 → allelix-2.7.1}/allelix/reports/_pipeline.py +278 -24
- {allelix-2.6.3 → allelix-2.7.1}/allelix/reports/diff.py +101 -19
- {allelix-2.6.3 → allelix-2.7.1}/allelix/reports/high_value.py +44 -4
- {allelix-2.6.3 → allelix-2.7.1}/allelix/reports/html.py +180 -60
- {allelix-2.6.3 → allelix-2.7.1}/allelix/reports/json_report.py +24 -5
- {allelix-2.6.3 → allelix-2.7.1}/allelix/reports/terminal.py +37 -6
- {allelix-2.6.3 → allelix-2.7.1}/allelix/reports/vcf.py +70 -4
- {allelix-2.6.3 → allelix-2.7.1}/allelix/utils/allele.py +29 -9
- {allelix-2.6.3 → allelix-2.7.1}/allelix/utils/build_detect.py +8 -2
- {allelix-2.6.3 → allelix-2.7.1/allelix.egg-info}/PKG-INFO +23 -17
- {allelix-2.6.3 → allelix-2.7.1}/pyproject.toml +1 -1
- {allelix-2.6.3 → allelix-2.7.1}/LICENSE +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/MANIFEST.in +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/__init__.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/annotators/_placement.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/annotators/alphamissense.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/annotators/base.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/annotators/cadd.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/annotators/gnomad.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/annotators/reference_fallback.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/annotators/snpedia.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/attribution.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/cli/__init__.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/cli/analyze.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/cli/config.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/compare.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/data/__init__.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/data/clinvar_clnsig_snapshot.yaml +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/data/high_value_snps.yaml +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/__init__.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/alphamissense_loader.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/cache_state.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/cadd_loader.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/gnomad_loader.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/schema.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/snpedia_loader.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/snpedia_parser.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/databases/staging.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/exporters/__init__.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/exporters/plink.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/parsers/base.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/parsers/genesforgood.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/parsers/rsidlist.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/py.typed +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/reports/_sources.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/reports/association_text.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/reports/build_text.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/reports/clinvar_text.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/reports/methylation.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/utils/__init__.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/utils/markup.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix/utils/plausibility.py +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix.egg-info/SOURCES.txt +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix.egg-info/dependency_links.txt +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix.egg-info/entry_points.txt +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix.egg-info/requires.txt +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/allelix.egg-info/top_level.txt +0 -0
- {allelix-2.6.3 → allelix-2.7.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: allelix
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.7.1
|
|
4
4
|
Summary: Open-source genotype analysis toolkit. Format-agnostic ingestion, database-agnostic annotation, offline-first.
|
|
5
5
|
Author: Allelix
|
|
6
6
|
Maintainer-email: dial481 <dial481@users.noreply.github.com>
|
|
@@ -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.
|
|
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.
|
|
60
60
|
|
|
61
61
|
## Quickstart
|
|
62
62
|
|
|
@@ -96,7 +96,8 @@ allelix analyze your_genotype_file.txt --filter-file my_panel.txt --output repor
|
|
|
96
96
|
# Annotated VCF output — VCF-in / VCF-out for pipeline integration
|
|
97
97
|
# Writes a valid VCF with annotations as INFO fields + full provenance in the header.
|
|
98
98
|
# Missing ##contig declarations are synthesized; raw CHROM names are preserved.
|
|
99
|
-
# Refuses to overwrite; requires VCF or gVCF input.
|
|
99
|
+
# Refuses to overwrite; requires VCF or gVCF input. Written uncompressed:
|
|
100
|
+
# a .gz or .bgz name is refused (compress afterwards with bgzip).
|
|
100
101
|
allelix analyze your_wgs.vcf.gz --vcf-out annotated.vcf
|
|
101
102
|
```
|
|
102
103
|
|
|
@@ -117,7 +118,7 @@ See [Development](#development) for source installs and running tests, [Managing
|
|
|
117
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). |
|
|
118
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)). |
|
|
119
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)). |
|
|
120
|
-
| 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 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. 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: 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
122
|
|
|
122
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.
|
|
123
124
|
|
|
@@ -147,14 +148,14 @@ Issues and milestones are tracked at [github.com/allelix/allelix/issues](https:/
|
|
|
147
148
|
| 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
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. |
|
|
149
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. |
|
|
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
|
|
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). |
|
|
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
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). |
|
|
153
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. |
|
|
154
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. |
|
|
155
156
|
| 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
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
|
+
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.
|
|
158
159
|
|
|
159
160
|
### CADD modes
|
|
160
161
|
|
|
@@ -210,9 +211,9 @@ This is not a disclaimer afterthought. It is a design constraint that affects mo
|
|
|
210
211
|
|
|
211
212
|
## Privacy
|
|
212
213
|
|
|
213
|
-
-
|
|
214
|
-
-
|
|
215
|
-
-
|
|
214
|
+
- Your genotype data never leaves your machine. No telemetry. No uploads. No analytics.
|
|
215
|
+
- Allelix goes online only to fetch reference databases, which are cached locally: when you run `allelix db update`, and in a freshness check before `analyze`, `methylation` or `pharmacogenomics`. The check asks the servers of ClinVar (NCBI), the GWAS Catalog (EBI) and ClinPGx (with CPIC's API) whether a switched-on cache older than seven days has changed, and downloads and installs the new data if it has. The pre-built caches are not checked. Each request carries only what any download carries (the address requested, an `allelix/<version>` user agent, and your IP address as the server sees it), never genotypes, file names or results.
|
|
216
|
+
- With `--no-update`, nothing is contacted: the analysis runs offline against the local caches.
|
|
216
217
|
|
|
217
218
|
### Output files contain real annotations of your genome
|
|
218
219
|
|
|
@@ -224,6 +225,11 @@ that's where they sit until you delete them. Allelix doesn't
|
|
|
224
225
|
auto-clean and won't warn you when you write to `/tmp/` or any
|
|
225
226
|
other shared location. Treat the files as personal data: read them,
|
|
226
227
|
move them somewhere you control, or delete when you're done.
|
|
228
|
+
Since 2.7.0 a new report file (`--output`, `--vcf-out`, and the `.bed`,
|
|
229
|
+
`.bim` and `.fam` of `export plink`) is created readable and writable by
|
|
230
|
+
you alone (`0600`), whatever your umask; a file that already exists keeps
|
|
231
|
+
its mode. Terminal output you redirect to a file is created by your shell,
|
|
232
|
+
with its umask.
|
|
227
233
|
`allelix db clean` (shipped in v2.2.0) handles the cache side of
|
|
228
234
|
the lifecycle; output reports are still the user's responsibility
|
|
229
235
|
to manage.
|
|
@@ -254,7 +260,7 @@ allelix config set plausibility.homozygous_max_af 0.0001
|
|
|
254
260
|
allelix config set plausibility.heterozygous_max_af 0
|
|
255
261
|
```
|
|
256
262
|
|
|
257
|
-
CLI flags (`--no-gnomad`, `--no-alphamissense`, `--no-cadd`, `--exclude-snpedia`) turn a source off for a single run. The config sets the baseline; flags override per-invocation. A source turned off is fully off: no finding comes from it, and no other source uses it either. For example, with ClinVar or gnomAD off, ClinPGx and SNPedia cannot use them to tell a normal allele. The report says what ran without it. `stats`, `extract` and `export plink` follow the config the same way.
|
|
263
|
+
CLI flags (`--no-gnomad`, `--no-alphamissense`, `--no-cadd`, `--exclude-snpedia`) turn a source off for a single run. The config sets the baseline; flags override per-invocation. `pharmacogenomics` refuses `--exclude-snpedia` and the GWAS Catalog and SNPedia floor options, since its report keeps ClinPGx findings only; switch SNPedia off there in the config. A source turned off is fully off: no finding comes from it, and no other source uses it either. For example, with ClinVar or gnomAD off, ClinPGx and SNPedia cannot use them to tell a normal allele. The report says what ran without it. `stats`, `extract` and `export plink` follow the config the same way.
|
|
258
264
|
|
|
259
265
|
### Plausibility flag
|
|
260
266
|
|
|
@@ -268,7 +274,7 @@ Genotyping arrays sometimes miscall very rare variants, most visibly as a homozy
|
|
|
268
274
|
|
|
269
275
|
⚠ 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
276
|
|
|
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.
|
|
277
|
+
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 that are read on their own 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). Consecutive single-base records of one REF naming different ALTs are read together instead ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#one-site-written-over-several-records)): when two or more passing calls include a haploid call, the site is withheld and counted as `split_site_calls`; a rejected sibling does not cancel a passing call. Confirm a flagged call with a clinical-grade test before relying on it.
|
|
272
278
|
|
|
273
279
|
When three or more variants on chromosomes 1 to 22 are called homozygous for an allele ClinVar classifies as Pathogenic or Likely pathogenic, and are rare in gnomAD or were looked up there and are absent, the report warns at the top. A call gnomAD was not asked about (gnomAD not installed, or a GRCh37 allele the identity table cannot translate) does not count. This is counted before any display filter, so `--min-magnitude` cannot hide it (ADR-0050).
|
|
274
280
|
|
|
@@ -309,7 +315,7 @@ Allelix keeps its caches in `~/.local/share/allelix/`, or `$XDG_DATA_HOME/alleli
|
|
|
309
315
|
└── pharmgkb.sqlite ~6 MB
|
|
310
316
|
```
|
|
311
317
|
|
|
312
|
-
|
|
318
|
+
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.
|
|
313
319
|
|
|
314
320
|
**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):
|
|
315
321
|
|
|
@@ -355,7 +361,7 @@ pip uninstall allelix
|
|
|
355
361
|
|
|
356
362
|
## Data Sources & Licensing
|
|
357
363
|
|
|
358
|
-
Allelix source code is licensed under the **GNU Affero General Public License v3.0 or later** (AGPL-3.0-or-later). Allelix
|
|
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:
|
|
359
365
|
|
|
360
366
|
| Database | Source | License | Usage |
|
|
361
367
|
|---|---|---|---|
|
|
@@ -363,7 +369,7 @@ Allelix source code is licensed under the **GNU Affero General Public License v3
|
|
|
363
369
|
| GWAS Catalog | EBI/NHGRI | Public domain | No restrictions |
|
|
364
370
|
| ClinPGx (formerly PharmGKB) | clinpgx.org | CC BY-SA 4.0 | Attribution required |
|
|
365
371
|
| CPIC | cpicpgx.org | CC BY-SA 4.0 | Attribution required. Per-allele function data fetched from `api.cpicpgx.org` at `db update` time; used internally for the ClinPGx non-finding filter (ADR-0020), not surfaced as its own annotator. |
|
|
366
|
-
| SNPedia | snpedia.com | CC BY-NC-SA 3.0 US | Attribution required, **non-commercial only**.
|
|
372
|
+
| 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`. |
|
|
367
373
|
| 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. |
|
|
368
374
|
| 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. |
|
|
369
375
|
| 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. |
|
|
@@ -468,8 +474,8 @@ only complete, closed content. Failure before publication preserves previous
|
|
|
468
474
|
outputs. PLINK stages all three files first, then publishes each atomically;
|
|
469
475
|
a later publication failure can leave complete new files next to unchanged old
|
|
470
476
|
ones. Existing ordinary permission bits are retained when replacement is
|
|
471
|
-
permitted; new staging files start private, and a new output file
|
|
472
|
-
|
|
477
|
+
permitted; new staging files start private, and a new output file is `0600`
|
|
478
|
+
(since 2.7.0; `config.toml` still gets the mode your umask gives a new file).
|
|
473
479
|
Ownership, ACLs, extended attributes,
|
|
474
480
|
crash durability and concurrent path swaps are outside this guarantee.
|
|
475
481
|
|
|
@@ -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.
|
|
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.
|
|
20
20
|
|
|
21
21
|
## Quickstart
|
|
22
22
|
|
|
@@ -56,7 +56,8 @@ allelix analyze your_genotype_file.txt --filter-file my_panel.txt --output repor
|
|
|
56
56
|
# Annotated VCF output — VCF-in / VCF-out for pipeline integration
|
|
57
57
|
# Writes a valid VCF with annotations as INFO fields + full provenance in the header.
|
|
58
58
|
# Missing ##contig declarations are synthesized; raw CHROM names are preserved.
|
|
59
|
-
# Refuses to overwrite; requires VCF or gVCF input.
|
|
59
|
+
# Refuses to overwrite; requires VCF or gVCF input. Written uncompressed:
|
|
60
|
+
# a .gz or .bgz name is refused (compress afterwards with bgzip).
|
|
60
61
|
allelix analyze your_wgs.vcf.gz --vcf-out annotated.vcf
|
|
61
62
|
```
|
|
62
63
|
|
|
@@ -77,7 +78,7 @@ See [Development](#development) for source installs and running tests, [Managing
|
|
|
77
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). |
|
|
78
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)). |
|
|
79
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)). |
|
|
80
|
-
| 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 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. 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: 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
82
|
|
|
82
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.
|
|
83
84
|
|
|
@@ -107,14 +108,14 @@ Issues and milestones are tracked at [github.com/allelix/allelix/issues](https:/
|
|
|
107
108
|
| 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
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. |
|
|
109
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. |
|
|
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
|
|
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). |
|
|
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
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). |
|
|
113
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. |
|
|
114
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. |
|
|
115
116
|
| 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
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
|
+
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.
|
|
118
119
|
|
|
119
120
|
### CADD modes
|
|
120
121
|
|
|
@@ -170,9 +171,9 @@ This is not a disclaimer afterthought. It is a design constraint that affects mo
|
|
|
170
171
|
|
|
171
172
|
## Privacy
|
|
172
173
|
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
174
|
+
- Your genotype data never leaves your machine. No telemetry. No uploads. No analytics.
|
|
175
|
+
- Allelix goes online only to fetch reference databases, which are cached locally: when you run `allelix db update`, and in a freshness check before `analyze`, `methylation` or `pharmacogenomics`. The check asks the servers of ClinVar (NCBI), the GWAS Catalog (EBI) and ClinPGx (with CPIC's API) whether a switched-on cache older than seven days has changed, and downloads and installs the new data if it has. The pre-built caches are not checked. Each request carries only what any download carries (the address requested, an `allelix/<version>` user agent, and your IP address as the server sees it), never genotypes, file names or results.
|
|
176
|
+
- With `--no-update`, nothing is contacted: the analysis runs offline against the local caches.
|
|
176
177
|
|
|
177
178
|
### Output files contain real annotations of your genome
|
|
178
179
|
|
|
@@ -184,6 +185,11 @@ that's where they sit until you delete them. Allelix doesn't
|
|
|
184
185
|
auto-clean and won't warn you when you write to `/tmp/` or any
|
|
185
186
|
other shared location. Treat the files as personal data: read them,
|
|
186
187
|
move them somewhere you control, or delete when you're done.
|
|
188
|
+
Since 2.7.0 a new report file (`--output`, `--vcf-out`, and the `.bed`,
|
|
189
|
+
`.bim` and `.fam` of `export plink`) is created readable and writable by
|
|
190
|
+
you alone (`0600`), whatever your umask; a file that already exists keeps
|
|
191
|
+
its mode. Terminal output you redirect to a file is created by your shell,
|
|
192
|
+
with its umask.
|
|
187
193
|
`allelix db clean` (shipped in v2.2.0) handles the cache side of
|
|
188
194
|
the lifecycle; output reports are still the user's responsibility
|
|
189
195
|
to manage.
|
|
@@ -214,7 +220,7 @@ allelix config set plausibility.homozygous_max_af 0.0001
|
|
|
214
220
|
allelix config set plausibility.heterozygous_max_af 0
|
|
215
221
|
```
|
|
216
222
|
|
|
217
|
-
CLI flags (`--no-gnomad`, `--no-alphamissense`, `--no-cadd`, `--exclude-snpedia`) turn a source off for a single run. The config sets the baseline; flags override per-invocation. A source turned off is fully off: no finding comes from it, and no other source uses it either. For example, with ClinVar or gnomAD off, ClinPGx and SNPedia cannot use them to tell a normal allele. The report says what ran without it. `stats`, `extract` and `export plink` follow the config the same way.
|
|
223
|
+
CLI flags (`--no-gnomad`, `--no-alphamissense`, `--no-cadd`, `--exclude-snpedia`) turn a source off for a single run. The config sets the baseline; flags override per-invocation. `pharmacogenomics` refuses `--exclude-snpedia` and the GWAS Catalog and SNPedia floor options, since its report keeps ClinPGx findings only; switch SNPedia off there in the config. A source turned off is fully off: no finding comes from it, and no other source uses it either. For example, with ClinVar or gnomAD off, ClinPGx and SNPedia cannot use them to tell a normal allele. The report says what ran without it. `stats`, `extract` and `export plink` follow the config the same way.
|
|
218
224
|
|
|
219
225
|
### Plausibility flag
|
|
220
226
|
|
|
@@ -228,7 +234,7 @@ Genotyping arrays sometimes miscall very rare variants, most visibly as a homozy
|
|
|
228
234
|
|
|
229
235
|
⚠ 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
236
|
|
|
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.
|
|
237
|
+
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 that are read on their own 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). Consecutive single-base records of one REF naming different ALTs are read together instead ([docs/formats.md](https://github.com/allelix/allelix/blob/main/docs/formats.md#one-site-written-over-several-records)): when two or more passing calls include a haploid call, the site is withheld and counted as `split_site_calls`; a rejected sibling does not cancel a passing call. Confirm a flagged call with a clinical-grade test before relying on it.
|
|
232
238
|
|
|
233
239
|
When three or more variants on chromosomes 1 to 22 are called homozygous for an allele ClinVar classifies as Pathogenic or Likely pathogenic, and are rare in gnomAD or were looked up there and are absent, the report warns at the top. A call gnomAD was not asked about (gnomAD not installed, or a GRCh37 allele the identity table cannot translate) does not count. This is counted before any display filter, so `--min-magnitude` cannot hide it (ADR-0050).
|
|
234
240
|
|
|
@@ -269,7 +275,7 @@ Allelix keeps its caches in `~/.local/share/allelix/`, or `$XDG_DATA_HOME/alleli
|
|
|
269
275
|
└── pharmgkb.sqlite ~6 MB
|
|
270
276
|
```
|
|
271
277
|
|
|
272
|
-
|
|
278
|
+
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.
|
|
273
279
|
|
|
274
280
|
**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):
|
|
275
281
|
|
|
@@ -315,7 +321,7 @@ pip uninstall allelix
|
|
|
315
321
|
|
|
316
322
|
## Data Sources & Licensing
|
|
317
323
|
|
|
318
|
-
Allelix source code is licensed under the **GNU Affero General Public License v3.0 or later** (AGPL-3.0-or-later). Allelix
|
|
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:
|
|
319
325
|
|
|
320
326
|
| Database | Source | License | Usage |
|
|
321
327
|
|---|---|---|---|
|
|
@@ -323,7 +329,7 @@ Allelix source code is licensed under the **GNU Affero General Public License v3
|
|
|
323
329
|
| GWAS Catalog | EBI/NHGRI | Public domain | No restrictions |
|
|
324
330
|
| ClinPGx (formerly PharmGKB) | clinpgx.org | CC BY-SA 4.0 | Attribution required |
|
|
325
331
|
| CPIC | cpicpgx.org | CC BY-SA 4.0 | Attribution required. Per-allele function data fetched from `api.cpicpgx.org` at `db update` time; used internally for the ClinPGx non-finding filter (ADR-0020), not surfaced as its own annotator. |
|
|
326
|
-
| SNPedia | snpedia.com | CC BY-NC-SA 3.0 US | Attribution required, **non-commercial only**.
|
|
332
|
+
| 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`. |
|
|
327
333
|
| 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. |
|
|
328
334
|
| 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. |
|
|
329
335
|
| 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. |
|
|
@@ -428,8 +434,8 @@ only complete, closed content. Failure before publication preserves previous
|
|
|
428
434
|
outputs. PLINK stages all three files first, then publishes each atomically;
|
|
429
435
|
a later publication failure can leave complete new files next to unchanged old
|
|
430
436
|
ones. Existing ordinary permission bits are retained when replacement is
|
|
431
|
-
permitted; new staging files start private, and a new output file
|
|
432
|
-
|
|
437
|
+
permitted; new staging files start private, and a new output file is `0600`
|
|
438
|
+
(since 2.7.0; `config.toml` still gets the mode your umask gives a new file).
|
|
433
439
|
Ownership, ACLs, extended attributes,
|
|
434
440
|
crash durability and concurrent path swaps are outside this guarantee.
|
|
435
441
|
|
|
@@ -137,6 +137,7 @@ def get_annotators(
|
|
|
137
137
|
palindromic_provider=identity.palindromic_rsids,
|
|
138
138
|
normal_allele_provider=references.normal_allele_for,
|
|
139
139
|
reference_prefetch=references.prefetch,
|
|
140
|
+
forward_site_provider=identity.forward_sites,
|
|
140
141
|
)
|
|
141
142
|
gwas = GWASCatalogAnnotator(
|
|
142
143
|
data_dir,
|
|
@@ -72,15 +72,29 @@ def resolve_batch(
|
|
|
72
72
|
gnomad: GnomadAnnotator | None,
|
|
73
73
|
identity: RsidIdentityAnnotator | None = None,
|
|
74
74
|
resolved_coords: ResolvedCoords | None = None,
|
|
75
|
-
) ->
|
|
75
|
+
) -> int:
|
|
76
76
|
"""Populate ``ref`` and stamp ``rsid`` in place on one batch (see module docstring).
|
|
77
77
|
|
|
78
78
|
``variants`` must already carry their effective ``build``. Sources
|
|
79
79
|
that are None or not ready are skipped. Resolved coordinates are
|
|
80
80
|
added to ``resolved_coords`` when given.
|
|
81
|
+
|
|
82
|
+
A merged split pair's identity is decided per ALT (2.7.1, owner decision
|
|
83
|
+
D1 point 1): each record keeps the rsID it names, and a record naming
|
|
84
|
+
none has its ALT looked up alone. Two different rsIDs make it no pair:
|
|
85
|
+
it is replaced in ``variants`` by one half call per record, ``ALT/.``
|
|
86
|
+
under that ALT's rsID. Exactly one rsID names the full call. Returns how
|
|
87
|
+
many pairs were split, for the caller's split-site counts.
|
|
81
88
|
"""
|
|
82
89
|
if not variants:
|
|
83
|
-
return
|
|
90
|
+
return 0
|
|
91
|
+
split = _decide_pairs_per_allele(
|
|
92
|
+
variants,
|
|
93
|
+
clinvar=clinvar,
|
|
94
|
+
gnomad=gnomad,
|
|
95
|
+
identity=identity,
|
|
96
|
+
resolved_coords=resolved_coords,
|
|
97
|
+
)
|
|
84
98
|
_resolve_as_written(
|
|
85
99
|
variants,
|
|
86
100
|
clinvar=clinvar,
|
|
@@ -93,7 +107,7 @@ def resolve_batch(
|
|
|
93
107
|
# spelling and takes only the recovered rsID.
|
|
94
108
|
views = {i: view for i, v in enumerate(variants) if (view := _trimmed_view(v)) is not None}
|
|
95
109
|
if not views:
|
|
96
|
-
return
|
|
110
|
+
return split
|
|
97
111
|
_resolve_as_written(
|
|
98
112
|
list(views.values()),
|
|
99
113
|
clinvar=clinvar,
|
|
@@ -105,6 +119,75 @@ def resolve_batch(
|
|
|
105
119
|
if view.rsid != variants[i].rsid:
|
|
106
120
|
variants[i].original_rsid = variants[i].rsid
|
|
107
121
|
variants[i].rsid = view.rsid
|
|
122
|
+
return split
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def _decide_pairs_per_allele(
|
|
126
|
+
variants: list[Variant],
|
|
127
|
+
*,
|
|
128
|
+
clinvar: ClinVarAnnotator | None,
|
|
129
|
+
gnomad: GnomadAnnotator | None,
|
|
130
|
+
identity: RsidIdentityAnnotator | None,
|
|
131
|
+
resolved_coords: ResolvedCoords | None,
|
|
132
|
+
) -> int:
|
|
133
|
+
"""Decide, in place, each merged split pair's identity from its ALTs one by one.
|
|
134
|
+
|
|
135
|
+
Each record's ALT is a half call under the rsID that record names; one
|
|
136
|
+
naming none is looked up alone, by the usual routes. Two different
|
|
137
|
+
rsIDs: the pair is replaced by those two half calls (each with its own
|
|
138
|
+
record). Exactly one: the full call takes it, as when a record names
|
|
139
|
+
it. None: the pair is left for the ordinary resolution, unchanged.
|
|
140
|
+
Only accepted exact pairs (``allele_records``) are decided; a site whose
|
|
141
|
+
records only agree or contradict is never a pair. Returns the number of
|
|
142
|
+
pairs split.
|
|
143
|
+
"""
|
|
144
|
+
pairs = [
|
|
145
|
+
i
|
|
146
|
+
for i, v in enumerate(variants)
|
|
147
|
+
if v.allele_records is not None and len(v.allele_records) == 2 and v.allele_ids is not None
|
|
148
|
+
]
|
|
149
|
+
if not pairs:
|
|
150
|
+
return 0
|
|
151
|
+
halves = {
|
|
152
|
+
i: [
|
|
153
|
+
replace(
|
|
154
|
+
variants[i],
|
|
155
|
+
rsid=written,
|
|
156
|
+
allele1=allele,
|
|
157
|
+
allele2=NO_CALL_MARKER,
|
|
158
|
+
input_alt=allele,
|
|
159
|
+
record_index=record,
|
|
160
|
+
allele_records=None,
|
|
161
|
+
allele_ids=None,
|
|
162
|
+
)
|
|
163
|
+
for (allele, record), written in zip(
|
|
164
|
+
variants[i].allele_records or (), variants[i].allele_ids or (), strict=True
|
|
165
|
+
)
|
|
166
|
+
]
|
|
167
|
+
for i in pairs
|
|
168
|
+
}
|
|
169
|
+
unnamed = [h for pair in halves.values() for h in pair if not h.rsid.startswith("rs")]
|
|
170
|
+
if unnamed:
|
|
171
|
+
_resolve_as_written(
|
|
172
|
+
unnamed,
|
|
173
|
+
clinvar=clinvar,
|
|
174
|
+
gnomad=gnomad,
|
|
175
|
+
identity=identity,
|
|
176
|
+
resolved_coords=resolved_coords,
|
|
177
|
+
)
|
|
178
|
+
split = 0
|
|
179
|
+
for i in sorted(halves, reverse=True):
|
|
180
|
+
names = {h.rsid for h in halves[i] if h.rsid.startswith("rs")}
|
|
181
|
+
if len(names) == 2:
|
|
182
|
+
variants[i : i + 1] = halves[i]
|
|
183
|
+
split += 1
|
|
184
|
+
elif len(names) == 1:
|
|
185
|
+
pair = variants[i]
|
|
186
|
+
(name,) = names
|
|
187
|
+
if pair.rsid != name:
|
|
188
|
+
pair.original_rsid = pair.rsid
|
|
189
|
+
pair.rsid = name
|
|
190
|
+
return split
|
|
108
191
|
|
|
109
192
|
|
|
110
193
|
def _resolve_as_written(
|