| --- |
| pretty_name: Gene Ontology Annotation UniProt Sample |
| license: other |
| tags: |
| - biology |
| - gene-ontology |
| - goa |
| - uniprot |
| - protein-annotation |
| - gaf |
| - gpa |
| - parquet |
| configs: |
| - config_name: default |
| data_files: |
| - split: train |
| path: data/train-*.parquet |
| - split: test |
| path: data/test-*.parquet |
| --- |
| |
| # Gene Ontology Annotation UniProt |
|
|
| GOA provides high-quality, evidence-coded Gene Ontology annotations for UniProtKB proteins, RNAs, and protein complexes. |
|
|
| This dataset contains the original GOA UniProt source files plus a viewer-friendly Parquet sample/index table. The source `goa_uniprot_all.gaf.gz` and `goa_uniprot_all.gpa.gz` files are very large, so the default Dataset Viewer table contains the first 50,000 parsed annotation rows from each source file, along with a source-file manifest in `metadata/source_files.parquet`. |
| Use the original compressed files for complete GOA coverage. Use the default Parquet table for quick inspection, schema discovery, examples, and Dataset Viewer previews. |
|
|
| ## Splits |
|
|
| The split is deterministic by `annotation_id`: `sha256(annotation_id) % 10`. Bucket `0` is `test`; buckets `1` through `9` are `train`. |
|
|
| | Split | Rows | |
| |---|---:| |
| | train | 89,958 | |
| | test | 10,042 | |
| | total | 100,000 | |
|
|
| ## Source Files |
|
|
| | File | Size | |
| |---|---:| |
| | `goa_uniprot_all.gaf.gz` | 15,387,303,487 bytes | |
| | `goa_uniprot_all.gpa.gz` | 9,462,421,263 bytes | |
|
|
| ## Usage |
|
|
| ```bash |
| pip install datasets |
| ``` |
|
|
| Load the viewer table: |
|
|
| ```python |
| from datasets import load_dataset |
| |
| ds = load_dataset("LiteFold/GOA") |
| print(ds) |
| print(ds["train"][0]) |
| ``` |
|
|
| Load one split: |
|
|
| ```python |
| from datasets import load_dataset |
| |
| train = load_dataset("LiteFold/GOA", split="train") |
| test = load_dataset("LiteFold/GOA", split="test") |
| ``` |
|
|
| Stream rows: |
|
|
| ```python |
| from datasets import load_dataset |
| |
| stream = load_dataset("LiteFold/GOA", split="train", streaming=True) |
| for row in stream.take(5): |
| print(row["db_object_id"], row["go_id"], row["evidence_code"]) |
| ``` |
|
|
| Filter the sample for molecular-function GAF rows: |
|
|
| ```python |
| from datasets import load_dataset |
| |
| ds = load_dataset("LiteFold/GOA", split="train") |
| mf = ds.filter(lambda row: row["source_format"] == "GAF" and row["aspect"] == "F") |
| print(mf[0]) |
| ``` |
|
|
| Download the source manifest: |
|
|
| ```python |
| import pandas as pd |
| from huggingface_hub import hf_hub_download |
| |
| path = hf_hub_download( |
| repo_id="LiteFold/GOA", |
| repo_type="dataset", |
| filename="metadata/source_files.parquet", |
| ) |
| source_files = pd.read_parquet(path) |
| print(source_files) |
| ``` |
|
|
| Download the full raw files when needed: |
|
|
| ```python |
| from huggingface_hub import hf_hub_download |
| |
| gaf_path = hf_hub_download( |
| repo_id="LiteFold/GOA", |
| repo_type="dataset", |
| filename="goa_uniprot_all.gaf.gz", |
| ) |
| ``` |
|
|
| ## Columns |
|
|
| | Column | Description | |
| |---|---| |
| | `annotation_id` | Stable SHA-256 ID for the sampled annotation row. | |
| | `source_file` | Source file: GAF or GPA. | |
| | `source_format` | Parsed source format, `GAF` or `GPA`. | |
| | `source_row_number` | Row number within the source annotation stream. | |
| | `db` | Source database. | |
| | `db_object_id` | Annotated object identifier. | |
| | `db_object_symbol` | GAF object symbol, when available. | |
| | `qualifier` | Raw qualifier field. | |
| | `qualifiers` | Qualifier field split on `|`. | |
| | `go_id` | GO identifier. | |
| | `db_references` | References split on `|`. | |
| | `evidence_code` | GO or ECO evidence code. | |
| | `with_from` | With/from field split on `|`. | |
| | `aspect` | GAF aspect: `F`, `P`, or `C`; missing for GPA rows. | |
| | `db_object_name` | GAF object name, when available. | |
| | `db_object_synonyms` | GAF synonyms split on `|`. | |
| | `db_object_type` | GAF object type, when available. | |
| | `taxon_ids` | GAF taxon IDs split on `|`. | |
| | `interacting_taxon_id` | GPA interacting taxon ID, when available. | |
| | `date` | Annotation date. | |
| | `assigned_by` | Annotation provider. | |
| | `annotation_extension` | Annotation extension field. | |
| | `gene_product_form_id` | Gene product form identifier. | |
| | `split_bucket` | Deterministic split bucket from `sha256(annotation_id) % 10`. | |
|
|
| # Citaton |
|
|
| ``` |
| @article{huntley2015goa, |
| title = {The {GOA} database: Gene Ontology annotation updates for 2015}, |
| author = {Huntley, Rachael P. and Sawford, Tony and Mutowo-Meullenet, Prudence and Shypitsyna, Aleksandra and Bonilla, Carlos and Martin, Maria Jesus and O'Donovan, Claire}, |
| journal = {Nucleic Acids Research}, |
| volume = {43}, |
| number = {D1}, |
| pages = {D1057--D1063}, |
| year = {2015}, |
| doi = {10.1093/nar/gku1113} |
| } |
| ``` |