Taykhoom commited on
Commit
ee38f12
·
verified ·
1 Parent(s): 811fbda

Publish corrected RepeatMasker processing

Browse files
README.md CHANGED
@@ -1,130 +1,32 @@
1
  ---
2
- pretty_name: "GAMBA Functional Regions: Feature vs Random"
3
  license: mit
4
- tags:
5
- - biology
6
- - genomics
7
- - dna
8
- - genome-language-model
9
- - benchmark
10
- - functional-genomics
11
- - hg38
12
- - parquet
13
  configs:
14
  - config_name: causal
15
- data_files:
16
- - split: all
17
- path: functional-random-gamba-causal.parquet
18
  - config_name: bidi
19
- data_files:
20
- - split: all
21
- path: functional-random-gamba-bidi.parquet
22
  ---
23
 
24
- # GAMBA Functional Regions: Feature vs Random
25
 
26
- This dataset packages GAMBA's binary functional-region benchmark comparing
27
- annotated genomic features with chromosome- and length-matched random
28
- controls. Random controls avoid retained anchors from the same functional
29
- category.
30
 
31
- ## Configs
 
 
32
 
33
- | Config | Train rows | Test rows | Total |
34
- |---|---:|---:|---:|
35
- | `causal`, `bidi` | 150,728 | 37,834 | 188,562 |
 
36
 
37
- Each config includes the `noncoding_regions` extension. Filter
38
- `category != "noncoding_regions"` to recover the exact 169,674-row,
39
- ten-category GAMBA paper dataset without storing those rows twice.
40
 
