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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- biology
|
| 7 |
+
- proteins
|
| 8 |
+
- enzymes
|
| 9 |
+
- ec-number
|
| 10 |
+
- genomics
|
| 11 |
+
- protein-function-prediction
|
| 12 |
+
pretty_name: GRIMM (EC) — Genomic Representation Inference for Microbial Metabolism
|
| 13 |
+
task_categories:
|
| 14 |
+
- text-classification
|
| 15 |
+
size_categories:
|
| 16 |
+
- 100K<n<1M
|
| 17 |
+
configs:
|
| 18 |
+
- config_name: EC_v2_amino_acids
|
| 19 |
+
default: true
|
| 20 |
+
data_files:
|
| 21 |
+
- split: split1_train
|
| 22 |
+
path: EC_v2/amino_acids/split_1/train.csv
|
| 23 |
+
- split: split1_validation
|
| 24 |
+
path: EC_v2/amino_acids/split_1/validation.csv
|
| 25 |
+
- split: split1_test1
|
| 26 |
+
path: EC_v2/amino_acids/split_1/test1.csv
|
| 27 |
+
- split: split1_test2
|
| 28 |
+
path: EC_v2/amino_acids/split_1/test2.csv
|
| 29 |
+
- split: split2_train
|
| 30 |
+
path: EC_v2/amino_acids/split_2/train.csv
|
| 31 |
+
- split: split2_validation
|
| 32 |
+
path: EC_v2/amino_acids/split_2/validation.csv
|
| 33 |
+
- split: split2_test1
|
| 34 |
+
path: EC_v2/amino_acids/split_2/test1.csv
|
| 35 |
+
- split: split2_test2
|
| 36 |
+
path: EC_v2/amino_acids/split_2/test2.csv
|
| 37 |
+
- split: split3_train
|
| 38 |
+
path: EC_v2/amino_acids/split_3/train.csv
|
| 39 |
+
- split: split3_validation
|
| 40 |
+
path: EC_v2/amino_acids/split_3/validation.csv
|
| 41 |
+
- split: split3_test1
|
| 42 |
+
path: EC_v2/amino_acids/split_3/test1.csv
|
| 43 |
+
- split: split3_test2
|
| 44 |
+
path: EC_v2/amino_acids/split_3/test2.csv
|
| 45 |
+
- split: split4_train
|
| 46 |
+
path: EC_v2/amino_acids/split_4/train.csv
|
| 47 |
+
- split: split4_validation
|
| 48 |
+
path: EC_v2/amino_acids/split_4/validation.csv
|
| 49 |
+
- split: split4_test1
|
| 50 |
+
path: EC_v2/amino_acids/split_4/test1.csv
|
| 51 |
+
- split: split4_test2
|
| 52 |
+
path: EC_v2/amino_acids/split_4/test2.csv
|
| 53 |
+
- split: split5_train
|
| 54 |
+
path: EC_v2/amino_acids/split_5/train.csv
|
| 55 |
+
- split: split5_validation
|
| 56 |
+
path: EC_v2/amino_acids/split_5/validation.csv
|
| 57 |
+
- split: split5_test1
|
| 58 |
+
path: EC_v2/amino_acids/split_5/test1.csv
|
| 59 |
+
- split: split5_test2
|
| 60 |
+
path: EC_v2/amino_acids/split_5/test2.csv
|
| 61 |
+
- config_name: EC_v2_nucleotides
|
| 62 |
+
data_files:
|
| 63 |
+
- split: split1_train
|
| 64 |
+
path: EC_v2/nucleotides/split_1/train.csv
|
| 65 |
+
- split: split1_validation
|
| 66 |
+
path: EC_v2/nucleotides/split_1/validation.csv
|
| 67 |
+
- split: split1_test1
|
| 68 |
+
path: EC_v2/nucleotides/split_1/test1.csv
|
| 69 |
+
- split: split1_test2
|
| 70 |
+
path: EC_v2/nucleotides/split_1/test2.csv
|
| 71 |
+
- split: split2_train
|
| 72 |
+
path: EC_v2/nucleotides/split_2/train.csv
|
| 73 |
+
- split: split2_validation
|
| 74 |
+
path: EC_v2/nucleotides/split_2/validation.csv
|
| 75 |
+
- split: split2_test1
|
| 76 |
+
path: EC_v2/nucleotides/split_2/test1.csv
|
| 77 |
+
- split: split2_test2
|
| 78 |
+
path: EC_v2/nucleotides/split_2/test2.csv
|
| 79 |
+
- split: split3_train
|
| 80 |
+
path: EC_v2/nucleotides/split_3/train.csv
|
| 81 |
+
- split: split3_validation
|
| 82 |
+
path: EC_v2/nucleotides/split_3/validation.csv
|
| 83 |
+
- split: split3_test1
|
| 84 |
+
path: EC_v2/nucleotides/split_3/test1.csv
|
| 85 |
+
- split: split3_test2
|
| 86 |
+
path: EC_v2/nucleotides/split_3/test2.csv
|
| 87 |
+
- split: split4_train
|
| 88 |
+
path: EC_v2/nucleotides/split_4/train.csv
|
| 89 |
+
- split: split4_validation
|
| 90 |
+
path: EC_v2/nucleotides/split_4/validation.csv
|
| 91 |
+
- split: split4_test1
|
| 92 |
+
path: EC_v2/nucleotides/split_4/test1.csv
|
| 93 |
+
- split: split4_test2
|
| 94 |
+
path: EC_v2/nucleotides/split_4/test2.csv
|
| 95 |
+
- split: split5_train
|
| 96 |
+
path: EC_v2/nucleotides/split_5/train.csv
|
| 97 |
+
- split: split5_validation
|
| 98 |
+
path: EC_v2/nucleotides/split_5/validation.csv
|
| 99 |
+
- split: split5_test1
|
| 100 |
+
path: EC_v2/nucleotides/split_5/test1.csv
|
| 101 |
+
- split: split5_test2
|
| 102 |
+
path: EC_v2/nucleotides/split_5/test2.csv
|
| 103 |
+
- config_name: EC_v1_amino_acids
|
| 104 |
+
data_files:
|
| 105 |
+
- split: split1_train
|
| 106 |
+
path: EC_v1/amino_acids/split_1/train.csv
|
| 107 |
+
- split: split1_validation
|
| 108 |
+
path: EC_v1/amino_acids/split_1/validation.csv
|
| 109 |
+
- split: split1_test1
|
| 110 |
+
path: EC_v1/amino_acids/split_1/test1.csv
|
| 111 |
+
- split: split1_test2
|
| 112 |
+
path: EC_v1/amino_acids/split_1/test2.csv
|
| 113 |
+
- split: split2_train
|
| 114 |
+
path: EC_v1/amino_acids/split_2/train.csv
|
| 115 |
+
- split: split2_validation
|
| 116 |
+
path: EC_v1/amino_acids/split_2/validation.csv
|
| 117 |
+
- split: split2_test1
|
| 118 |
+
path: EC_v1/amino_acids/split_2/test1.csv
|
| 119 |
+
- split: split2_test2
|
| 120 |
+
path: EC_v1/amino_acids/split_2/test2.csv
|
| 121 |
+
- split: split3_train
|
| 122 |
+
path: EC_v1/amino_acids/split_3/train.csv
|
| 123 |
+
- split: split3_validation
|
| 124 |
+
path: EC_v1/amino_acids/split_3/validation.csv
|
| 125 |
+
- split: split3_test1
|
| 126 |
+
path: EC_v1/amino_acids/split_3/test1.csv
|
| 127 |
+
- split: split3_test2
|
| 128 |
+
path: EC_v1/amino_acids/split_3/test2.csv
|
| 129 |
+
- split: split4_train
|
| 130 |
+
path: EC_v1/amino_acids/split_4/train.csv
|
| 131 |
+
- split: split4_validation
|
| 132 |
+
path: EC_v1/amino_acids/split_4/validation.csv
|
| 133 |
+
- split: split4_test1
|
| 134 |
+
path: EC_v1/amino_acids/split_4/test1.csv
|
| 135 |
+
- split: split4_test2
|
| 136 |
+
path: EC_v1/amino_acids/split_4/test2.csv
|
| 137 |
+
- split: split5_train
|
| 138 |
+
path: EC_v1/amino_acids/split_5/train.csv
|
| 139 |
+
- split: split5_validation
|
| 140 |
+
path: EC_v1/amino_acids/split_5/validation.csv
|
| 141 |
+
- split: split5_test1
|
| 142 |
+
path: EC_v1/amino_acids/split_5/test1.csv
|
| 143 |
+
- split: split5_test2
|
| 144 |
+
path: EC_v1/amino_acids/split_5/test2.csv
|
| 145 |
+
- config_name: EC_v1_nucleotides
|
| 146 |
+
data_files:
|
| 147 |
+
- split: split1_train
|
| 148 |
+
path: EC_v1/nucleotides/split_1/train.csv
|
| 149 |
+
- split: split1_validation
|
| 150 |
+
path: EC_v1/nucleotides/split_1/validation.csv
|
| 151 |
+
- split: split1_test1
|
| 152 |
+
path: EC_v1/nucleotides/split_1/test1.csv
|
| 153 |
+
- split: split1_test2
|
| 154 |
+
path: EC_v1/nucleotides/split_1/test2.csv
|
| 155 |
+
- split: split2_train
|
| 156 |
+
path: EC_v1/nucleotides/split_2/train.csv
|
| 157 |
+
- split: split2_validation
|
| 158 |
+
path: EC_v1/nucleotides/split_2/validation.csv
|
| 159 |
+
- split: split2_test1
|
| 160 |
+
path: EC_v1/nucleotides/split_2/test1.csv
|
| 161 |
+
- split: split2_test2
|
| 162 |
+
path: EC_v1/nucleotides/split_2/test2.csv
|
| 163 |
+
- split: split3_train
|
| 164 |
+
path: EC_v1/nucleotides/split_3/train.csv
|
| 165 |
+
- split: split3_validation
|
| 166 |
+
path: EC_v1/nucleotides/split_3/validation.csv
|
| 167 |
+
- split: split3_test1
|
| 168 |
+
path: EC_v1/nucleotides/split_3/test1.csv
|
| 169 |
+
- split: split3_test2
|
| 170 |
+
path: EC_v1/nucleotides/split_3/test2.csv
|
| 171 |
+
- split: split4_train
|
| 172 |
+
path: EC_v1/nucleotides/split_4/train.csv
|
| 173 |
+
- split: split4_validation
|
| 174 |
+
path: EC_v1/nucleotides/split_4/validation.csv
|
| 175 |
+
- split: split4_test1
|
| 176 |
+
path: EC_v1/nucleotides/split_4/test1.csv
|
| 177 |
+
- split: split4_test2
|
| 178 |
+
path: EC_v1/nucleotides/split_4/test2.csv
|
| 179 |
+
- split: split5_train
|
| 180 |
+
path: EC_v1/nucleotides/split_5/train.csv
|
| 181 |
+
- split: split5_validation
|
| 182 |
+
path: EC_v1/nucleotides/split_5/validation.csv
|
| 183 |
+
- split: split5_test1
|
| 184 |
+
path: EC_v1/nucleotides/split_5/test1.csv
|
| 185 |
+
- split: split5_test2
|
| 186 |
+
path: EC_v1/nucleotides/split_5/test2.csv
|
| 187 |
+
---
|
| 188 |
+
|
| 189 |
+
# GRIMM-EC
|
| 190 |
+
|
| 191 |
+
GRIMM is a benchmark for predicting enzyme function (EC number) from biological
|
| 192 |
+
sequence. Sequences are reviewed (SwissProt) prokaryotic proteins with EC
|
| 193 |
+
annotations; partitions are stratified per label by UniRef50 cluster so that
|
| 194 |
+
homologous sequences do not leak between train and evaluation splits.
|
| 195 |
+
|
| 196 |
+
Two modalities are provided: **amino acids** (per-protein SwissProt sequences) and
|
| 197 |
+
**nucleotides** (per-CDS sequences from ENA).
|
| 198 |
+
|
| 199 |
+
## ⭐ Which version to use
|
| 200 |
+
|
| 201 |
+
| Path | Status | Use it? |
|
| 202 |
+
|------|--------|---------|
|
| 203 |
+
| **`EC_v2/`** | corrected, leakage-free, matches the current preprint | ✅ **Yes — all new work** |
|
| 204 |
+
| `EC_v1/` | original release (v1 preprint + parallel works); legacy | only to reproduce already-published v1 results |
|
| 205 |
+
|
| 206 |
+
## Structure
|
| 207 |
+
|
| 208 |
+
```
|
| 209 |
+
EC_v2/ (and EC_v1/)
|
| 210 |
+
amino_acids/ split_1 … split_5 / {train, validation, test1, test2}.csv
|
| 211 |
+
nucleotides/ split_1 … split_5 / {train, validation, test1, test2}.csv
|
| 212 |
+
```
|
| 213 |
+
|
| 214 |
+
Columns — amino acids: `Entry, EC number, EMBL, RefSeq, UniRef50, UniRef90, UniRef100, Sequence`;
|
| 215 |
+
nucleotides: `Entry` (EMBL CDS id), `EC number`, `Sequence`. Files are tab-separated.
|
| 216 |
+
|
| 217 |
+
The 5 folds are **not** a standard k-fold: each is an independent train/valid/test
|
| 218 |
+
partition that preserves UniRef50 clusters. Train and evaluate the 5 folds as
|
| 219 |
+
independent models (individually or as an ensemble), not as rotating CV folds.
|
| 220 |
+
|
| 221 |
+
### Splits
|
| 222 |
+
|
| 223 |
+
- **train / validation / test1** — closed-set: evaluation sequences whose labels also
|
| 224 |
+
appear in training, but held out by UniRef50 cluster.
|
| 225 |
+
- **test2** — open-set: sequences from labels **absent from training** (out-of-distribution).
|
| 226 |
+
|
| 227 |
+
### Labels
|
| 228 |
+
|
| 229 |
+
EC numbers (4th level). Proteins with multiple EC annotations are kept as a single
|
| 230 |
+
**compound label string** (e.g. `1.1.99.1;1.2.1.8`), distinct from its component
|
| 231 |
+
labels — they are **not** expanded into separate rows.
|
| 232 |
+
|
| 233 |
+
### Sizes (GRIMM-EC v2, average per fold)
|
| 234 |
+
|
| 235 |
+
| Modality | train | validation | test1 | test2 |
|
| 236 |
+
|----------|------:|-----------:|------:|------:|
|
| 237 |
+
| amino acids | ~178,053 | ~28,719 | ~29,689 | ~959 |
|
| 238 |
+
| nucleotides | ~251,745 | ~42,557 | ~45,185 | ~1,755 |
|
| 239 |
+
|
| 240 |
+
237,421 proteins · 6,393 EC labels (1,321 compound) · 65,996 UniRef50 clusters.
|
| 241 |
+
Sequences from UniProt release **2025_02**.
|
| 242 |
+
|
| 243 |
+
## How GRIMM-EC v2 is built (and how it differs from v1)
|
| 244 |
+
|
| 245 |
+
v2 reuses v1's UniRef50 cluster assignments but regenerates the splits to match the
|
| 246 |
+
documented method:
|
| 247 |
+
|
| 248 |
+
- **Per-protein SwissProt sequences** (release 2025_02) — v1's AA data instead held
|
| 249 |
+
the UniRef50 *representative* sequence.
|
| 250 |
+
- **Low-support labels split by UniRef50 cluster** — labels with 1–2 clusters are
|
| 251 |
+
partitioned by whole cluster (2 clusters → 1 train / 1 test1; 1 cluster → orphan,
|
| 252 |
+
~80% train / ~20% test2 across folds), not by individual sequence as in v1.
|
| 253 |
+
- **Independent, shuffled folds**; **seeded** for reproducibility.
|
| 254 |
+
- **`test2` is held-out only** (true open-set) — v1 inadvertently also wrote the
|
| 255 |
+
held-out orphans into train.
|
| 256 |
+
- EC labels normalized (stray whitespace stripped).
|
| 257 |
+
|
| 258 |
+
**Verified for v2 (all 5 folds, both modalities):** 0 `(sequence, EC)` overlap between
|
| 259 |
+
`train` and any evaluation split; 0 accession overlap between splits; `test2` labels
|
| 260 |
+
absent from train. Identical sequences carrying *different* EC labels may appear in
|
| 261 |
+
different splits — this is intended cross-label difficulty under per-label
|
| 262 |
+
stratification, not leakage.
|
| 263 |
+
|
| 264 |
+
## Known limitations of GRIMM-EC v1 (fixed in v2)
|
| 265 |
+
|
| 266 |
+
`EC_v1/` is retained for reproducibility of already-published results. Its `test2`
|
| 267 |
+
has been **corrected** to be fully disjoint from `train`/`validation`/`test1`;
|
| 268 |
+
`train`/`validation`/`test1` are **unchanged** from the original release. Remaining
|
| 269 |
+
v1 limitations (all fixed in v2):
|
| 270 |
+
|
| 271 |
+
1. AA sequences are UniRef50 **representatives**, not per-protein SwissProt sequences
|
| 272 |
+
(the nucleotide modality used real per-CDS sequences and is unaffected).
|
| 273 |
+
2. ~5.8% of AA `test1` rows (and ~4.1% of `validation`) share an exact sequence with
|
| 274 |
+
`train`, because 1–2 cluster labels were split by sequence rather than by cluster
|
| 275 |
+
(nucleotides: ~0.4%).
|
| 276 |
+
|
| 277 |
+
See the repository / preprint for full details.
|
| 278 |
+
|
| 279 |
+
## Citation
|
| 280 |
+
|
| 281 |
+
> Hoarfrost et al. GRIMM: Genomic Representation Inference for Microbial Metabolism. (preprint)
|
| 282 |
+
|
| 283 |
+
Code: https://github.com/Hoarfrost-Lab/grimm
|