File size: 5,777 Bytes
889d030
 
4b6a235
889d030
 
 
4b6a235
889d030
 
 
 
 
 
5f99fd7
 
 
4b6a235
 
 
 
5f99fd7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
889d030
 
4b6a235
889d030
5f99fd7
 
 
4b6a235
5f99fd7
 
 
 
4b6a235
5f99fd7
4b6a235
5f99fd7
 
 
 
 
 
4b6a235
5f99fd7
4b6a235
5f99fd7
 
889d030
5f99fd7
 
 
 
 
889d030
5f99fd7
 
889d030
5f99fd7
237434f
d8eb6d7
237434f
5f99fd7
 
237434f
d8eb6d7
 
 
 
5f99fd7
 
d8eb6d7
5f99fd7
 
 
 
d8eb6d7
5f99fd7
 
 
 
 
 
889d030
5f99fd7
 
 
 
 
4b6a235
5f99fd7
4b6a235
5f99fd7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d8eb6d7
 
 
 
5f99fd7
4b6a235
5f99fd7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4b6a235
 
 
5f99fd7
 
 
4b6a235
 
889d030
4b6a235
5f99fd7
 
 
 
 
 
 
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
---
license: cc-by-4.0
pretty_name: UniProtKB Processed
size_categories:
  - 100M<n<1B
task_categories:
  - feature-extraction
language:
  - en
tags:
  - biology
  - proteins
  - uniprot
  - uniprotkb
  - swiss-prot
  - trembl
  - protein-sequences
  - bioinformatics
  - train-validation-test-split
configs:
  - config_name: sprot
    data_files:
      - split: train
        path:
          - tables/source_set=sprot/split=train/*.jsonl.gz
      - split: validation
        path:
          - tables/source_set=sprot/split=validation/*.jsonl.gz
      - split: test
        path:
          - tables/source_set=sprot/split=test/*.jsonl.gz
  - config_name: sprot_varsplic
    data_files:
      - split: train
        path:
          - tables/source_set=sprot_varsplic/split=train/*.jsonl.gz
      - split: validation
        path:
          - tables/source_set=sprot_varsplic/split=validation/*.jsonl.gz
      - split: test
        path:
          - tables/source_set=sprot_varsplic/split=test/*.jsonl.gz
  - config_name: trembl
    data_files:
      - split: train
        path:
          - tables/source_set=trembl/split=train/*.jsonl.gz
      - split: validation
        path:
          - tables/source_set=trembl/split=validation/*.jsonl.gz
      - split: test
        path:
          - tables/source_set=trembl/split=test/*.jsonl.gz
---

# UniProtKB Processed

This dataset is a table-friendly, split-aware version of LiteFold/UniProtKB.
It converts UniProtKB FASTA headers into normalized records that can be browsed
in the Hugging Face Dataset Viewer and loaded with the `datasets` library.

The table contains parsed protein metadata and deterministic train/validation/test
split assignments. To keep the dataset practical for table viewing, full amino
acid sequences are not duplicated here; each record includes `sequence_sha256`
for sequence-level identity and deduplication.

## Dataset Summary

| Source set | Description | Records |
|---|---|---:|
| `sprot` | Swiss-Prot reviewed canonical proteins | 574,627 |
| `sprot_varsplic` | Swiss-Prot alternative isoform sequences | 41,333 |
| `trembl` | TrEMBL unreviewed proteins | 202,556,314 |
| **Total** |  | **203,172,274** |

## Splits

Splits are deterministic and assigned from the exact amino-acid sequence hash.
Exact duplicate sequences are kept in the same split.

| Split | Records |
|---|---:|
| `train` | 162,548,965 |
| `validation` | 20,308,533 |
| `test` | 20,314,776 |

These are exact-sequence splits, not homology-cluster splits. For strict
homology-aware model evaluation, split again by UniRef/MMseqs cluster ids.

## Loading

Load Swiss-Prot reviewed entries:

```python
from datasets import load_dataset

sprot = load_dataset("LiteFold/UniProtKB", "sprot")
train = sprot["train"]
valid = sprot["validation"]
test = sprot["test"]
```

Load Swiss-Prot alternative isoforms:

```python
from datasets import load_dataset

isoforms = load_dataset("LiteFold/UniProtKB", "sprot_varsplic")
```

Load only TrEMBL:

```python
from datasets import load_dataset

trembl = load_dataset("LiteFold/UniProtKB", "trembl", streaming=True)
for row in trembl["train"]:
    print(row["accession"], row["protein_name"])
    break
```

Filter examples:

```python
from datasets import load_dataset

ds = load_dataset("LiteFold/UniProtKB", "sprot", split="train")
human = ds.filter(lambda x: x["taxon_id"] == 9606)
reviewed_kinases = human.filter(lambda x: "kinase" in x["protein_name"].lower())
```

For large-scale TrEMBL use, prefer streaming:

```python
from datasets import load_dataset

rows = load_dataset("LiteFold/UniProtKB", "trembl", split="train", streaming=True)
for row in rows:
    ...
```

Because the source sets are very different in size, this dataset does not define
a single mixed `default` config. Load one of `sprot`, `sprot_varsplic`, or
`trembl` explicitly.

## Columns

| Column | Type | Description |
|---|---|---|
| `record_id` | string | Full UniProt FASTA record id, e.g. `sp|Q6GZX4|001R_FRG3G` |
| `accession` | string | UniProt accession |
| `base_accession` | string | Accession without isoform suffix |
| `entry_name` | string | UniProt entry name |
| `reviewed` | bool | `true` for Swiss-Prot reviewed entries |
| `source_set` | string | `sprot`, `sprot_varsplic`, or `trembl` |
| `is_isoform` | bool | Whether the row is an isoform entry |
| `isoform_number` | int | Isoform suffix number, or `-1` if not applicable |
| `protein_name` | string | Parsed protein name from the FASTA header |
| `organism_name` | string | Parsed organism name |
| `taxon_id` | int | NCBI taxonomy id |
| `gene_name` | string | Parsed gene name, or `""` if unavailable |
| `protein_existence` | int | UniProt PE value, or `-1` if unavailable |
| `sequence_version` | int | UniProt sequence version, or `-1` if unavailable |
| `length` | int | Amino-acid sequence length |
| `sequence_sha256` | string | SHA-256 hash of the amino-acid sequence |
| `split` | string | `train`, `validation`, or `test` |

## Missing Values

For stable Hugging Face Dataset Viewer schema inference, table files do not use
JSON `null` values.

- Missing optional integer values are encoded as `-1`.
- Missing optional string values are encoded as `""`.

## Processing Notes

The public tables intentionally omit internal provenance columns such as raw
FASTA header, source shard, source file, record index, and split internals.
The postprocessing manifest is available in `_POSTPROCESS_MANIFEST.json`.

## Source

Derived from LiteFold/UniProtKB, which was built from UniProtKB FASTA releases.

Original source: UniProtKB.

## License

CC BY 4.0.

## Citation

If you use this dataset, cite UniProt:

The UniProt Consortium. UniProt: the Universal Protein Knowledgebase in 2023.
Nucleic Acids Research, 51(D1):D523-D531, 2023.