Add causal and bidirectional context configs
Browse files
README.md
CHANGED
|
@@ -11,14 +11,22 @@ tags:
|
|
| 11 |
- hg38
|
| 12 |
- parquet
|
| 13 |
configs:
|
| 14 |
-
- config_name: canonical
|
| 15 |
data_files:
|
| 16 |
- split: all
|
| 17 |
-
path: functional-random-gamba.parquet
|
| 18 |
-
- config_name:
|
| 19 |
data_files:
|
| 20 |
- split: all
|
| 21 |
-
path: functional-random-gamba-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
---
|
| 23 |
|
| 24 |
# GAMBA Functional Regions: Feature vs Random
|
|
@@ -32,13 +40,23 @@ category.
|
|
| 32 |
|
| 33 |
| Config | Train rows | Test rows | Total |
|
| 34 |
|---|---:|---:|---:|
|
| 35 |
-
| `canonical` | 135,692 | 33,982 | 169,674 |
|
| 36 |
-
| `noncoding-added` | 150,726 | 37,834 | 188,560 |
|
| 37 |
|
| 38 |
-
The `noncoding-added`
|
| 39 |
[Gamba-Processing](https://github.com/TaykhoomDalal/Gamba-Processing), not an
|
| 40 |
additional category emitted by GAMBA's current `create_eval_data.py`.
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
## Loading
|
| 43 |
|
| 44 |
```python
|
|
@@ -46,7 +64,7 @@ from datasets import load_dataset
|
|
| 46 |
|
| 47 |
canonical = load_dataset(
|
| 48 |
"Taykhoom/functional-random-gamba",
|
| 49 |
-
"canonical",
|
| 50 |
split="all",
|
| 51 |
)
|
| 52 |
train = canonical.filter(lambda row: row["split"] == "train")
|
|
@@ -63,7 +81,8 @@ the column as shown above.
|
|
| 63 |
| Column | Description |
|
| 64 |
|---|---|
|
| 65 |
| `split`, `label` | Probe/fine-tuning `train` or held-out `test`; labels are `feature` or `random`. |
|
| 66 |
-
| `sequence` | Strand-oriented
|
|
|
|
| 67 |
| `pair_id` | Shared identifier for a feature and its matched random control. |
|
| 68 |
| `category`, `scope` | Functional class and pooling scope. |
|
| 69 |
| `chrom`, `start`, `end`, `strand` | Zero-based, half-open hg38 feature/control coordinates. |
|
|
|
|
| 11 |
- hg38
|
| 12 |
- parquet
|
| 13 |
configs:
|
| 14 |
+
- config_name: canonical-causal
|
| 15 |
data_files:
|
| 16 |
- split: all
|
| 17 |
+
path: functional-random-gamba-causal.parquet
|
| 18 |
+
- config_name: canonical-bidi
|
| 19 |
data_files:
|
| 20 |
- split: all
|
| 21 |
+
path: functional-random-gamba-bidi.parquet
|
| 22 |
+
- config_name: noncoding-added-causal
|
| 23 |
+
data_files:
|
| 24 |
+
- split: all
|
| 25 |
+
path: functional-random-gamba-noncoding-added-causal.parquet
|
| 26 |
+
- config_name: noncoding-added-bidi
|
| 27 |
+
data_files:
|
| 28 |
+
- split: all
|
| 29 |
+
path: functional-random-gamba-noncoding-added-bidi.parquet
|
| 30 |
---
|
| 31 |
|
| 32 |
# GAMBA Functional Regions: Feature vs Random
|
|
|
|
| 40 |
|
| 41 |
| Config | Train rows | Test rows | Total |
|
| 42 |
|---|---:|---:|---:|
|
| 43 |
+
| `canonical-causal`, `canonical-bidi` | 135,692 | 33,982 | 169,674 |
|
| 44 |
+
| `noncoding-added-causal`, `noncoding-added-bidi` | 150,726 | 37,834 | 188,560 |
|
| 45 |
|
| 46 |
+
The `noncoding-added-*` configs are an explicit extension from
|
| 47 |
[Gamba-Processing](https://github.com/TaykhoomDalal/Gamba-Processing), not an
|
| 48 |
additional category emitted by GAMBA's current `create_eval_data.py`.
|
| 49 |
|
| 50 |
+
## Choosing a context
|
| 51 |
+
|
| 52 |
+
The GAMBA paper uses context geometry matched to the model. Choose
|
| 53 |
+
`*-causal` for Evo2 or another left-to-right model: the ROI is at the end of
|
| 54 |
+
the strand-oriented window, so all preceding bases are usable context. Choose
|
| 55 |
+
`*-bidi` for GAMBA encoders, the distilled student, GPN-Star, PhyloGPN, or
|
| 56 |
+
another masked/bidirectional model: the ROI is centered so the model sees both
|
| 57 |
+
flanks. Using a causal file for a bidirectional model removes its right-side
|
| 58 |
+
context and is not the paper protocol.
|
| 59 |
+
|
| 60 |
## Loading
|
| 61 |
|
| 62 |
```python
|
|
|
|
| 64 |
|
| 65 |
canonical = load_dataset(
|
| 66 |
"Taykhoom/functional-random-gamba",
|
| 67 |
+
"canonical-bidi",
|
| 68 |
split="all",
|
| 69 |
)
|
| 70 |
train = canonical.filter(lambda row: row["split"] == "train")
|
|
|
|
| 81 |
| Column | Description |
|
| 82 |
|---|---|
|
| 83 |
| `split`, `label` | Probe/fine-tuning `train` or held-out `test`; labels are `feature` or `random`. |
|
| 84 |
+
| `sequence` | Strand-oriented causal or bidirectional context of at most 2,048 bp. |
|
| 85 |
+
| `context_policy` | `causal` for `*-causal`; `symmetric` for `*-bidi`. |
|
| 86 |
| `pair_id` | Shared identifier for a feature and its matched random control. |
|
| 87 |
| `category`, `scope` | Functional class and pooling scope. |
|
| 88 |
| `chrom`, `start`, `end`, `strand` | Zero-based, half-open hg38 feature/control coordinates. |
|
functional-random-gamba-bidi.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6aa3c4204755c077c37320c3d4124a9d32743443613cce8c74ed6f7e8ca3cac8
|
| 3 |
+
size 117291976
|
functional-random-gamba-causal.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c474c64c2fff698783c08dae7d631c941acee273cde83c0c4c106e9ec1b128db
|
| 3 |
+
size 112636347
|
functional-random-gamba-noncoding-added-bidi.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:20812503824741b2607708cb76dc95ad5842f1f7517309ceb0de026932cb0e0c
|
| 3 |
+
size 130059181
|
functional-random-gamba-noncoding-added-causal.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2fb764b8225b917238df430329bfb9e30af4140f8fceccfd56ed63fdb7381bec
|
| 3 |
+
size 122771891
|