| --- |
| license: cc-by-4.0 |
| task_categories: |
| - fill-mask |
| - feature-extraction |
| tags: |
| - protein |
| - proteins |
| - antibody |
| - immunology |
| - biology |
| - bioinformatics |
| - protein-language-model |
| - fasta |
| - sequence-clustering |
| pretty_name: OAS (Observed Antibody Space, Paired) — FLAIR Preprocessed |
| size_categories: |
| - 1M<n<10M |
| configs: |
| - config_name: default |
| data_files: |
| - split: train |
| path: "train/*.parquet" |
| --- |
| |
| # Dataset Card for `flair-bio/oas` |
|
|
| ## Dataset Summary |
|
|
| This dataset is a cleaned and quality-scored version of the **paired heavy/light chain subset of |
| the Observed Antibody Space (OAS)** database (Oxford Protein Informatics Group), a large |
| repository of Next-Generation Sequencing (NGS) antibody repertoires. It has been reprocessed by |
| the [FLAIR](https://github.com/flair-bio/amplify) `modules/data` pipeline into a single |
| training-ready Parquet dataset (sharded — one shard per source study/run), with per-sequence |
| redundancy reduction (MMseqs2 cascaded clustering) and quality scores (RED — Residue Embedding |
| Diversity) added, for use in pretraining antibody/protein language models. |
|
|
| - **Curated by:** FLAIR (Mila / flair-bio) |
| - **Source data:** [Observed Antibody Space (OAS), paired sequences](https://opig.stats.ox.ac.uk/webapps/oas/) (Oxford Protein Informatics Group) |
| - **Language(s):** Not applicable (protein sequences; header/metadata text is English) |
| - **License:** [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) for the FLAIR-processed |
| release, consistent with the original OAS terms; please review [OAS's terms of use](https://opig.stats.ox.ac.uk/webapps/oas/) for the underlying source data and constituent studies. |
|
|
| ## Dataset Details |
|
|
| ### Source Data & Provenance |
|
|
| Paired heavy/light antibody repertoire CSVs are downloaded directly from OPIG's OAS web service, |
| covering multiple published studies (e.g. Alsoiussi 2020, Eccles 2020, Goldstein 2019, Jaffe |
| 2022), one gzipped CSV per sequencing run: |
|
|
| ``` |
| https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/<Study_Year>/csv/<Run_ID>_paired.csv.gz |
| ``` |
|
|
| Each file is downloaded with `aria2c` (16-way split per file, single concurrent download). OAS is |
| a continuously growing database; the studies/runs included here were fetched in **August 2026**, |
| reflecting the most recent OAS snapshot available at that time — later OAS pulls may include |
| additional studies not present in this release. |
|
|
| ### Processing Pipeline |
|
|
| Processed by the shared FLAIR data pipeline |
| ([`modules/data`](https://github.com/flair-bio/amplify/tree/main/modules/data)), with an |
| OAS-specific preprocessing path: |
|
|
| ``` |
| Download → Preprocess → Cluster → Score → Assemble → Upload |
| ``` |
|
|
| 1. **Preprocess** — unlike the FASTA-based datasets, OAS is read directly from the paired CSVs |
| with pandas. Rows where ANARCI flags either chain as `"Shorter"` are dropped. Each retained |
| pair is written as a FASTA record (`heavy_seq` + `XXXXX` linker + `light_seq`, used for |
| statistics only) and, since the source already provides structured columns, the base Parquet |
| shard is written **directly from the CSV** (one shard per source run), bypassing the generic |
| FASTA→Parquet conversion. Each pair is assigned a unique, collision-free ID of the form |
| `OAS_000000000000` (a dataset prefix followed by a zero-padded 12-digit counter). |
| 2. **Cluster** — cascaded MMseqs2 (`easy-linclust`) redundancy reduction at identity thresholds |
| `[0.99, 0.98, 0.97, 0.96, 0.95, 0.94, 0.93, 0.92, 0.91, 0.9, 0.85, 0.8]` (coverage threshold |
| `0.95`) — notably finer-grained and higher-identity than the other FLAIR datasets, reflecting |
| the naturally lower diversity/higher similarity of paired antibody sequences. |
| 3. **Score** — each paired sequence is scored with the **RED** (Residue Embedding Diversity) |
| metric using `flair-bio/amplify-350m` as the embedding model. |
| 4. **Assemble** — base sequences, cluster assignments, and RED scores are joined on the shared |
| `sequence_id` into the final sharded Parquet dataset published here (one output shard per |
| source run). |
|
|
| ### Dataset Structure |
|
|
| One `train` split, stored as multiple Parquet shards (`train/*.parquet`, one shard per source |
| sequencing run). |
|
|
| | Column | Type | Description | |
| |---|---|---| |
| | `sequence_id` | string | Unique FLAIR-assigned ID (`OAS_{12-digit counter}`) | |
| | `original_id` | string | Original OAS pair identifier | |
| | `description` | string | Remaining original header text | |
| | `sequence` | string | Paired sequence: `heavy_seq` + `XXXXX` linker + `light_seq` | |
| | `cluster_rep_at_99` … `cluster_rep_at_80` | string | Cluster representative ID at each identity threshold (99%, 98%, 97%, 96%, 95%, 94%, 93%, 92%, 91%, 90%, 85%, 80%) | |
| | `dataset_id` | string | Source dataset identifier stamp (`oas`) | |
| | `sequence_length` | uint32 | Combined paired sequence length in residues (including linker) | |
| | `red_score` | float16 | RED (Residue Embedding Diversity) quality score | |
|
|
| ### Data Statistics |
|
|
| Computed over the full assembled dataset: |
|
|
| | Statistic | Value | |
| |---|---| |
| | Number of sequences (pairs) | 1,887,487 | |
| | Sequence length — min / mean / median / max | 212 / 232.6 / 232.0 / 277 | |
| | Sequence length — std | 4.54 | |
| | Total residues (sum of lengths) | 439,101,472 | |
| | RED score — mean / median / std | 0.0858 / 0.0825 / 0.0287 | |
| | RED score — min / max | 0.0327 / 0.734 | |
| | RED score — p1 / p5 / p25 / p75 / p95 / p99 | 0.0600 / 0.0666 / 0.0756 / 0.0901 / 0.1065 / 0.1704 | |
| | Ambiguous residues (count) | 0 | |
| | Sequences containing ambiguous residues | 0 (0.0%) | |
| | Cluster count @ `cluster_rep_at_80` / `_at_90` / `_at_99` | 1,117,924 / 1,559,067 / 1,787,995 | |
|
|
| ## Uses |
|
|
| Intended for self-supervised pretraining (e.g., masked language modeling) and representation |
| learning of antibody/protein language models, particularly modeling heavy/light chain co- |
| occurrence. The `cluster_rep_at_*` columns allow downstream users to subsample at a desired |
| redundancy level, and `red_score` can be used to filter or weight sequences by estimated |
| informational diversity. |
|
|
| ## Bias, Risks, and Limitations |
|
|
| - OAS aggregates repertoires from multiple studies/donors/species; sampling depth, immunization |
| status, and health/disease state vary by source study and are not exhaustively normalized here. |
| - The `XXXXX` linker is an artificial separator introduced for sequence-level modeling and stats |
| computation; it is not a biological sequence. |
| - RED scores are a heuristic computed from a specific pLM's embeddings (`flair-bio/amplify-350m`) |
| and should not be interpreted as a ground-truth quality or functional label. |
| - Clustering provides an approximate indication of protein relatedness. These datasets use |
| MMseqs2 Linclust, and resulting clusters can vary depending on the clustering algorithm and |
| its parameters. |
| - Antibody sequences are naturally low-diversity relative to general proteomes; even at the |
| finest clustering threshold (99%), many near-identical sequences may remain. |
|
|
| ## Citation |
|
|
| If you use this dataset, please cite the original OAS source, MMseqs2, RED, and FLAIR: |
|
|
| ```bibtex |
| @article{steinegger2017mmseqs2, |
| title = {MMseqs2 enables sensitive protein sequence searching for the analysis of massive sequence datasets}, |
| author = {Steinegger, Martin and S{\"o}ding, Johannes}, |
| journal = {Nature Biotechnology}, |
| volume = {35}, |
| pages = {1026--1028}, |
| year = {2017}, |
| doi = {10.1038/nbt.3988} |
| } |
| ``` |
|
|
| ```bibtex |
| @article{lebreton2026plm, |
| title = {pLM representations unlock metagenomic space beyond homology}, |
| author = {Le Breton, Lola and Heurtel-Depeiges, David and Millar, Douglas C. and Zetzsche, Lara E. and Vernon, Robert M. and Langmead, Christopher James and Chandar, Sarath and Fournier, Quentin}, |
| journal = {bioRxiv}, |
| year = {2026}, |
| doi = {10.64898/2026.07.28.739874} |
| } |
| ``` |
|
|
| ```bibtex |
| @article{oas, |
| title = {Observed Antibody Space: A diverse database of cleaned, annotated, and translated unpaired and paired antibody sequences}, |
| author = {Olsen, Tobias H. and Boyles, Fergus and Deane, Charlotte M.}, |
| journal = {Protein Science}, |
| year = {2022}, |
| doi = {10.1002/pro.4205} |
| } |
| ``` |
|
|
| ```bibtex |
| @misc{flair-plm, |
| title = {FLAIR: Protein Language Model Pretraining Data Pipeline}, |
| author = {{Applied Machine Learning Research Team (AMLRT) collaborators at Mila and FLAIR-bio research students}}, |
| howpublished = {\url{https://github.com/flair-bio/amplify/tree/main/modules/data}}, |
| } |
| ``` |
|
|