File size: 7,561 Bytes
96a9d63
f770b38
 
 
 
 
 
 
 
 
 
 
 
d599a05
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96a9d63
f770b38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
---
license: mit
task_categories:
  - tabular-regression
tags:
  - protein
  - enzymes
  - pH
  - regression
  - biology
pretty_name: Optimal pH (EpHod pHopt)
size_categories:
  - 1K<n<10K
dataset_info:
  features:
    - name: seqs
      dtype: string
    - name: labels
      dtype: float64
    - name: Accession
      dtype: string
    - name: Organism
      dtype: string
    - name: EC Number
      dtype: string
  splits:
    - name: train
      num_bytes: 3461335
      num_examples: 7124
    - name: valid
      num_bytes: 372844
      num_examples: 760
    - name: test
      num_bytes: 954440
      num_examples: 1971
  download_size: 4258985
  dataset_size: 4788619
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
      - split: valid
        path: data/valid-*
      - split: test
        path: data/test-*
---

# Optimal pH (`optimal_ph`)

Enzyme optimum-pH (`pHopt`) regression dataset. Each row is a single enzyme
with its UniProt accession, amino acid sequence, and the experimentally
reported pH at which its catalytic activity is maximal. This is a
re-release of the exact train/valid/test split used in the EpHod paper
(Gado *et al.*, 2025), mirrored from the authors' Zenodo deposit and
reformatted for the Hugging Face `datasets` library.

- **Task:** regression (predict `labels` ∈ ℝ from `seqs`)
- **Input:** single-chain protein sequence (amino acids, length 32–1022)
- **Target:** optimum pH (typically ~1.0 to ~12.5, centered near 7)
- **n = 9,855** enzymes over 7,124 train / 760 valid / 1,971 test

## Columns

| column      | dtype  | description                                         |
|-------------|--------|-----------------------------------------------------|
| `seqs`      | string | single-letter amino acid sequence                   |
| `labels`    | float  | experimental pHopt (mean over BRENDA entries)       |
| `Accession` | string | UniProt accession                                   |
| `Organism`  | string | source organism (species) from UniProt              |
| `EC Number` | string | Enzyme Commission number                            |

## Splits

| split | rows  | note                                                       |
|-------|-------|------------------------------------------------------------|
| train | 7,124 | mmseqs2 clusters at 20% identity, 90% of non-test clusters |
| valid | 760   | 10% of non-test clusters                                   |
| test  | 1,971 | held-out 20% random sample of the full dataset             |

The split is inherited verbatim from the EpHod paper. The test set spans the
same pHopt distribution as training (not identity-held-out), so performance
on this split does **not** measure generalisation to dissimilar sequences by
itself. For that, use the paper's `Test <20% to Train` annotation (not
included here; available in the Zenodo deposit).

## Usage

```python
from datasets import load_dataset

ds = load_dataset("GleghornLab/optimal_ph")
print(ds)
print(ds["test"][0])
```

## Known caveat: sequence-level leakage

The authors' published split contains **24 byte-identical sequences that
appear in more than one split** (20 train↔test, 4 valid↔test). These are
orthologs, paralogs, or reviewed/unreviewed pairs with different UniProt
accessions but identical amino acid strings. Some pairs have conflicting
pHopt labels or different EC annotations, which puts a ceiling on test RMSE
for any model that memorises training examples.

9,855 accessions collapse to 9,774 unique sequences; 24 of the duplicates
cross split boundaries.

If you need a leakage-free split, de-duplicate by sequence or re-cluster
train+valid+test jointly before training.

## Construction

This Hub dataset was built from the authors' raw `pHopt_data.csv` (Zenodo
deposit linked below) with the following one-shot transform:

