Datasets:
Rewrite the dataset card
Browse files
README.md
CHANGED
|
@@ -30,7 +30,6 @@ configs:
|
|
| 30 |
path: data/valid-*
|
| 31 |
- split: test
|
| 32 |
path: data/test-*
|
| 33 |
-
|
| 34 |
license: cc-by-4.0
|
| 35 |
language:
|
| 36 |
- en
|
|
@@ -46,177 +45,125 @@ pretty_name: PLAT (Protein Language Alignment Tuples)
|
|
| 46 |
task_categories:
|
| 47 |
- feature-extraction
|
| 48 |
- sentence-similarity
|
| 49 |
-
|
|
|
|
| 50 |
---
|
| 51 |
|
| 52 |
# PLAT: Protein Language Alignment Tuples
|
| 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 |
-
The full pipeline is four stages. All scripts live under [data/](data/) in the source repo.
|
| 127 |
-
|
| 128 |
-
### Stage 1: UniProt ingestion and annotation curation
|
| 129 |
-
|
| 130 |
-
- Input: `uniprotkb_go_manual_2025_11_18.tsv.gz` and `uniprotkb_go_manual_2025_12_02.tsv.gz`.
|
| 131 |
-
- [data/process_uniprot_av.py](data/process_uniprot_av.py) produces `camp_data.csv` (sequence + integer annotation list) and the `label2id.pkl` / `id2label.pkl` vocabulary files.
|
| 132 |
-
- [data/process_uniprot_cc.py](data/process_uniprot_cc.py) produces `seq_descriptions.tsv` (entry + sequence + structured description).
|
| 133 |
|
| 134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
|
| 136 |
-
|
| 137 |
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
Clustering and split assignment are performed by [data/build_dataset.py](data/build_dataset.py):
|
| 145 |
-
|
| 146 |
-
- Sequences are written to a FASTA file with integer IDs.
|
| 147 |
-
- CD-HIT is invoked inside a Docker container built from the official CD-HIT Dockerfile.
|
| 148 |
-
- **Identity threshold: 0.4** (40% sequence identity), word size `-n 5`. This is the threshold actually used for the published PLAT release, as recorded by the cluster filename `output_lhallee_camp_data_11_2025_0.4.clstr`.
|
| 149 |
-
- The `.clstr` output is parsed into `cluster_dict: {cluster_id -> [seq_ids]}` and `id_seq_dict: {seq_id -> sequence}`.
|
| 150 |
-
- Clusters are shuffled and partitioned:
|
| 151 |
-
- **5% valid clusters, 5% test clusters, 90% train clusters.**
|
| 152 |
-
- The four working pickles (`cluster_dict.pkl`, `id_seq_dict.pkl`, `final_cluster_dict.pkl`, `seq_annotation_dict.pkl`) are uploaded to an auxiliary private repo for reproducibility.
|
| 153 |
-
|
| 154 |
-
Because splits are assigned by cluster, any two sequences in different splits are less than ~40% identical under CD-HIT's greedy incremental clustering, which gives a realistic generalization benchmark for PLM alignment.
|
| 155 |
-
|
| 156 |
-
### Stage 4: PLAT assembly (preferential sampling)
|
| 157 |
-
|
| 158 |
-
[data/build_plat_data.py](data/build_plat_data.py) produces the final dataset:
|
| 159 |
-
|
| 160 |
-
1. For each cluster in each split, gather all member sequences.
|
| 161 |
-
2. Keep only sequences for which both an `annotation` and a `description` exist.
|
| 162 |
-
3. Keep only the subset whose `description` contains the literal substring `"Function:"` (that is, sequences with at least a UniProt `Function [CC]` annotation after text cleaning).
|
| 163 |
-
4. Pick one sequence uniformly at random from that subset (seed `42`).
|
| 164 |
-
5. If no candidate survives, **the cluster is skipped entirely**. This biases PLAT toward clusters containing at least one well-characterized member.
|
| 165 |
-
6. The resulting records (`sequence`, `annotation`, `description`) are assembled into a `DatasetDict(train, valid, test)` and pushed to `lhallee/plat_data`.
|
| 166 |
-
|
| 167 |
-
A final `labels` column of constant `0` is added by [data/add_dummy_labels.py](data/add_dummy_labels.py) for compatibility with generic `Trainer` pipelines.
|
| 168 |
-
|
| 169 |
-
## Reproducing the Build
|
| 170 |
-
|
| 171 |
-
```bash
|
| 172 |
-
# 1. Parse UniProt TSV into annotations + vocabulary
|
| 173 |
-
py -m data.process_uniprot_av
|
| 174 |
-
# -> camp_data.csv, label2id.pkl, id2label.pkl
|
| 175 |
-
# -> pushes lhallee/camp_data_11_2025
|
| 176 |
-
|
| 177 |
-
# 2. Parse UniProt TSV into descriptions
|
| 178 |
-
py -m data.process_uniprot_cc
|
| 179 |
-
# -> seq_descriptions.tsv
|
| 180 |
-
|
| 181 |
-
# 3. Cluster with CD-HIT and split by cluster (requires Docker)
|
| 182 |
-
py -m data.build_dataset \
|
| 183 |
-
--hf_token <token> \
|
| 184 |
-
--dataset_path lhallee/camp_data_11_2025 \
|
| 185 |
-
--similarity_threshold 0.4 \
|
| 186 |
-
--n 5 \
|
| 187 |
-
--valid_percentage 0.05 \
|
| 188 |
-
--test_percentage 0.05
|
| 189 |
-
|
| 190 |
-
# 4. Assemble PLAT with preferential Function-aware sampling
|
| 191 |
-
py -m data.build_plat_data \
|
| 192 |
-
--hf_token <token> \
|
| 193 |
-
--repo_name lhallee/plat_data \
|
| 194 |
-
--seed 42
|
| 195 |
-
```
|
| 196 |
-
|
| 197 |
-
## Intended Use
|
| 198 |
-
|
| 199 |
-
PLAT was constructed to train and evaluate representation-alignment models:
|
| 200 |
-
|
| 201 |
-
- **Vec2Vec**: align pooled (mean + variance) embeddings from one PLM to another, or from a PLM to a natural-language encoder of the `description` field.
|
| 202 |
-
- **Mat2Mat**: align full residue-by-residue embedding matrices between two PLMs.
|
| 203 |
-
- **Cross-modal retrieval**: use the `description` column with a text encoder (for example ModernBERT or GPT-OSS) and the `sequence` column with a PLM (for example ESMC-600), then evaluate whether aligned embeddings retrieve each other.
|
| 204 |
-
|
| 205 |
-
Typical consumption patterns in the source repo read columns as `(sequence, sequence)`, `(sequence, description)`, or `(description, description)` pairs.
|
| 206 |
-
|
| 207 |
-
## Licensing and Attribution
|
| 208 |
-
|
| 209 |
-
All sequences and annotations are derived from UniProtKB and are redistributed under the UniProt terms of use (Creative Commons Attribution 4.0, `CC BY 4.0`). If you use PLAT, please also cite UniProt:
|
| 210 |
|
| 211 |
> The UniProt Consortium. UniProt: the Universal Protein Knowledgebase in 2025. *Nucleic Acids Research*, 2025.
|
| 212 |
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
|
| 217 |
-
|
| 218 |
-
- **One representative per cluster.** Within-cluster diversity (paralogs, species variants) is not preserved: each cluster contributes a single randomly chosen, function-annotated representative.
|
| 219 |
-
- **Descriptions are post-processed.** PubMed citations, ECO evidence codes, and the CC-prefix tags are stripped, which simplifies downstream tokenization but loses provenance information relative to the raw UniProt text.
|
| 220 |
-
- **Integer annotation labels are only meaningful via `label2id.pkl`.** The integer space mixes eight annotation types; training code that treats it as a single flat multi-label target should be aware that different IDs correspond to semantically different taxonomies.
|
| 221 |
-
- **Snapshot-frozen.** PLAT is built from a fixed UniProt release (manual-GO subset, November-December 2025) and will not reflect later curation updates until rebuilt.
|
| 222 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
path: data/valid-*
|
| 31 |
- split: test
|
| 32 |
path: data/test-*
|
|
|
|
| 33 |
license: cc-by-4.0
|
| 34 |
language:
|
| 35 |
- en
|
|
|
|
| 45 |
task_categories:
|
| 46 |
- feature-extraction
|
| 47 |
- sentence-similarity
|
| 48 |
+
size_categories:
|
| 49 |
+
- 10K<n<100K
|
| 50 |
---
|
| 51 |
|
| 52 |
# PLAT: Protein Language Alignment Tuples
|
| 53 |
|
| 54 |
+
Every row of PLAT describes one protein three ways: its amino acid sequence, the typed functional
|
| 55 |
+
annotations UniProt curators gave it, and the free text they wrote about it. The three views share no
|
| 56 |
+
input, so PLAT is a test bed for asking whether the embedding spaces of protein language models,
|
| 57 |
+
annotation encoders and text encoders can be aligned or translated into one another. It holds 67,402
|
| 58 |
+
UniProtKB proteins with curated GO terms, one function-annotated representative per 40% identity cluster, split by
|
| 59 |
+
cluster into train, validation and test. It was built for the Gleghorn Lab's study of embedding
|
| 60 |
+
translation between protein representation spaces, whose frozen embeddings of these rows are in
|
| 61 |
+
[GleghornLab/vec2vec_embeddings](https://huggingface.co/datasets/GleghornLab/vec2vec_embeddings).
|
| 62 |
+
|
| 63 |
+
| | |
|
| 64 |
+
|---|---|
|
| 65 |
+
| Task | Cross-view alignment and retrieval: sequence, annotation, description |
|
| 66 |
+
| Rows | 60,666 train, 3,316 valid, 3,420 test |
|
| 67 |
+
| Homology | Clustered at 40% identity before the split; not disjoint under a stricter later screen (below) |
|
| 68 |
+
| Source | UniProtKB entries with manually curated GO terms, release 2025_04 |
|
| 69 |
+
| Licence | CC BY 4.0 |
|
| 70 |
+
|
| 71 |
+
## Homology leakage
|
| 72 |
+
|
| 73 |
+
**Intended: 40% identity, by cluster.** Proteins were clustered with CD-HIT at 40% identity and whole
|
| 74 |
+
clusters were assigned to one split, so no sequence appears in two splits.
|
| 75 |
+
|
| 76 |
+
**Measured afterwards: not homology-disjoint.** CD-HIT's greedy clustering does not guarantee that
|
| 77 |
+
members of different clusters fall below the threshold, and the cluster assignment was not kept. A
|
| 78 |
+
later screen with CD-HIT-2D, counting a pair when it reached 40% global identity over at least 80% of
|
| 79 |
+
both sequences, found:
|
| 80 |
+
|
| 81 |
+
| Held-out split | Proteins with a qualifying neighbor | Share |
|
| 82 |
+
|---|---|---|
|
| 83 |
+
| valid, in train | 423 of 3,316 | 12.76% |
|
| 84 |
+
| test, in train | 430 of 3,420 | 12.57% |
|
| 85 |
+
| test, in valid | 50 of 3,420 | 1.46% |
|
| 86 |
+
| test, in train or valid | 454 of 3,420 | 13.27% |
|
| 87 |
+
|
| 88 |
+
No exact sequence is shared between splits. For a strictly remote-homology evaluation, drop the 454
|
| 89 |
+
test proteins with a neighbor, or recluster.
|
| 90 |
+
|
| 91 |
+
## How it was built
|
| 92 |
+
|
| 93 |
+
1. Read the UniProtKB entries with manually curated GO annotations, exported on 18 November 2025 (for
|
| 94 |
+
annotations) and 2 December 2025 (for free text) from release 2025_04; 1,380,840 entries each.
|
| 95 |
+
2. Built the typed annotation list of each entry from eight fields: GO biological process, cellular
|
| 96 |
+
component and molecular function, EC number, cofactor, InterPro, Gene3D and UniProt keywords. Each
|
| 97 |
+
term became a typed key such as `GO:0016310_bp` or `1.1.1.1_ec`, and each key an integer id.
|
| 98 |
+
3. Built the description of each entry from the Function, Miscellaneous, Subcellular location and
|
| 99 |
+
Domain comments, each under its own header, with PubMed citations, ECO evidence codes and the
|
| 100 |
+
comment prefixes removed.
|
| 101 |
+
4. Removed exact duplicate sequences.
|
| 102 |
+
5. Clustered the sequences with CD-HIT at 40% identity (word size 5) and assigned whole clusters to
|
| 103 |
+
train, validation and test in the proportions 90, 5 and 5, after a shuffle.
|
| 104 |
+
6. From each cluster, kept the members that had both annotations and a description containing
|
| 105 |
+
Function text, and drew one of them at random (seed 42). A cluster with no such member was dropped,
|
| 106 |
+
so PLAT leans toward well characterized families.
|
| 107 |
+
7. Added a constant `labels` column so generic training loops that expect one run unchanged.
|
| 108 |
+
|
| 109 |
+
## Columns
|
| 110 |
+
|
| 111 |
+
| Column | Type | What it is |
|
| 112 |
+
|---|---|---|
|
| 113 |
+
| `sequence` | string | Canonical amino acid sequence, single-letter code; median length 403, longest 8,923 |
|
| 114 |
+
| `annotation` | list of int | Sorted, deduplicated typed annotation ids; median 18 per protein, 56,868 distinct ids in use |
|
| 115 |
+
| `description` | string | UniProt curator text under `Function:` and, when present, `Miscellaneous:`, `Subcellular Localization:` and `Domain:` headers; median 339 characters |
|
| 116 |
+
| `labels` | int | Always 0; a placeholder, not a label |
|
| 117 |
+
|
| 118 |
+
The integer ids index the Annotation Vocabulary (Hallee et al., 2024), here built from this UniProt
|
| 119 |
+
release with about 88,000 typed keys across the eight annotation types. The id to key mapping is not
|
| 120 |
+
yet published with this dataset.
|
| 121 |
+
|
| 122 |
+
## Example rows
|
| 123 |
+
|
| 124 |
+
From the test split, sequences and lists shortened.
|
| 125 |
+
|
| 126 |
+
| sequence | annotation | description |
|
| 127 |
+
|---|---|---|
|
| 128 |
+
| `MDKKEILKEFSADPDKYYNV...` (889 aa) | 31 ids: 6315, 8144, 24978, ... | Function: Catalyzes the attachment of alanine to tRNA(Ala) in a two-step reaction... |
|
| 129 |
+
| `MSHQTGIKGNVELISFFGKC...` (344 aa) | 18 ids: 9957, 10213, 11596, ... | Function: Actin-binding protein involved in motile and morphological processes. Inhibits actin polymerization... Subcellular Localization: Cytoplasm, cell cortex. Cytoplasm, cytoskeleton. |
|
| 130 |
+
| `MTISMISPSSIRLSSDKRDS...` (410 aa) | 23 ids: 9619, 15796, 18993, ... | Function: Promotes excretion of zinc from intestinal cells into the intestinal lumen in response to increased dietary zinc... |
|
| 131 |
+
|
| 132 |
+
```python
|
| 133 |
+
from datasets import load_dataset
|
| 134 |
+
|
| 135 |
+
plat = load_dataset("GleghornLab/plat_data")
|
| 136 |
+
row = plat["test"][0]
|
| 137 |
+
row["sequence"], row["annotation"], row["description"]
|
| 138 |
```
|
| 139 |
|
| 140 |
+
## What a model trained on it may say
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
|
| 142 |
+
A model trained on PLAT maps one view of a protein to another: a sequence embedding to an annotation or
|
| 143 |
+
description embedding, or back. A good retrieval score says the views of the same protein can be found
|
| 144 |
+
from each other among held-out proteins. It does not say the model understands protein function: a
|
| 145 |
+
sequence-only control can retrieve well through shared input alone, and about one held-out protein in
|
| 146 |
+
eight has a close relative in train. Every protein has curated GO terms and Function text, so the
|
| 147 |
+
dataset says little about poorly characterized proteins.
|
| 148 |
|
| 149 |
+
## Sources and licence
|
| 150 |
|
| 151 |
+
All sequences, annotations and descriptions come from
|
| 152 |
+
[UniProtKB](https://www.uniprot.org), redistributed under its
|
| 153 |
+
[CC BY 4.0 licence](https://www.uniprot.org/help/license). The annotation types draw on the Gene
|
| 154 |
+
Ontology, the IUBMB Enzyme Commission, InterPro, CATH-Gene3D and the UniProt keywords. If you use PLAT,
|
| 155 |
+
please cite UniProt:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
|
| 157 |
> The UniProt Consortium. UniProt: the Universal Protein Knowledgebase in 2025. *Nucleic Acids Research*, 2025.
|
| 158 |
|
| 159 |
+
Limits worth knowing: only entries with manually curated GO terms were read, so taxa that curators have
|
| 160 |
+
studied little are thin here; each cluster contributes one protein, so paralogs and species variants are absent; the
|
| 161 |
+
descriptions lose their citations and evidence codes; and the data reflect one UniProt release.
|
| 162 |
|
| 163 |
+
## Files
|
|
|
|
|
|
|
|
|
|
|
|
|
| 164 |
|
| 165 |
+
| File | What it is |
|
| 166 |
+
|---|---|
|
| 167 |
+
| `data/train-00000-of-00001.parquet` | 60,666 training rows |
|
| 168 |
+
| `data/valid-00000-of-00001.parquet` | 3,316 validation rows |
|
| 169 |
+
| `data/test-00000-of-00001.parquet` | 3,420 test rows |
|