allelign 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- allelign-0.1.0/.github/workflows/ci.yml +47 -0
- allelign-0.1.0/.github/workflows/pypi.yml +36 -0
- allelign-0.1.0/AGENTS.md +11 -0
- allelign-0.1.0/CHANGELOG.md +183 -0
- allelign-0.1.0/CITATION.cff +9 -0
- allelign-0.1.0/LICENSE +21 -0
- allelign-0.1.0/MANIFEST.in +10 -0
- allelign-0.1.0/PKG-INFO +175 -0
- allelign-0.1.0/README.md +142 -0
- allelign-0.1.0/allelign/__init__.py +69 -0
- allelign-0.1.0/allelign/__main__.py +5 -0
- allelign-0.1.0/allelign/_common.py +95 -0
- allelign-0.1.0/allelign/_numba.py +22 -0
- allelign-0.1.0/allelign/align.py +1252 -0
- allelign-0.1.0/allelign/alleles.py +90 -0
- allelign-0.1.0/allelign/build.py +57 -0
- allelign-0.1.0/allelign/catalog.py +88 -0
- allelign-0.1.0/allelign/cli.py +323 -0
- allelign-0.1.0/allelign/download.py +525 -0
- allelign-0.1.0/allelign/genotypes.py +241 -0
- allelign-0.1.0/allelign/ldcheck.py +771 -0
- allelign-0.1.0/allelign/qc.py +638 -0
- allelign-0.1.0/allelign/status.py +130 -0
- allelign-0.1.0/allelign/sumstats.py +1207 -0
- allelign-0.1.0/allelign/variants.py +155 -0
- allelign-0.1.0/allelign/warning_markers.py +15 -0
- allelign-0.1.0/allelign/weights.py +614 -0
- allelign-0.1.0/allelign.egg-info/PKG-INFO +175 -0
- allelign-0.1.0/allelign.egg-info/SOURCES.txt +46 -0
- allelign-0.1.0/allelign.egg-info/dependency_links.txt +1 -0
- allelign-0.1.0/allelign.egg-info/entry_points.txt +2 -0
- allelign-0.1.0/allelign.egg-info/requires.txt +12 -0
- allelign-0.1.0/allelign.egg-info/top_level.txt +1 -0
- allelign-0.1.0/docs/guide.md +202 -0
- allelign-0.1.0/docs/walkthrough.ipynb +262 -0
- allelign-0.1.0/docs/walkthrough.md +179 -0
- allelign-0.1.0/pyproject.toml +59 -0
- allelign-0.1.0/setup.cfg +4 -0
- allelign-0.1.0/tests/test_chrx.py +79 -0
- allelign-0.1.0/tests/test_download.py +360 -0
- allelign-0.1.0/tests/test_formats.py +414 -0
- allelign-0.1.0/tests/test_genotypes.py +199 -0
- allelign-0.1.0/tests/test_ldcheck_qc.py +864 -0
- allelign-0.1.0/tests/test_parity_ldpred3.py +337 -0
- allelign-0.1.0/tests/test_scoring_file.py +194 -0
- allelign-0.1.0/tests/test_shared_consumers.py +188 -0
- allelign-0.1.0/tests/test_sumstats_harmonize.py +1309 -0
- allelign-0.1.0/tests/test_weights_cli.py +463 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, "claude/**"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
OPENBLAS_NUM_THREADS: "1"
|
|
11
|
+
OMP_NUM_THREADS: "1"
|
|
12
|
+
MKL_NUM_THREADS: "1"
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
lint:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
- run: pip install -e ".[lint]"
|
|
23
|
+
- run: ruff check .
|
|
24
|
+
|
|
25
|
+
test:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
strategy:
|
|
28
|
+
fail-fast: false
|
|
29
|
+
matrix:
|
|
30
|
+
include:
|
|
31
|
+
# The floor ldpred3's own CI tests: py3.9 with numpy 1.20, no Numba.
|
|
32
|
+
- python-version: "3.9"
|
|
33
|
+
extras: "test"
|
|
34
|
+
pins: "numpy==1.20.3"
|
|
35
|
+
- python-version: "3.12"
|
|
36
|
+
extras: "test,fast"
|
|
37
|
+
pins: ""
|
|
38
|
+
name: py${{ matrix.python-version }} · ${{ matrix.extras }}
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v4
|
|
41
|
+
- uses: actions/setup-python@v5
|
|
42
|
+
with:
|
|
43
|
+
python-version: ${{ matrix.python-version }}
|
|
44
|
+
- run: pip install -e ".[${{ matrix.extras }}]" ${{ matrix.pins }}
|
|
45
|
+
# The parity tests skip themselves without ldpred3, which is private;
|
|
46
|
+
# they run locally against the sibling checkout.
|
|
47
|
+
- run: pytest -q
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Trusted publishing: create the "allelign" project on PyPI once and register
|
|
4
|
+
# this workflow as a trusted publisher there (repository bvilhjal/allelign,
|
|
5
|
+
# environment "pypi", workflow file .github/workflows/pypi.yml). Until then
|
|
6
|
+
# this workflow only runs when a GitHub release is published.
|
|
7
|
+
on:
|
|
8
|
+
release:
|
|
9
|
+
types: [published]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.12"
|
|
19
|
+
- run: pip install build
|
|
20
|
+
- run: python -m build
|
|
21
|
+
- uses: actions/upload-artifact@v4
|
|
22
|
+
with:
|
|
23
|
+
name: dist
|
|
24
|
+
path: dist/
|
|
25
|
+
publish:
|
|
26
|
+
needs: build
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
environment: pypi
|
|
29
|
+
permissions:
|
|
30
|
+
id-token: write
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/download-artifact@v4
|
|
33
|
+
with:
|
|
34
|
+
name: dist
|
|
35
|
+
path: dist/
|
|
36
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
allelign-0.1.0/AGENTS.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Agent notes
|
|
2
|
+
|
|
3
|
+
- Environment: editable install in the `ldpred3-accelerate` conda env (`~/anaconda3/envs/ldpred3-accelerate/bin/python`, 3.14), with Numba and SciPy.
|
|
4
|
+
- Run Python with `-P` when the working directory is `REPOS/`. Otherwise the `allelign/` repo directory shadows the installed package as a namespace package, and `import allelign` finds no `__version__`.
|
|
5
|
+
- Tests: `pytest -q`, with `OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 MKL_NUM_THREADS=1` for deterministic numerics. Markers:
|
|
6
|
+
- `parity`: compares against ldpred3; skipped without it;
|
|
7
|
+
- `numba`: needs the JIT.
|
|
8
|
+
- `NUMBA_DISABLE_JIT=1 pytest -m "not parity"` checks the pure-Python fallback.
|
|
9
|
+
- The parity tests are the contract for moving ldpred3 and its siblings onto allelign. A change that breaks them needs a deliberate decision, recorded in docs/guide.md section 5.
|
|
10
|
+
- Lint is `ruff check .`, pyflakes rules only. Do not add style rules or reformat long lines.
|
|
11
|
+
- Status codes, warning-marker strings and the AF safety-valve wording are read by other repos (SMARTpred). Change them only together with their consumers.
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes are recorded here, in [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) style.
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Package authorship metadata (`pyproject.toml`, `CITATION.cff`) records the
|
|
10
|
+
bvilhjal account rather than a personal name; the LICENSE keeps the
|
|
11
|
+
copyright name.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `allelign download` (and `parse_ref`, `resolve_ref`, `download_ref`,
|
|
16
|
+
`read_keep_ids`): resolve and fetch published summary statistics and PGS
|
|
17
|
+
scores — GWAS Catalog harmonised accessions, PGS Catalog scores
|
|
18
|
+
(harmonised preferred), FinnGen endpoints, COVID-19 HGI analyses, GBMI
|
|
19
|
+
ancestry strata and eQTL Catalogue molecular traits (row-filtered at
|
|
20
|
+
download). Downloads are streamed and atomic with a `<out>.meta.json`
|
|
21
|
+
provenance sidecar; `--keep-ids` restricts a download to a reference's
|
|
22
|
+
variants; `--dry-run` prints the resolved plan. `all_meta_af` (GBMI,
|
|
23
|
+
COVID-HGI) joins the frequency aliases. The suite stays offline through
|
|
24
|
+
an injectable opener; endpoints were verified against the live services.
|
|
25
|
+
- An AI-assistance disclaimer in the README and the guide: parts of the code
|
|
26
|
+
and documentation were generated with AI tools and reviewed by the
|
|
27
|
+
maintainer.
|
|
28
|
+
- A hands-on walkthrough (docs/walkthrough.md: download → inspect → clean →
|
|
29
|
+
align → scores, with the records each step writes) and the same flow as an
|
|
30
|
+
executable notebook (docs/walkthrough.ipynb), both linked from the README
|
|
31
|
+
and shipped in sdists.
|
|
32
|
+
- References: README and docs/guide.md cite the methods implemented — DENTIST
|
|
33
|
+
(the LD-consistency screen), the SD/AF checks and per-variant N imputation,
|
|
34
|
+
the PGS Catalog scoring format, the GWAS Catalog `hm_` layout, and the
|
|
35
|
+
height-GWAS screen example.
|
|
36
|
+
## [0.1.0] - 2026-10-29
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- First public release, consolidating 0.1.0.dev1 through 0.1.0.dev8
|
|
41
|
+
(recorded below).
|
|
42
|
+
- Public-release packaging: a PyPI publish workflow on GitHub releases
|
|
43
|
+
(PyPI trusted publishing), README install-from-GitHub instructions and CI
|
|
44
|
+
badge, trove classifiers and project URLs in `pyproject.toml`, and a
|
|
45
|
+
`MANIFEST.in` so sdists carry the changelog, citation file and guide.
|
|
46
|
+
|
|
47
|
+
## [0.1.0.dev8] - 2026-10-28
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- Parse only additive `TEST` rows (`ADD`, `ADD-CONDTL`), with matching Python
|
|
52
|
+
and compiled paths, a warning and parse counts for discarded tests.
|
|
53
|
+
- Keep streamed Catalog alleles, effects and OR/z-score fallbacks in one
|
|
54
|
+
orientation, including provider overrides; reject incomplete sets.
|
|
55
|
+
- Permit the documented CLI cross-build identifier reanchoring while retaining
|
|
56
|
+
declared, reference and output builds in its log.
|
|
57
|
+
- Determine PGS coordinate build independently of the rsID column; mixed
|
|
58
|
+
coordinates and undeclared harmonised builds remain unknown.
|
|
59
|
+
- Give exactly constant fractional dosage columns zero off-diagonal LD,
|
|
60
|
+
including missing calls, without removing small real variation.
|
|
61
|
+
- `stats_out` on `ld_consistency_screen` records one trait. Several z
|
|
62
|
+
columns raise and point at `return_stats`, instead of leaving the last
|
|
63
|
+
column's counts in the caller's dict.
|
|
64
|
+
- `af_concordance_mask` checks `status` even when the safety valve drops
|
|
65
|
+
nothing.
|
|
66
|
+
- `impute_n_eff` rejects an `anchor_quantile` outside [0, 1] and a
|
|
67
|
+
non-integer `anchor_bins` with the usual control errors.
|
|
68
|
+
- `read_pvar` builds its column map once per header, not once per data row.
|
|
69
|
+
- An infinite position in an unmatched row is treated as missing by the
|
|
70
|
+
coverage diagnosis, as the coordinate matcher already does.
|
|
71
|
+
- `read_scoring_file` counts unparsable positions
|
|
72
|
+
(`n_unparsable_position`). They still become position 0.
|
|
73
|
+
- `write_weights` writes floats with `repr`, so `read_weights` gets the
|
|
74
|
+
same bits back. Files written at 8 significant digits still parse.
|
|
75
|
+
- `write_pgs_scoring_file` no longer stamps `#variants_genome_wide` equal
|
|
76
|
+
to the row count. `#variants_number` is that count; the genome-wide
|
|
77
|
+
field would claim a chromosome subset or a hits list is the full score.
|
|
78
|
+
- `read_sumstats` documents that comma-separated files are not CSV-quoted.
|
|
79
|
+
|
|
80
|
+
## [0.1.0.dev7] - 2026-10-17
|
|
81
|
+
|
|
82
|
+
### Fixed
|
|
83
|
+
|
|
84
|
+
- Header-only inspection reports missing sample size and accepts the reader's
|
|
85
|
+
scalar N and case/control arguments, including validation and precedence.
|
|
86
|
+
`allelign inspect` accepts `--n-eff`, `--n-cases` and `--n-controls`.
|
|
87
|
+
- The header and reference row parser strip CRLF line endings when called
|
|
88
|
+
directly, matching the normalised line endings of file reads.
|
|
89
|
+
- BED size errors report the full `.fam` sample count, even with a selection.
|
|
90
|
+
- CLI JSON logs are published atomically; failed writes preserve existing logs.
|
|
91
|
+
- The citation version matches the package version.
|
|
92
|
+
|
|
93
|
+
## [0.1.0.dev6] - 2026-10-16
|
|
94
|
+
|
|
95
|
+
### Added
|
|
96
|
+
|
|
97
|
+
- Header-only `resolve_gwas_catalog_columns` for streamed Catalog normalisers,
|
|
98
|
+
including provider overrides, OR/z-score fallback columns and the rule
|
|
99
|
+
against pairing submitted frequencies with harmonised alleles.
|
|
100
|
+
- Public `SCORING_COLUMNS` for PGS download validators. The old private name
|
|
101
|
+
remains an alias for early consumers.
|
|
102
|
+
- Per-variant `reported_n` and an explicit `strict=True` policy in
|
|
103
|
+
`implied_sample_size`, preserving bipred's input checks, arithmetic and
|
|
104
|
+
median over all implied estimates. The default still uses positive finite
|
|
105
|
+
estimates; both compare against the median reported N.
|
|
106
|
+
- Legacy benchmark aliases (`SNPname`, `logOR`, `hm_standard_error`,
|
|
107
|
+
`samplesize`, `n_sample`, `total_sample_size`) in the shared GWAS vocabulary.
|
|
108
|
+
|
|
109
|
+
### Fixed
|
|
110
|
+
|
|
111
|
+
- Long-range LD masks preserve scalar and multidimensional input shapes while
|
|
112
|
+
normalising chromosome labels. Region endpoints remain inclusive.
|
|
113
|
+
- `implied_sample_size` rejects nonboolean `binary` controls and mismatched
|
|
114
|
+
`reported_n` vectors instead of relying on array truth values.
|
|
115
|
+
|
|
116
|
+
## [0.1.0.dev5] - 2026-10-13
|
|
117
|
+
|
|
118
|
+
### Fixed
|
|
119
|
+
|
|
120
|
+
- Explicit case/control column mappings take precedence over auto-detected N,
|
|
121
|
+
including effective-N columns. Both counts must resolve; a scalar N or an
|
|
122
|
+
explicit `n_eff` mapping still wins. Reading and header-only inspection agree.
|
|
123
|
+
|
|
124
|
+
## [0.1.0.dev4] - 2026-10-12
|
|
125
|
+
|
|
126
|
+
### Fixed
|
|
127
|
+
|
|
128
|
+
- `read_sumstats`, `detect_columns` and `inspect_columns` take N from an effective-N
|
|
129
|
+
column (`Effective_N`, `N_effective`, `all_inv_var_meta_effective`) beside a total-N
|
|
130
|
+
column such as `N`, as documented. They used to read the total, ~2.8x too high at 10% cases.
|
|
131
|
+
|
|
132
|
+
## [0.1.0.dev3] - 2026-10-12
|
|
133
|
+
|
|
134
|
+
### Changed
|
|
135
|
+
|
|
136
|
+
- Gzip weight and status tables use compression level 1 to reduce writing
|
|
137
|
+
time. Decompressed text and atomic publication remain unchanged.
|
|
138
|
+
|
|
139
|
+
## [0.1.0.dev2] - 2026-10-10
|
|
140
|
+
|
|
141
|
+
### Added (0.1.0.dev2)
|
|
142
|
+
|
|
143
|
+
- `read_scoring_file(keep=...)` prefilters rows a reference cannot match, as multipgs's private `_reference_filter` did. `harmonize_weights` takes the weight mass over the whole file and counts the skipped rows as unmatched. `ScoringFile` gains `trait` and `__str__`, and `scoring_file_id` is public: multipgs now reads PGS Catalog files through allelign.
|
|
144
|
+
- Public `variant_indices`, the identifier index `harmonize` caches per table, for callers that look up identifiers against a reference.
|
|
145
|
+
|
|
146
|
+
### Fixed (0.1.0.dev2)
|
|
147
|
+
|
|
148
|
+
- A GWAS Catalog file read through its `hm_` columns without `hm_effect_allele_frequency` no longer pairs the submitted frequency with the harmonised alleles. The frequency is dropped and `parse_log["layout"]["eaf_dropped"]` says why.
|
|
149
|
+
|
|
150
|
+
### Added (0.1.0.dev1)
|
|
151
|
+
|
|
152
|
+
- First version, extracted from ldpred3 0.9.x with pieces of multipgs and bipred:
|
|
153
|
+
- summary-statistics reader with the alias table, OR-to-beta, SE from p, and the optional Numba block parser;
|
|
154
|
+
- harmoniser with both the vectorised join and the row loop, coverage and match diagnostics, and identifier re-anchoring;
|
|
155
|
+
- file-level and reference QC (SD consistency, allele-frequency concordance with its safety valve, imputed N, genomic-control undo, implied N);
|
|
156
|
+
- the split-half LD-consistency screen with full-window confirmation;
|
|
157
|
+
- ldpred3 weight tables, PGS Catalog reading (from multipgs) and writing;
|
|
158
|
+
- the per-variant status vocabulary;
|
|
159
|
+
- the GRCh37 long-range LD regions (from bipred).
|
|
160
|
+
- Beyond ldpred3:
|
|
161
|
+
- effective N from per-variant case and control counts;
|
|
162
|
+
- PLINK2 `A1` resolved against `REF`/`ALT` (or `OMITTED`) row by row;
|
|
163
|
+
- REGENIE `GENPOS` as position;
|
|
164
|
+
- SE from `-log10 p` (`LOG10P`, `mlogp`);
|
|
165
|
+
- GWAS Catalog `hm_` columns used as one consistent set;
|
|
166
|
+
- PGC `FRQ_U_*` as the effect-allele frequency;
|
|
167
|
+
- Neale `chr:pos:ref:alt` variant strings.
|
|
168
|
+
- `.bim`/`.pvar` readers, `harmonize_weights` (aligns frequencies and reports matched weight mass), `genomic_inflation`, LD blocks from reference genotypes, and a CLI (`inspect`, `clean`, `align`, `pgs-export`).
|
|
169
|
+
- `Bed`, a NumPy-only PLINK 1 `.bed` reader. It reads selected variants with coalesced seeks and can restrict to some samples (IIDs, indices or a mask).
|
|
170
|
+
- `ld_consistency_screen_genotypes` screens with LD formed block by block from a `.bed`, so a genome-wide reference never holds more than one block of LD. It is also available as `allelign align --ld-screen [--ld-keep FILE]`.
|
|
171
|
+
- Hooks ldpred3 uses to consume the screen: `ld_consistency_screen_selected` (screen a sparse selection without materialising it), `ncores` block pooling, `stats_out`, and a private eigensolver hook.
|
|
172
|
+
- CI (lint; py3.9 with numpy 1.20 and no Numba; py3.12 with Numba).
|
|
173
|
+
|
|
174
|
+
### Consumers
|
|
175
|
+
|
|
176
|
+
- ldpred3 0.9.9 imports allelign for reading, harmonisation, QC, weights and the split-half screen.
|
|
177
|
+
- ppb 0.0.1.dev10 takes its chromosome, reverse-complement and strand-ambiguity rules from `allelign.alleles`.
|
|
178
|
+
- bipred, gwfm, multipgs and SMARTpred (from 0.1.0.dev2) import reading, alignment, QC and weight-file I/O directly; multipgs's PGS Catalog reader is allelign's.
|
|
179
|
+
|
|
180
|
+
### Fixed (relative to the ldpred3 originals)
|
|
181
|
+
|
|
182
|
+
- The PGS Catalog export no longer claims `#sd_source=empirical` for a weights table that records no SD source; it writes `unspecified` and warns.
|
|
183
|
+
- The long-range LD mask normalises chromosome labels, so `chr6` matches.
|
allelign-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Bjarni Vilhjálmsson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
include CHANGELOG.md
|
|
2
|
+
include CITATION.cff
|
|
3
|
+
include LICENSE
|
|
4
|
+
include README.md
|
|
5
|
+
include AGENTS.md
|
|
6
|
+
include .github/workflows/ci.yml
|
|
7
|
+
include .github/workflows/pypi.yml
|
|
8
|
+
recursive-include docs *.md *.ipynb
|
|
9
|
+
recursive-include tests *.py
|
|
10
|
+
global-exclude *.py[cod]
|
allelign-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: allelign
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Read, align and quality-control GWAS summary statistics and PGS weights
|
|
5
|
+
Author: bvilhjal
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/bvilhjal/allelign
|
|
8
|
+
Project-URL: Repository, https://github.com/bvilhjal/allelign
|
|
9
|
+
Project-URL: Issues, https://github.com/bvilhjal/allelign/issues
|
|
10
|
+
Project-URL: Documentation, https://github.com/bvilhjal/allelign/blob/main/docs/guide.md
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Classifier: Intended Audience :: Science/Research
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
20
|
+
Requires-Python: >=3.9
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: numpy>=1.20
|
|
24
|
+
Provides-Extra: fast
|
|
25
|
+
Requires-Dist: numba>=0.59; extra == "fast"
|
|
26
|
+
Requires-Dist: scipy>=1.7; extra == "fast"
|
|
27
|
+
Provides-Extra: test
|
|
28
|
+
Requires-Dist: pytest>=7; extra == "test"
|
|
29
|
+
Requires-Dist: scipy>=1.7; extra == "test"
|
|
30
|
+
Provides-Extra: lint
|
|
31
|
+
Requires-Dist: ruff>=0.5; extra == "lint"
|
|
32
|
+
Dynamic: license-file
|
|
33
|
+
|
|
34
|
+
# allelign
|
|
35
|
+
|
|
36
|
+
[](https://github.com/bvilhjal/allelign/actions/workflows/ci.yml)
|
|
37
|
+
|
|
38
|
+
Read, align and quality-control GWAS summary statistics and PGS effect sizes.
|
|
39
|
+
|
|
40
|
+
Every method in this family starts the same way: parse a summary-statistics file in one of many dialects, get the effect alleles right against a reference, and catch bad input before it turns into a confident wrong number. allelign does those steps once, for all of them. It is extracted from ldpred3, plus the PGS Catalog reader from multipgs and the long-range LD table from bipred. On the inputs ldpred3 already handles it reproduces ldpred3 bit for bit; `tests/test_parity_ldpred3.py` checks that.
|
|
41
|
+
|
|
42
|
+
NumPy is the only dependency. Numba speeds up the parser about threefold, and SciPy provides float32 eigensolves for the LD screen; both are optional (`[fast]`).
|
|
43
|
+
|
|
44
|
+
## Install
|
|
45
|
+
|
|
46
|
+
From GitHub:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install "allelign[fast] @ git+https://github.com/bvilhjal/allelign.git"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
From a sibling checkout, as with the rest of the family:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install -e "../allelign[fast]"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Quick start
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
import allelign as al
|
|
62
|
+
|
|
63
|
+
ss = al.read_sumstats("gwas.tsv.gz") # any common dialect
|
|
64
|
+
keep, qc_log = al.qc_sumstats(ss) # validity, duplicates, N, MAF, INFO
|
|
65
|
+
ref = al.read_bim("reference.bim").freeze() # or read_pvar, or al.Variants(...)
|
|
66
|
+
h = al.harmonize(ss.subset(keep), ref) # beta now counts ref.a1
|
|
67
|
+
print(al.coverage_message(al.reference_coverage(ss.subset(keep), ref, h)) or "coverage ok")
|
|
68
|
+
|
|
69
|
+
# Checks against the reference panel (af_ref: frequency of ref.a1).
|
|
70
|
+
sd_keep, sd_log, _ = al.sd_consistency_mask(h.beta, h.se, h.n_eff, af_ref[h.var_index])
|
|
71
|
+
|
|
72
|
+
# LD consistency: z-scores their LD neighbours contradict. LD comes from the
|
|
73
|
+
# reference's genotypes, one block at a time; or pass your own [(R, idx), ...]
|
|
74
|
+
# blocks to al.ld_consistency_screen.
|
|
75
|
+
bed = al.Bed("reference.bed", variants=ref, samples=eur_iids)
|
|
76
|
+
ld_keep = al.ld_consistency_screen_genotypes(bed, h.var_index, h.beta / h.se)
|
|
77
|
+
|
|
78
|
+
# PGS effect sizes
|
|
79
|
+
score = al.read_scoring_file("PGS000001_hmPOS_GRCh37.txt.gz")
|
|
80
|
+
w = al.harmonize_weights(score, ref) # also aligns AF, reports matched weight mass
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Every filter can stamp a per-row status array (`al.new_status(len(ss))`, passed as `status=`), so you can see which stage dropped each variant and write the table with `al.write_status_table`.
|
|
84
|
+
|
|
85
|
+
## Command line
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
allelign inspect gwas.tsv.gz
|
|
89
|
+
allelign clean gwas.tsv.gz -o clean.tsv.gz --status-out status.tsv
|
|
90
|
+
allelign align gwas.tsv.gz --reference ref.bim -o aligned.tsv.gz --sumstats-build GRCh38 --reference-build GRCh37 --reanchor-on-identifier
|
|
91
|
+
allelign align gwas.tsv.gz --reference ref.bim -o aligned.tsv.gz --ld-screen --ld-keep eur_samples.txt --status-out status.tsv
|
|
92
|
+
allelign pgs-export prs.weights.tsv -o PGS_my.txt --genome-build GRCh37
|
|
93
|
+
allelign download GCST91000728 -o gwas.h.tsv.gz # GWAS Catalog
|
|
94
|
+
allelign download FINNGEN:R11:I9_AF -o finngen.tsv.gz # FinnGen, and the providers below
|
|
95
|
+
allelign download EQTL:QTS000001:QTD000001:ENSG00000008128 -o eqtl.tsv.gz
|
|
96
|
+
allelign download GCST91000728 -o gwas.h.tsv.gz --keep-ids ref.bim
|
|
97
|
+
allelign download PGS000337 -o score.txt.gz --build GRCh38 --dry-run
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Each command writes `<out>.log.json` with the parse, QC, harmonisation and coverage records; `download` writes a `<out>.meta.json` provenance sidecar (URL, provider, trait, SHA-256, filter counts) instead.
|
|
101
|
+
|
|
102
|
+
## What it covers
|
|
103
|
+
|
|
104
|
+
- **Reading.** ldpred3's alias table and dialect rules (SAIGE, BOLT, METAL, GWAS-SSF, PGC), OR to log-OR, SE recovered from p without underflow. allelign adds:
|
|
105
|
+
- PLINK2 `A1` against `REF`/`ALT` or `OMITTED`;
|
|
106
|
+
- REGENIE `GENPOS` and `LOG10P`;
|
|
107
|
+
- GWAS Catalog `hm_` columns as one consistent set;
|
|
108
|
+
- PGC `FRQ_U_*`;
|
|
109
|
+
- Neale `chr:pos:ref:alt`;
|
|
110
|
+
- FinnGen;
|
|
111
|
+
- effective N from case and control counts.
|
|
112
|
+
- **Downloading.** `allelign download` resolves a published study by reference — GWAS Catalog (`GCST…`), PGS Catalog (`PGS…`), FinnGen, COVID-HGI, GBMI, eQTL Catalogue — checks the URL, streams it locally with a provenance sidecar, and can keep only the rows a reference can match.
|
|
113
|
+
- **Alignment.** ldpred3's harmoniser:
|
|
114
|
+
- identifier matching with coordinate checks, so a build mix-up is unmatched rather than silently accepted;
|
|
115
|
+
- strand flips;
|
|
116
|
+
- ambiguous pairs dropped;
|
|
117
|
+
- multi-allelic sites;
|
|
118
|
+
- coverage diagnosis that names a build mismatch;
|
|
119
|
+
- identifier re-anchoring;
|
|
120
|
+
- a declared-build check.
|
|
121
|
+
- **QC.**
|
|
122
|
+
- File-level filters.
|
|
123
|
+
- SD consistency against reference frequencies.
|
|
124
|
+
- Allele-frequency concordance, with a safety valve for ancestry mismatch.
|
|
125
|
+
- Imputed per-variant N, the genomic-control undo, implied N, λGC and long-range LD regions.
|
|
126
|
+
- The split-half LD-consistency screen (DENTIST-style) with full-window confirmation, on dense, int8, low-rank or lazily provided LD, or on LD formed block by block from a PLINK `.bed` reference.
|
|
127
|
+
- **Effect sizes.** ldpred3 weight tables, PGS Catalog reading and writing, and alignment of either to a reference.
|
|
128
|
+
|
|
129
|
+
[docs/guide.md](docs/guide.md) has the rules, defaults and the deliberate differences from ldpred3. A hands-on pass over download → inspect → clean → align is [docs/walkthrough.md](docs/walkthrough.md), with the same flow as a notebook in [docs/walkthrough.ipynb](docs/walkthrough.ipynb).
|
|
130
|
+
|
|
131
|
+
## Consumers
|
|
132
|
+
|
|
133
|
+
- **ldpred3** reads, aligns, QCs and writes weights through allelign. Its modules re-export allelign under their old names, so sibling imports keep working. It keeps the pipeline-specific parts: whole-block DENTIST with low-rank Woodbury updates, the BLAS gate for a pooled screen, its float32 eigensolver (passed to the screen), and the qc_log report blocks. allelign's parity tests are the contract.
|
|
134
|
+
- **ppb** takes chromosome labels, reverse complements and strand ambiguity from `allelign.alleles` and keeps its own position-only join.
|
|
135
|
+
- **bipred** takes the region table, long-range mask, strict implied-N diagnostic and weight-file I/O from allelign. Its wrapper includes APOE by default; its LDpred2-style SD diagnostic stays in bipred. Trait preparation still goes through ldpred3.
|
|
136
|
+
- **gwfm, multipgs and SMARTpred** use allelign for reading, alignment, QC and weight-file I/O. multipgs aligns both scoring files and fitted weights with `harmonize_weights`. SMARTpred and the LDpred3 harvester share the header-only `resolve_gwas_catalog_columns` rules while retaining streamed filtering. LD caches, prepared traits, the fit and pipeline reports stay in ldpred3.
|
|
137
|
+
|
|
138
|
+
## References
|
|
139
|
+
|
|
140
|
+
The methods allelign implements:
|
|
141
|
+
|
|
142
|
+
- Chen W, Wu Y, Zheng Z, et al. [Improved analyses of GWAS summary
|
|
143
|
+
statistics by reducing data heterogeneity and
|
|
144
|
+
errors](https://doi.org/10.1038/s41467-021-27438-7). *Nature
|
|
145
|
+
Communications* (2021). The DENTIST statistic behind the LD-consistency
|
|
146
|
+
screen.
|
|
147
|
+
- Privé F, Arbel J, Aschard H, et al. [Identifying and correcting for
|
|
148
|
+
misspecifications in GWAS summary statistics and polygenic
|
|
149
|
+
scores](https://doi.org/10.1016/j.xhgg.2022.100136). *HGG Advances*
|
|
150
|
+
(2022). The SD-consistency and frequency checks, and the per-variant N
|
|
151
|
+
imputation.
|
|
152
|
+
- Lambert SA, Gil L, Jupp S, et al. [The Polygenic Score Catalog as an open
|
|
153
|
+
database for reproducibility and systematic
|
|
154
|
+
evaluation](https://doi.org/10.1038/s41588-021-00783-5). *Nature
|
|
155
|
+
Genetics* (2021). The scoring-file format `read_scoring_file` parses.
|
|
156
|
+
- Sollis E, Mosaku A, Abid A, et al. [The NHGRI-EBI GWAS Catalog:
|
|
157
|
+
knowledgebase and deposition
|
|
158
|
+
resource](https://doi.org/10.1093/nar/gkac1010). *Nucleic Acids Research*
|
|
159
|
+
(2023). The harmonised `hm_` deposit layout.
|
|
160
|
+
- Yengo L, Vedantam S, Marouli E, et al. [A saturated map of common genetic
|
|
161
|
+
variants associated with human
|
|
162
|
+
height](https://doi.org/10.1038/s41586-022-05275-y). *Nature* (2022).
|
|
163
|
+
The LD-screen example in the guide.
|
|
164
|
+
|
|
165
|
+
## AI assistance
|
|
166
|
+
|
|
167
|
+
Parts of allelign's code and documentation were generated with the assistance
|
|
168
|
+
of AI tools and reviewed by the maintainer. As with any analysis software,
|
|
169
|
+
validate its behaviour on inputs you understand before relying on it; see the
|
|
170
|
+
[LICENSE](LICENSE) for the warranty terms.
|
|
171
|
+
|
|
172
|
+
## Status
|
|
173
|
+
|
|
174
|
+
Version 0.1.0. MIT licence. If you use allelign, please cite it — see
|
|
175
|
+
[CITATION.cff](CITATION.cff).
|
allelign-0.1.0/README.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# allelign
|
|
2
|
+
|
|
3
|
+
[](https://github.com/bvilhjal/allelign/actions/workflows/ci.yml)
|
|
4
|
+
|
|
5
|
+
Read, align and quality-control GWAS summary statistics and PGS effect sizes.
|
|
6
|
+
|
|
7
|
+
Every method in this family starts the same way: parse a summary-statistics file in one of many dialects, get the effect alleles right against a reference, and catch bad input before it turns into a confident wrong number. allelign does those steps once, for all of them. It is extracted from ldpred3, plus the PGS Catalog reader from multipgs and the long-range LD table from bipred. On the inputs ldpred3 already handles it reproduces ldpred3 bit for bit; `tests/test_parity_ldpred3.py` checks that.
|
|
8
|
+
|
|
9
|
+
NumPy is the only dependency. Numba speeds up the parser about threefold, and SciPy provides float32 eigensolves for the LD screen; both are optional (`[fast]`).
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
From GitHub:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install "allelign[fast] @ git+https://github.com/bvilhjal/allelign.git"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
From a sibling checkout, as with the rest of the family:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install -e "../allelign[fast]"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Quick start
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
import allelign as al
|
|
29
|
+
|
|
30
|
+
ss = al.read_sumstats("gwas.tsv.gz") # any common dialect
|
|
31
|
+
keep, qc_log = al.qc_sumstats(ss) # validity, duplicates, N, MAF, INFO
|
|
32
|
+
ref = al.read_bim("reference.bim").freeze() # or read_pvar, or al.Variants(...)
|
|
33
|
+
h = al.harmonize(ss.subset(keep), ref) # beta now counts ref.a1
|
|
34
|
+
print(al.coverage_message(al.reference_coverage(ss.subset(keep), ref, h)) or "coverage ok")
|
|
35
|
+
|
|
36
|
+
# Checks against the reference panel (af_ref: frequency of ref.a1).
|
|
37
|
+
sd_keep, sd_log, _ = al.sd_consistency_mask(h.beta, h.se, h.n_eff, af_ref[h.var_index])
|
|
38
|
+
|
|
39
|
+
# LD consistency: z-scores their LD neighbours contradict. LD comes from the
|
|
40
|
+
# reference's genotypes, one block at a time; or pass your own [(R, idx), ...]
|
|
41
|
+
# blocks to al.ld_consistency_screen.
|
|
42
|
+
bed = al.Bed("reference.bed", variants=ref, samples=eur_iids)
|
|
43
|
+
ld_keep = al.ld_consistency_screen_genotypes(bed, h.var_index, h.beta / h.se)
|
|
44
|
+
|
|
45
|
+
# PGS effect sizes
|
|
46
|
+
score = al.read_scoring_file("PGS000001_hmPOS_GRCh37.txt.gz")
|
|
47
|
+
w = al.harmonize_weights(score, ref) # also aligns AF, reports matched weight mass
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Every filter can stamp a per-row status array (`al.new_status(len(ss))`, passed as `status=`), so you can see which stage dropped each variant and write the table with `al.write_status_table`.
|
|
51
|
+
|
|
52
|
+
## Command line
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
allelign inspect gwas.tsv.gz
|
|
56
|
+
allelign clean gwas.tsv.gz -o clean.tsv.gz --status-out status.tsv
|
|
57
|
+
allelign align gwas.tsv.gz --reference ref.bim -o aligned.tsv.gz --sumstats-build GRCh38 --reference-build GRCh37 --reanchor-on-identifier
|
|
58
|
+
allelign align gwas.tsv.gz --reference ref.bim -o aligned.tsv.gz --ld-screen --ld-keep eur_samples.txt --status-out status.tsv
|
|
59
|
+
allelign pgs-export prs.weights.tsv -o PGS_my.txt --genome-build GRCh37
|
|
60
|
+
allelign download GCST91000728 -o gwas.h.tsv.gz # GWAS Catalog
|
|
61
|
+
allelign download FINNGEN:R11:I9_AF -o finngen.tsv.gz # FinnGen, and the providers below
|
|
62
|
+
allelign download EQTL:QTS000001:QTD000001:ENSG00000008128 -o eqtl.tsv.gz
|
|
63
|
+
allelign download GCST91000728 -o gwas.h.tsv.gz --keep-ids ref.bim
|
|
64
|
+
allelign download PGS000337 -o score.txt.gz --build GRCh38 --dry-run
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Each command writes `<out>.log.json` with the parse, QC, harmonisation and coverage records; `download` writes a `<out>.meta.json` provenance sidecar (URL, provider, trait, SHA-256, filter counts) instead.
|
|
68
|
+
|
|
69
|
+
## What it covers
|
|
70
|
+
|
|
71
|
+
- **Reading.** ldpred3's alias table and dialect rules (SAIGE, BOLT, METAL, GWAS-SSF, PGC), OR to log-OR, SE recovered from p without underflow. allelign adds:
|
|
72
|
+
- PLINK2 `A1` against `REF`/`ALT` or `OMITTED`;
|
|
73
|
+
- REGENIE `GENPOS` and `LOG10P`;
|
|
74
|
+
- GWAS Catalog `hm_` columns as one consistent set;
|
|
75
|
+
- PGC `FRQ_U_*`;
|
|
76
|
+
- Neale `chr:pos:ref:alt`;
|
|
77
|
+
- FinnGen;
|
|
78
|
+
- effective N from case and control counts.
|
|
79
|
+
- **Downloading.** `allelign download` resolves a published study by reference — GWAS Catalog (`GCST…`), PGS Catalog (`PGS…`), FinnGen, COVID-HGI, GBMI, eQTL Catalogue — checks the URL, streams it locally with a provenance sidecar, and can keep only the rows a reference can match.
|
|
80
|
+
- **Alignment.** ldpred3's harmoniser:
|
|
81
|
+
- identifier matching with coordinate checks, so a build mix-up is unmatched rather than silently accepted;
|
|
82
|
+
- strand flips;
|
|
83
|
+
- ambiguous pairs dropped;
|
|
84
|
+
- multi-allelic sites;
|
|
85
|
+
- coverage diagnosis that names a build mismatch;
|
|
86
|
+
- identifier re-anchoring;
|
|
87
|
+
- a declared-build check.
|
|
88
|
+
- **QC.**
|
|
89
|
+
- File-level filters.
|
|
90
|
+
- SD consistency against reference frequencies.
|
|
91
|
+
- Allele-frequency concordance, with a safety valve for ancestry mismatch.
|
|
92
|
+
- Imputed per-variant N, the genomic-control undo, implied N, λGC and long-range LD regions.
|
|
93
|
+
- The split-half LD-consistency screen (DENTIST-style) with full-window confirmation, on dense, int8, low-rank or lazily provided LD, or on LD formed block by block from a PLINK `.bed` reference.
|
|
94
|
+
- **Effect sizes.** ldpred3 weight tables, PGS Catalog reading and writing, and alignment of either to a reference.
|
|
95
|
+
|
|
96
|
+
[docs/guide.md](docs/guide.md) has the rules, defaults and the deliberate differences from ldpred3. A hands-on pass over download → inspect → clean → align is [docs/walkthrough.md](docs/walkthrough.md), with the same flow as a notebook in [docs/walkthrough.ipynb](docs/walkthrough.ipynb).
|
|
97
|
+
|
|
98
|
+
## Consumers
|
|
99
|
+
|
|
100
|
+
- **ldpred3** reads, aligns, QCs and writes weights through allelign. Its modules re-export allelign under their old names, so sibling imports keep working. It keeps the pipeline-specific parts: whole-block DENTIST with low-rank Woodbury updates, the BLAS gate for a pooled screen, its float32 eigensolver (passed to the screen), and the qc_log report blocks. allelign's parity tests are the contract.
|
|
101
|
+
- **ppb** takes chromosome labels, reverse complements and strand ambiguity from `allelign.alleles` and keeps its own position-only join.
|
|
102
|
+
- **bipred** takes the region table, long-range mask, strict implied-N diagnostic and weight-file I/O from allelign. Its wrapper includes APOE by default; its LDpred2-style SD diagnostic stays in bipred. Trait preparation still goes through ldpred3.
|
|
103
|
+
- **gwfm, multipgs and SMARTpred** use allelign for reading, alignment, QC and weight-file I/O. multipgs aligns both scoring files and fitted weights with `harmonize_weights`. SMARTpred and the LDpred3 harvester share the header-only `resolve_gwas_catalog_columns` rules while retaining streamed filtering. LD caches, prepared traits, the fit and pipeline reports stay in ldpred3.
|
|
104
|
+
|
|
105
|
+
## References
|
|
106
|
+
|
|
107
|
+
The methods allelign implements:
|
|
108
|
+
|
|
109
|
+
- Chen W, Wu Y, Zheng Z, et al. [Improved analyses of GWAS summary
|
|
110
|
+
statistics by reducing data heterogeneity and
|
|
111
|
+
errors](https://doi.org/10.1038/s41467-021-27438-7). *Nature
|
|
112
|
+
Communications* (2021). The DENTIST statistic behind the LD-consistency
|
|
113
|
+
screen.
|
|
114
|
+
- Privé F, Arbel J, Aschard H, et al. [Identifying and correcting for
|
|
115
|
+
misspecifications in GWAS summary statistics and polygenic
|
|
116
|
+
scores](https://doi.org/10.1016/j.xhgg.2022.100136). *HGG Advances*
|
|
117
|
+
(2022). The SD-consistency and frequency checks, and the per-variant N
|
|
118
|
+
imputation.
|
|
119
|
+
- Lambert SA, Gil L, Jupp S, et al. [The Polygenic Score Catalog as an open
|
|
120
|
+
database for reproducibility and systematic
|
|
121
|
+
evaluation](https://doi.org/10.1038/s41588-021-00783-5). *Nature
|
|
122
|
+
Genetics* (2021). The scoring-file format `read_scoring_file` parses.
|
|
123
|
+
- Sollis E, Mosaku A, Abid A, et al. [The NHGRI-EBI GWAS Catalog:
|
|
124
|
+
knowledgebase and deposition
|
|
125
|
+
resource](https://doi.org/10.1093/nar/gkac1010). *Nucleic Acids Research*
|
|
126
|
+
(2023). The harmonised `hm_` deposit layout.
|
|
127
|
+
- Yengo L, Vedantam S, Marouli E, et al. [A saturated map of common genetic
|
|
128
|
+
variants associated with human
|
|
129
|
+
height](https://doi.org/10.1038/s41586-022-05275-y). *Nature* (2022).
|
|
130
|
+
The LD-screen example in the guide.
|
|
131
|
+
|
|
132
|
+
## AI assistance
|
|
133
|
+
|
|
134
|
+
Parts of allelign's code and documentation were generated with the assistance
|
|
135
|
+
of AI tools and reviewed by the maintainer. As with any analysis software,
|
|
136
|
+
validate its behaviour on inputs you understand before relying on it; see the
|
|
137
|
+
[LICENSE](LICENSE) for the warranty terms.
|
|
138
|
+
|
|
139
|
+
## Status
|
|
140
|
+
|
|
141
|
+
Version 0.1.0. MIT licence. If you use allelign, please cite it — see
|
|
142
|
+
[CITATION.cff](CITATION.cff).
|