```python
import pandas as pd
from datasets import Dataset, DatasetDict

SPLIT_MAP = {"Training": "train", "Validation": "valid", "Testing": "test"}
KEEP_COLS = ["seqs", "labels", "Accession", "Organism", "EC Number"]

df = pd.read_csv("pHopt_data.csv", index_col=0)
df = df.rename(columns={"Sequence": "seqs", "pHopt": "labels"})
df = df.drop(columns=["Sample Weight", "Test <20% to Train"])

dsd = DatasetDict({
    new_name: Dataset.from_pandas(
        df[df["Split"] == raw_name][KEEP_COLS].reset_index(drop=True),
        preserve_index=False,
    )
    for raw_name, new_name in SPLIT_MAP.items()
})
dsd.push_to_hub("GleghornLab/optimal_ph")
```

## Source data

- **BRENDA** (accessed 2022-05-25): 49,227 pH-optimum entries; 11,174 had
  UniProt sequence mappings. Multiple entries per sequence were averaged if
  within 1.0 pH unit, else dropped. Sequences <32 or >1022 aa were dropped,
  leaving 9,855.
- **UniProt**: canonical sequences for the retained accessions.
- **Split**: 20% random holdout → test; remaining clustered with MMseqs2 at
  20% identity, 90/10 cluster split → train/valid.

## License

Released under MIT to match the [EpHod code release](https://github.com/jafetgado/EpHod).
Underlying BRENDA and UniProt data are subject to their own terms
(BRENDA academic licence; UniProt CC BY 4.0); cite the sources below.

## Citations

EpHod paper (Nature Machine Intelligence, 2025):

```bibtex
@article{Gado2025EpHod,
  title   = {Deep learning prediction of enzyme optimum pH},
  author  = {Gado, Japheth E. and Knotts, Matthew and Shaw, Amber M. and
             Marks, Debora and Gauthier, Nicholas P. and Hopf, Thomas A. and
             Beckham, Gregg T.},
  journal = {Nature Machine Intelligence},
  year    = {2025},
  doi     = {10.1038/s42256-025-01026-6},
  url     = {https://www.nature.com/articles/s42256-025-01026-6}
}
```

bioRxiv preprint:

```bibtex
@article{Gado2023EpHodPreprint,
  title   = {Deep learning prediction of enzyme optimum pH},
  author  = {Gado, Japheth E. and Knotts, Matthew and Shaw, Amber M. and
             Marks, Debora and Gauthier, Nicholas P. and Hopf, Thomas A. and
             Beckham, Gregg T.},
  journal = {bioRxiv},
  year    = {2023},
  doi     = {10.1101/2023.06.22.544776},
  url     = {https://www.biorxiv.org/content/10.1101/2023.06.22.544776v2}
}
```

Zenodo data deposit (v1):

```bibtex
@dataset{Gado2024EpHodData,
  title     = {EpHod: Deep learning prediction of enzyme optimum pH (dataset)},
  author    = {Gado, Japheth E. and Knotts, Matthew and Shaw, Amber M. and
               Marks, Debora and Gauthier, Nicholas P. and Hopf, Thomas A. and
               Beckham, Gregg T.},
  publisher = {Zenodo},
  year      = {2024},
  doi       = {10.5281/zenodo.14252615},
  url       = {https://doi.org/10.5281/zenodo.14252615}
}
```

BRENDA (primary data source):

```bibtex
@article{Chang2021BRENDA,
  title   = {BRENDA, the ELIXIR core data resource in 2021: new developments
             and updates},
  author  = {Chang, Antje and Jeske, Lisa and Ulbrich, Sandra and Hofmann,
             Julia and Koblitz, Julia and Schomburg, Ida and Neumann-Schaal,
             Meina and Jahn, Dieter and Schomburg, Dietmar},
  journal = {Nucleic Acids Research},
  volume  = {49},
  number  = {D1},
  pages   = {D498--D508},
  year    = {2021},
  doi     = {10.1093/nar/gkaa1025}
}
```

UniProt (sequences):

```bibtex
@article{UniProt2023,
  title   = {UniProt: the Universal Protein Knowledgebase in 2023},
  author  = {{The UniProt Consortium}},
  journal = {Nucleic Acids Research},
  volume  = {51},
  number  = {D1},
  pages   = {D523--D531},
  year    = {2023},
  doi     = {10.1093/nar/gkac1052}
}
```