41
- ## Choosing a context
42
-
43
- The GAMBA paper uses context geometry matched to the model. Choose
44
- `*-causal` for Evo2 or another left-to-right model: the ROI is at the end of
45
- the strand-oriented window, so all preceding bases are usable context. Choose
46
- `*-bidi` for GAMBA encoders, the distilled student, GPN-Star, PhyloGPN, or
47
- another masked/bidirectional model: the ROI is centered so the model sees both
48
- flanks. Using a causal file for a bidirectional model removes its right-side
49
- context and is not the paper protocol.
50
-
51
- ## Loading
52
-
53
- ```python
54
- from datasets import load_dataset
55
-
56
- dataset = load_dataset(
57
- "Taykhoom/functional-random-gamba",
58
- "bidi",
59
- split="all",
60
- )
61
- paper = dataset.filter(lambda row: row["category"] != "noncoding_regions")
62
- test = paper.filter(lambda row: row["split"] == "test")
63
- ```
64
-
65
- Here, `split="all"` tells Hugging Face to load the single physical parquet
66
- file. The parquet's own `split` column records the biological chromosome split
67
- (`train` or `test`). Keeping one file avoids duplicating the dataset; filter
68
- the column as shown above.
69
-
70
- ## Columns
71
-
72
- | Column | Description |
73
- |---|---|
74
- | `split`, `label` | Probe/fine-tuning `train` or held-out `test`; labels are `feature` or `random`. |
75
- | `sequence` | Strand-oriented causal or bidirectional context of at most 2,048 bp. |
76
- | `context_policy` | `causal` for `*-causal`; `symmetric` for `*-bidi`. |
77
- | `pair_id` | Shared identifier for a feature and its matched random control. |
78
- | `category`, `scope` | Functional class and pooling scope. |
79
- | `chrom`, `start`, `end`, `strand` | Zero-based, half-open hg38 feature/control coordinates. |
80
- | `context_start`, `context_end` | Forward-genome coordinates of `sequence`. |
81
- | `roi_start`, `roi_end` | Feature/control offsets within `sequence`. |
82
- | `pool_start_in_window`, `pool_end_in_window` | Offsets to pool for representation evaluation. |
83
- | `name` | Source annotation name. |
84
- | `phylop_mean`, `phylop_std` | Mean and population standard deviation over GAMBA's baseline ROI. |
85
- | `phylop_frac_pos`, `phylop_frac_neg` | Fractions of ROI bases with positive or negative phyloP scores. |
86
- | `phylop_mean_pos`, `phylop_mean_neg` | Means over positive or negative ROI scores, or zero when absent. |
87
- | `phylop_context_mean`, `phylop_context_std` | Mean and population standard deviation over GAMBA's symmetric 2,048 bp phyloP context. |
88
- | `phylop_context_frac_pos`, `phylop_context_frac_neg` | Fractions of context bases with positive or negative scores. |
89
- | `phylop_context_mean_pos`, `phylop_context_mean_neg` | Means over positive or negative context scores, or zero when absent. |
90
-
91
- ## Data source and processing
92
-
93
- The processing code reproduces the ten-category BED output from
94
- [Microsoft GAMBA](https://github.com/microsoft/gamba) commit `e83984e`
95
- byte-for-byte, then freezes all GAMBA autosomes plus `chrX` in parquet.
96
- The GAMBA models were pretrained on the chromosomes marked `train`. The paper's
97
- zero-shot result used the frozen models on `chr2`, `chr3`, `chr16`, and
98
- `chr22`, which are marked `test`; no task-specific model was fitted on these
99
- benchmark rows. Use only `test` to reproduce that paper subset. The `train`
100
- rows are provided for probing/fine-tuning or broader chromosome evaluation.
101
-
102
- PhyloP values come from the Zoonomia 241-mammalian track used by GAMBA.
103
- Uncovered positions are zero and scores are rounded to two decimal places
104
- before the float32 summaries are computed.
105
-
106
- ## Citation
107
-
108
- Please cite the GAMBA paper:
109
-
110
- Consens, M. E. et al. *Predicting evolutionary rate as a pretraining task
111
- improves genome language model representations*. bioRxiv (2026).
112
- [doi:10.64898/2026.02.02.703275](https://doi.org/10.64898/2026.02.02.703275).
113
- A conference version is available on
114
- [OpenReview](https://openreview.net/forum?id=dkgM2ale4U).
115
-
116
- ```bibtex
117
- @article{consens2026predicting,
118
- title = {Predicting evolutionary rate as a pretraining task improves genome language model representations},
119
- author = {Consens, Micaela Elisa and Yang, Kevin K. and Hall, Jimmy and Conard, Ashley Mae and Wang, Bo and Crawford, Lorin and Moses, Alan and Lu, Alex X.},
120
- journal = {bioRxiv},
121
- year = {2026},
122
- doi = {10.64898/2026.02.02.703275},
123
- url = {https://doi.org/10.64898/2026.02.02.703275}
124
- }
125
- ```
126
-
127
- ## License
128
-
129
- GAMBA and its released benchmark code/data are distributed under the MIT
130
- license. Upstream annotation resources retain their original terms.
 
1
  ---
2
+ pretty_name: "GAMBA Functional Regions: Feature vs Category-Matched Random"
3
  license: mit
4
+ tags: [biology, genomics, genome-language-model, benchmark, hg38, parquet]
 
 
 
 
 
 
 
 
5
  configs:
6
  - config_name: causal
7
+ data_files: [{split: all, path: functional-random-gamba-causal.parquet}]
 
 
8
  - config_name: bidi
9
+ data_files: [{split: all, path: functional-random-gamba-bidi.parquet}]
 
 
10
  ---
11
 
12
+ # GAMBA feature-vs-random benchmark
13
 
14
+ Each feature is paired with a chromosome- and length-matched random control
15
+ that avoids retained anchors from the same category. Both configs contain
16
+ 188,568 rows; filtering `category != "noncoding_regions"` gives the
17
+ 169,682-row corrected paper view.
18
 
19
+ Use `causal` for left-to-right models and `bidi` for masked/bidirectional
20
+ models. The parquet `split` column marks `chr2`, `chr3`, `chr16`, and `chr22`
21
+ as held-out `test`; Hugging Face split `all` loads the physical file.
22
 
23
+ Coordinates are zero-based, half-open hg38. `sequence` is strand-oriented,
24
+ `roi_*` marks the feature/control, and `pool_*_in_window` is the evaluation
25
+ span. Repeat rows preserve `repeat_class`; emitted strands are only `+` or
26
+ `-`. The phyloP columns use the pinned Zoonomia 241-mammal track.
27
 
28
+ Processing is derived from Microsoft GAMBA commit
29
+ `e83984ea20bb4ee017993144fbe17e7bae3cdddc` and corrects the source
30
+ RepeatMasker strand/class field mapping.
31
 
32
+ Please cite Consens et al. (2026), doi:10.64898/2026.02.02.703275.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
functional-random-gamba-bidi.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f2dff0b9f71fa191dacfbb371a48ff1bb42a39a929469084d17b810510e87ea9
3
- size 130137495
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b12e684469d3d8c2b45f401e441e37d697ccc835e70bebce99686ace8d9cbc1b
3
+ size 131093923
functional-random-gamba-causal.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c7625b4ce5862cbe832d76a80f44700a3aa46c6be35608c56ab3924159a4f506
3
- size 122834484
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17d5f26b776e26e483211be1cdf10680e91c81b4cf75878ab44acba63c3b61bc
3
+ size 123767401