File size: 5,350 Bytes
41e0ba2
ee38f12
80f9c61
53547ed
 
 
 
 
 
 
 
 
41e0ba2
d894c4a
53547ed
 
 
d894c4a
53547ed
 
 
41e0ba2
 
53547ed
41e0ba2
53547ed
 
 
41e0ba2
53547ed
 
 
 
41e0ba2
53547ed
41e0ba2
53547ed
41e0ba2
53547ed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
701f68b
 
53547ed
701f68b
53547ed
 
 
 
 
 
 
701f68b
53547ed
 
 
 
 
 
 
ec8649b
53547ed
 
 
 
 
 
 
 
 
701f68b
 
ec8649b
53547ed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ec8649b
53547ed
 
80f9c61
 
53547ed
 
 
 
 
 
 
 
 
80f9c61
 
 
53547ed
701f68b
 
 
ec8649b
 
 
bb37372
 
53547ed
 
 
 
 
3a4c79e
 
53547ed
 
 
 
 
 
 
80f9c61
 
 
 
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
---
pretty_name: "GAMBA Functional Regions: Feature vs Category-Matched Random"
license: other
tags:
- biology
- genomics
- dna
- regulatory-genomics
- genome-language-model
- benchmark
- hg38
- parquet
configs:
- config_name: causal
  data_files:
  - split: all
    path: functional-random-gamba-causal.parquet
- config_name: bidi
  data_files:
  - split: all
    path: functional-random-gamba-bidi.parquet
---

# GAMBA Functional Regions: Feature vs Category-Matched Random

This paired binary representation benchmark asks whether a model can
distinguish an annotated functional region from a chromosome- and
length-matched random control.

For this dataset, a random control avoids retained anchors from the **same
functional category**. It may overlap annotations from other categories.
Use the annotation-free random dataset if controls must avoid every retained
annotation category.

Each feature/control pair shares `pair_id`.

## Loading

```python
from datasets import load_dataset

bidi = load_dataset(
    "Taykhoom/functional-random-gamba",
    "bidi",
    split="all",
)

paper_test = bidi.filter(
    lambda row: row["split"] == "test"
    and row["category"] != "noncoding_regions"
)
```

## Dataset size and splits

| Scope | Rows | Held-out `test` rows |
|---|---:|---:|
| Complete release | 184,978 | 36,808 |
| Corrected paper categories | 165,972 | 33,012 |

Labels are balanced: 92,489 `feature` and 92,489 `random` rows.

Rows on `chr2`, `chr3`, `chr16`, and `chr22` are marked `test`; remaining
included chromosomes are `train`. The Hugging Face split `all` loads the
whole physical file.

## Categories

The complete release contains 92,489 source features across:

```text
repeats, UCNE, vista_enhancer, promoters, UTR5, UTR3,
coding_regions, exons, introns, upstream_TSS, noncoding_regions
```

`category != "noncoding_regions"` yields the corrected ten-category paper
view. `repeat_class` is populated on the 19,974 repeat-derived rows
(feature and matched control).

## Context configurations

| Config | Geometry |
|---|---|
| `causal` | ROI end-anchored after strand orientation for autoregressive models. |
| `bidi` | ROI centered for bidirectional/masked models. |

All 184,978 `bidi` sequences are 2,048 bp. In `causal`, 165,012 rows are
2,048 bp and 19,966 long-feature rows are truncated to 1,000 bp. Every released random
control context contains only uppercase `A/C/G/T`.

## Evaluation

For the paper protocol:

1. filter `split == "test"`;
2. exclude `category == "noncoding_regions"`;
3. pool each representation over
   `[pool_start_in_window, pool_end_in_window)`;
4. evaluate cosine leave-one-out 1-nearest-neighbor balanced accuracy.

## Columns

| Column group | Description |
|---|---|
| `split`, `sequence`, `label`, `pair_id` | Chromosome partition, exact input, `feature`/`random` class, and matched pair. |
| `context_group_id` | Exact model-input leakage group within this physical config. |
| `category`, `repeat_class`, `scope` | Source category, nullable repeat class, and `full` scope. |
| `context_policy` | `causal` or `symmetric`. |
| `chrom`, `start`, `end`, `source_strand` | Zero-based, half-open hg38 coordinates and biological strand (`.` means unknown). |
| `sequence_orientation` | Explicit `+`/`-` orientation used for sequence geometry and reverse complementation. |
| `context_start`, `context_end` | Forward-genome sequence context coordinates. |
| `roi_start`, `roi_end` | Feature/control offsets inside oriented `sequence`. |
| `pool_start_in_window`, `pool_end_in_window` | Evaluation pooling offsets. |
| `name` | Source/control identifier. |
| `phylop_*`, `phylop_context_*` | Six ROI and six symmetric-context float32 phyloP summaries. |

## Corrected repeat processing

RepeatMasker genomic strand and repeat class are separate fields. The release
uses UCSC `rmsk` field 9 as `source_strand`, field 11 as `repeat_class`, and
rebuilds repeat-derived controls and sequence orientation. Labels remain
unchanged.

VISTA requires hg38 and normalized positive expression: 1,367 raw records
collapse to 1,240 unique elements; 1,522 non-positive hg38 and 1,750 non-hg38
rows are excluded without liftover. All ambiguous feature/control groups and
all conflicting-label exact-input groups are removed. Same-label duplicates
remaining within a config share `context_group_id`; independent checks find
zero exact inputs crossing train/test and zero conflicting-label groups.
Every preserved random candidate is also rechecked against current
same-category anchors; invalid candidates are deterministically resampled.

## Processing and citation

Processing and verification:

- [Processing repository](https://github.com/TaykhoomDalal/Gamba-Processing/tree/main)
- [Processing and validation documentation](https://github.com/TaykhoomDalal/Gamba-Processing/blob/main/README.md#validation)

Consens, M. E. et al. *Predicting evolutionary rate as a pretraining task
improves genome language model representations*. bioRxiv (2026).
https://doi.org/10.64898/2026.02.02.703275

## License

The processing code derived from GAMBA is MIT licensed under the processing
repository's `LICENSE`. This generated dataset is marked `other`: incorporated
reference sequence, annotations, and phyloP-derived values retain their
upstream terms, so no blanket MIT license is asserted for the Parquets.