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