gonzalobenegas commited on
Commit
dfbbe11
·
verified ·
1 Parent(s): 241ac97

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +72 -71
README.md CHANGED
@@ -1,6 +1,7 @@
1
  ---
2
  license: apache-2.0
3
  tags:
 
4
  - genomics
5
  - dna
6
  - variant-effect-prediction
@@ -8,30 +9,34 @@ tags:
8
  - gwas
9
  - fine-mapping
10
  size_categories:
11
- - 1K<n<10K
12
  ---
13
 
14
  # evals_complex_traits
15
 
16
- Variant-effect-prediction benchmark of UKBB fine-mapped complex-trait SNVs vs low-PIP SNVs, gene-matched 1:1 within consequence categories and MAF bins.
 
 
 
17
 
18
  ## Description
19
 
20
  | | |
21
  |---|---|
22
- | Positives | UKBB SuSiE+FINEMAP fine-mapped variants with PIP > 0.9 across 119 traits |
23
- | Negatives | PIP < 0.01 (and not null in any of the 119 traits), gene-matched 1:1 to positives |
24
- | Genome build | GRCh38 (lifted from hg19 via [`liftover`](https://github.com/konstantint/pyliftover)) |
25
  | Variant type | SNVs only |
26
  | Coordinates | 1-based (`pos` is 1-based; `ref`/`alt` are single bases) |
 
27
 
28
  ## Splits
29
 
30
- | Split | Variants (positives + matched negatives) | Chromosomes |
31
- |---|---:|---|
32
- | `train` | 1 128 (564 pos + 564 neg) | odd: 1, 3, …, X |
33
- | `test` | 1 140 (570 pos + 570 neg) | even: 2, 4, …, Y |
34
- | **total** | **2 268** | |
35
 
36
  ## Columns
37
 
@@ -39,99 +44,95 @@ Variant-effect-prediction benchmark of UKBB fine-mapped complex-trait SNVs vs lo
39
  |---|---|---|
40
  | `chrom`, `pos`, `ref`, `alt` | str / int / str / str | Variant coordinates (1-based, GRCh38) |
41
  | `label` | bool | `True` for high-PIP positive, `False` for low-PIP matched negative |
42
- | `subset` | str | Consequence-group label for stratified eval (`distal`, `missense_variant`, `tss_proximal`, `3_prime_UTR_variant`, `non_coding_transcript_exon_variant`, `5_prime_UTR_variant`, `synonymous_variant`, `splicing`) |
43
- | `match_group` | int | Pos / neg pair ID (every group has 1 positive + 1 matched negative) |
44
  | `rsid` | str | dbSNP rsID (when available) |
45
  | `pip` | float | Maximum PIP across the 119 traits |
46
  | `traits` | str | Comma-separated list of traits with PIP > 0.9 (positives only) |
47
- | `MAF` | float | UKBB EUR minor allele frequency from the LD-score reference panel |
48
- | `ld_score` | float | UKBB EUR LD score (passthrough column; **not** used as a matching feature) |
49
- | `consequence`, `consequence_cre`, `consequence_final`, `consequence_group` | str | Ensembl VEP consequence + grouping used by the matcher |
50
- | `distance_tss_pc`, `distance_tss_nc` | int | Distance (0-based, half-open) to nearest protein-coding / non-protein-coding transcript TSS |
51
- | `distance_tss` | int | min(`distance_tss_pc`, `distance_tss_nc`); used by `consequence_group` recategorization |
52
- | `tss_closest_pc_gene_id`, `tss_closest_nc_gene_id`, `tss_closest_gene_id` | str | Ensembl gene IDs at those distances |
53
  | `distance_exon_pc`, `distance_exon_nc`, `distance_exon` | int | Same shape, for nearest exon |
54
  | `exon_closest_pc_gene_id`, `exon_closest_nc_gene_id`, `exon_closest_gene_id` | str | Same shape |
55
- | `distance_tss_pc_bin`, `distance_tss_nc_bin`, `distance_exon_pc_bin`, `MAF_bin` | str | Categorical bins used as exact-match keys during gene-matching |
56
 
57
  ## Per-subset retention
58
 
59
- | Subset | n_pos in dataset_all | matched (kept) | retention |
60
  |---|---:|---:|---:|
61
- | distal | 1 193 | 857 | 71.8 % |
62
- | missense_variant | 454 | 125 | 27.5 % |
63
- | tss_proximal | 244 | 56 | 23.0 % |
64
- | 3_prime_UTR_variant | 78 | 36 | 46.2 % |
65
- | non_coding_transcript_exon_variant | 75 | 28 | 37.3 % |
66
- | 5_prime_UTR_variant | 56 | 15 | 26.8 % |
67
- | synonymous_variant | 33 | 15 | 45.5 % |
68
- | splicing | 30 | 2 | 6.7 % |
69
- | **total** | **2 165** | **1 134** | **52.4 %** |
70
-
71
- 52 % of input fine-mapped SNVs are retained. The biggest hits are:
72
-
73
- - **missense** — complex-trait missense positives skew to common-MAF GWAS hits while gnomAD missense negatives skew rare; even the per-subset 10-bin MAF scheme can only stretch so far.
74
- - **splicing** splicing variants live next to a small set of specific exons; the gene-id match key starves neg supply.
75
-
76
- ## Matching design (locked iter 33, [issue #156](https://github.com/Open-Athena/bolinas-dna/issues/156))
77
-
78
- Matching is exact on every categorical key, then Euclidean-nearest on the (RobustScaler-scaled) continuous features as a within-group tie-breaker. Without replacement, k=1.
79
 
80
  - **Continuous features**: `distance_tss_pc`, `distance_tss_nc`, `distance_exon_pc`, `distance_exon_nc`, `MAF`.
81
  - **Categorical features**:
82
  - `chrom`, `consequence_final`
83
- - `tss_closest_pc_gene_id`, `tss_closest_nc_gene_id`, `exon_closest_pc_gene_id`, `exon_closest_nc_gene_id`
84
- - `distance_tss_pc_bin`, `distance_tss_nc_bin` (`tss_proximal` only; edges `[0, 50, 100, 200, 500, 1000]`)
85
- - `distance_exon_pc_bin` (`splicing` only; edges `[0, 5, 20, 30]`)
86
- - `MAF_bin` **per-subset tiered scheme** (`MAF_TIERED_V1`):
87
- - `distal`, `tss_proximal`, `non_coding_transcript_exon_variant`: 20-bin (right-closed log-spaced toward low MAF; `MAF_BIN_EDGES_20`)
88
- - `3_prime_UTR_variant`, `5_prime_UTR_variant`, `missense_variant`: 10-bin (`MAF_BIN_EDGES_10`)
89
- - `synonymous_variant`, `splicing`, …: 5-bin (`MAF_BIN_EDGES_5`)
90
 
91
- `ld_score` is included as a passthrough column for downstream diagnostics but is **not** in the match key.
 
92
 
93
- **Matched-feature diagnostic** (iter 33): **zero Bonferroni-significant leaks** on the 5 matched features. `ld_score` (passthrough, **not** in the match key) still shows a Bonferroni-significant skew on `distal` (PA=0.376, p=3e-13 ★) — known dataset property, not a matching artefact.
94
 
95
- <details>
96
- <summary>Full per-(subset, feature) PA / p-value table</summary>
 
97
 
98
- Format: PA / p. `★` = Bonferroni-significant at α = 0.05 / 40 = 1.25e-3 (8 subsets × 5 matched features). Generated by [`snakemake/evals/scratch/leakage_v2.py`](https://github.com/Open-Athena/bolinas-dna/blob/6e34e07/snakemake/evals/scratch/leakage_v2.py).
 
99
 
100
  | subset | n | distance_tss_pc | distance_tss_nc | distance_exon_pc | distance_exon_nc | MAF |
101
- |---|---:|---|---|---|---|---|
102
- | distal | 857 | 0.470 / 9e-02 | 0.494 / 7e-01 | 0.468 / 7e-02 | 0.512 / 5e-01 | 0.538 / 3e-02 |
103
- | missense_variant | 125 | 0.504 / 1.0 | 0.488 / 9e-01 | 0.488 / 3e-01 | 0.536 / 3e-01 | 0.584 / 7e-02 |
104
- | tss_proximal | 56 | 0.482 / 9e-01 | 0.357 / 4e-02 | 0.500 / 1.0 | 0.347 / 6e-03 | 0.500 / 1.0 |
105
- | 3_prime_UTR_variant | 36 | 0.417 / 4e-01 | 0.333 / 7e-02 | 0.472 / 6e-01 | 0.500 / 1.0 | 0.500 / 1.0 |
106
- | non_coding_transcript_exon_variant | 28 | 0.321 / 9e-02 | 0.464 / 9e-01 | 0.429 / 6e-01 | | 0.429 / 6e-01 |
107
- | synonymous_variant | 15 | 0.333 / 3e-01 | 0.533 / 1.0 | — | 0.467 / 1.0 | 0.667 / 3e-01 |
108
- | 5_prime_UTR_variant | 15 | 0.333 / 3e-01 | 0.467 / 1.0 | 0.467 / 1.0 | 0.667 / 2e-01 | 0.633 / 4e-01 |
109
- | splicing | 2 | 0.000 / 5e-01 | 0.000 / 5e-01 | 1.000 / 5e-01 | 0.500 / 1.0 | 0.500 / 1.0 |
110
 
111
  </details>
112
 
113
  ## Provenance
114
 
115
- Built by the [`bolinas-dna`](https://github.com/Open-Athena/bolinas-dna) eval pipeline at commit [`6e34e07`](https://github.com/Open-Athena/bolinas-dna/tree/6e34e07/snakemake/evals).
 
116
 
117
- - Curation pipeline: [`snakemake/evals/`](https://github.com/Open-Athena/bolinas-dna/tree/6e34e07/snakemake/evals)
118
- - Matching algorithm: [`src/bolinas/evals/matching.py`](https://github.com/Open-Athena/bolinas-dna/blob/6e34e07/src/bolinas/evals/matching.py)
119
- - Design discussion: [issue #156](https://github.com/Open-Athena/bolinas-dna/issues/156)
120
 
121
  The curation is a from-scratch reimplementation of the [TraitGym](https://github.com/songlab-cal/TraitGym) complex-traits pipeline.
122
 
123
- ## Companion datasets
124
-
125
- - **[`bolinas-dna/evals_complex_traits_harness_255`](https://huggingface.co/datasets/bolinas-dna/evals_complex_traits_harness_255)** — same variants with 255 bp reference-genome windows materialized into `context` / `ref_completion` / `alt_completion` columns for direct use as eval-harness inputs.
126
-
127
  ## License
128
 
129
- Released under the same terms as its sources. UKBB summary-level data and the [Finucane lab fine-mapping release](https://huggingface.co/datasets/gonzalobenegas/finucane-ukbb-finemapping) are intended for non-commercial research; check upstream license if you plan to use commercially.
 
 
 
130
 
131
  ## Citation
132
 
133
- If you use this benchmark, please cite the upstream sources:
134
-
135
- - TraitGym — Benegas *et al.* 2025, [bioRxiv 2025.02.11.637758](https://www.biorxiv.org/content/10.1101/2025.02.11.637758v2) ([songlab-cal/TraitGym](https://github.com/songlab-cal/TraitGym))
136
  - UKBB fine-mapping — Wang *et al.* (Nat Commun 2021) and the [Finucane lab release](https://huggingface.co/datasets/gonzalobenegas/finucane-ukbb-finemapping)
137
  - LD scores — Bulik-Sullivan *et al.* (Nat Genet 2015)
 
1
  ---
2
  license: apache-2.0
3
  tags:
4
+ - biology
5
  - genomics
6
  - dna
7
  - variant-effect-prediction
 
9
  - gwas
10
  - fine-mapping
11
  size_categories:
12
+ - 10K<n<100K
13
  ---
14
 
15
  # evals_complex_traits
16
 
17
+ Variant-effect-prediction benchmark of UKBB fine-mapped complex-trait SNVs vs
18
+ low-PIP SNVs, 1:9 matched within consequence categories on `(chrom,
19
+ consequence_final)` plus subset-targeted distance bins, with MAF entering as
20
+ a continuous matching feature.
21
 
22
  ## Description
23
 
24
  | | |
25
  |---|---|
26
+ | Positives | UKBB SuSiE+FINEMAP fine-mapped variants with max(PIP) > 0.9 across 119 traits |
27
+ | Negatives | max(PIP) < 0.01 across 119 traits, 1:9 matched per positive |
28
+ | Genome build | GRCh38 (lifted from hg19) |
29
  | Variant type | SNVs only |
30
  | Coordinates | 1-based (`pos` is 1-based; `ref`/`alt` are single bases) |
31
+ | Matching ratio | 1:9 |
32
 
33
  ## Splits
34
 
35
+ | Split | Variants (pos + 9·neg) | Positives | Chromosomes |
36
+ |---|---:|---:|---|
37
+ | `train` | 11,630 | 1,163 | odd: 1, 3, …, X |
38
+ | `test` | 10,000 | 1,000 | even: 2, 4, …, Y |
39
+ | **total** | **21,630** | **2,163** | |
40
 
41
  ## Columns
42
 
 
44
  |---|---|---|
45
  | `chrom`, `pos`, `ref`, `alt` | str / int / str / str | Variant coordinates (1-based, GRCh38) |
46
  | `label` | bool | `True` for high-PIP positive, `False` for low-PIP matched negative |
47
+ | `subset` | str | Consequence-group label for stratified eval |
48
+ | `match_group` | int | Integer ID grouping each positive with its 9 matched negatives |
49
  | `rsid` | str | dbSNP rsID (when available) |
50
  | `pip` | float | Maximum PIP across the 119 traits |
51
  | `traits` | str | Comma-separated list of traits with PIP > 0.9 (positives only) |
52
+ | `MAF` | float | UKBB EUR minor allele frequency |
53
+ | `ld_score` | float | UKBB EUR LD score (passthrough, **not** a matching feature) |
54
+ | `consequence`, `consequence_cre`, `consequence_final`, `consequence_group` | str | Ensembl VEP consequence + grouping |
55
+ | `distance_tss_pc`, `distance_tss_nc`, `distance_tss` | int | Distances to nearest protein-coding / non-protein-coding TSS (and min, used for `consequence_group` recategorization) |
56
+ | `tss_closest_pc_gene_id`, `tss_closest_nc_gene_id`, `tss_closest_gene_id` | str | Ensembl gene IDs (passthrough gene-id was *not* used in matching) |
 
57
  | `distance_exon_pc`, `distance_exon_nc`, `distance_exon` | int | Same shape, for nearest exon |
58
  | `exon_closest_pc_gene_id`, `exon_closest_nc_gene_id`, `exon_closest_gene_id` | str | Same shape |
59
+ | `distance_tss_pc_bin`, `distance_exon_pc_bin` | str | Subset-prefixed bin labels used as exact-match keys; `BIN_NA` outside the binned subsets |
60
 
61
  ## Per-subset retention
62
 
63
+ | Subset | n_pos in `dataset_all` | matched (kept) | retention |
64
  |---|---:|---:|---:|
65
+ | `distal` | 1,193 | 1,193 | 100.0% |
66
+ | `missense_variant` | 454 | 454 | 100.0% |
67
+ | `tss_proximal` | 244 | 244 | 100.0% |
68
+ | `3_prime_UTR_variant` | 78 | 78 | 100.0% |
69
+ | `non_coding_transcript_exon_variant` | 75 | 75 | 100.0% |
70
+ | `5_prime_UTR_variant` | 56 | 56 | 100.0% |
71
+ | `synonymous_variant` | 33 | 33 | 100.0% |
72
+ | `splicing` | 30 | 30 | 100.0% |
73
+ | `mature_miRNA_variant` | 2 | 0 | 0.0% |
74
+ | **total** | **2,165** | **2,163** | **99.9%** |
75
+
76
+ ## Matching design
77
+
78
+ Matching is exact on every categorical key, then Euclidean-nearest on the
79
+ (RobustScaler-scaled) continuous features as a within-group tie-breaker.
80
+ Without replacement, k=9.
 
 
81
 
82
  - **Continuous features**: `distance_tss_pc`, `distance_tss_nc`, `distance_exon_pc`, `distance_exon_nc`, `MAF`.
83
  - **Categorical features**:
84
  - `chrom`, `consequence_final`
85
+ - `distance_tss_pc_bin` `tss_proximal`: edges `[0, 100, 1000, ∞]`; `BIN_NA` elsewhere
86
+ - `distance_exon_pc_bin`
87
+ - `tss_proximal`: edges `[0, 100, 1000, ]`
88
+ - `splicing`: edges `[0, 5, 30, ∞]`
89
+ - `BIN_NA` elsewhere
 
 
90
 
91
+ Gene-ID columns are kept as passthrough metadata but **not** used as match
92
+ keys.
93
 
94
+ ## Matched-feature AUPRC diagnostic
95
 
96
+ Each continuous matching feature `f` is scored as a single-feature predictor
97
+ within each subset: `{f}_auprc = max(AP(label, +f), AP(label, −f))`.
98
+ **Baseline = 0.1 for 1:9 matching**.
99
 
100
+ <details>
101
+ <summary>Per-(subset, feature) AUPRC table</summary>
102
 
103
  | subset | n | distance_tss_pc | distance_tss_nc | distance_exon_pc | distance_exon_nc | MAF |
104
+ |---|---:|---:|---:|---:|---:|---:|
105
+ | `distal` | 1,193 | 0.101 | 0.102 | 0.109 | 0.105 | 0.101 |
106
+ | `missense_variant` | 454 | 0.108 | 0.106 | 0.102 | 0.104 | 0.108 |
107
+ | `tss_proximal` | 244 | 0.114 | 0.114 | 0.110 | 0.108 | 0.101 |
108
+ | `3_prime_UTR_variant` | 78 | 0.119 | 0.116 | 0.108 | 0.108 | 0.114 |
109
+ | `non_coding_transcript_exon_variant` | 75 | 0.110 | 0.112 | 0.124 | 0.100 | 0.106 |
110
+ | `5_prime_UTR_variant` | 56 | 0.123 | 0.109 | 0.102 | 0.110 | 0.109 |
111
+ | `synonymous_variant` | 33 | 0.120 | 0.106 | 0.107 | 0.111 | 0.107 |
112
+ | `splicing` | 30 | 0.124 | 0.131 | 0.108 | 0.131 | 0.122 |
113
 
114
  </details>
115
 
116
  ## Provenance
117
 
118
+ Built by the [`bolinas-dna`](https://github.com/Open-Athena/bolinas-dna) eval pipeline at commit
119
+ [`main`](https://github.com/Open-Athena/bolinas-dna/tree/main/snakemake/evals).
120
 
121
+ - Curation pipeline: [`snakemake/evals`](https://github.com/Open-Athena/bolinas-dna/tree/main/snakemake/evals)
122
+ - Matching algorithm: [`src/bolinas/pipelines/evals/matching.py`](https://github.com/Open-Athena/bolinas-dna/blob/main/src/bolinas/pipelines/evals/matching.py)
123
+ - Diagnostic helper: [`src/bolinas/pipelines/evals/matching_qc.py`](https://github.com/Open-Athena/bolinas-dna/blob/main/src/bolinas/pipelines/evals/matching_qc.py)
124
 
125
  The curation is a from-scratch reimplementation of the [TraitGym](https://github.com/songlab-cal/TraitGym) complex-traits pipeline.
126
 
 
 
 
 
127
  ## License
128
 
129
+ Released under the same terms as its sources. UKBB summary-level data and
130
+ the [Finucane lab fine-mapping release](https://huggingface.co/datasets/gonzalobenegas/finucane-ukbb-finemapping)
131
+ are intended for non-commercial research; check upstream license if you plan
132
+ to use commercially.
133
 
134
  ## Citation
135
 
136
+ - TraitGym Benegas *et al.* 2025, [bioRxiv 2025.02.11.637758](https://www.biorxiv.org/content/10.1101/2025.02.11.637758v2)
 
 
137
  - UKBB fine-mapping — Wang *et al.* (Nat Commun 2021) and the [Finucane lab release](https://huggingface.co/datasets/gonzalobenegas/finucane-ukbb-finemapping)
138
  - LD scores — Bulik-Sullivan *et al.* (Nat Genet 2015)