--- dataset_info: - config_name: all features: - name: id dtype: string - name: sequence dtype: string - name: go_terms sequence: string - name: stratum_id dtype: class_label: names: '0': '0' '1': '1' '2': '10' '3': '11' '4': '12' '5': '13' '6': '14' '7': '15' '8': '16' '9': '17' '10': '18' '11': '19' '12': '2' '13': '20' '14': '21' '15': '22' '16': '23' '17': '24' '18': '25' '19': '26' '20': '27' '21': '28' '22': '29' '23': '3' '24': '30' '25': '31' '26': '32' '27': '33' '28': '34' '29': '35' '30': '36' '31': '37' '32': '38' '33': '39' '34': '4' '35': '40' '36': '41' '37': '42' '38': '43' '39': '44' '40': '45' '41': '46' '42': '47' '43': '48' '44': '49' '45': '5' '46': '50' '47': '51' '48': '52' '49': '53' '50': '54' '51': '55' '52': '56' '53': '57' '54': '58' '55': '59' '56': '6' '57': '60' '58': '61' '59': '62' '60': '63' '61': '64' '62': '65' '63': '66' '64': '67' '65': '68' '66': '69' '67': '7' '68': '70' '69': '71' '70': '72' '71': '73' '72': '74' '73': '75' '74': '76' '75': '77' '76': '78' '77': '79' '78': '8' '79': '80' '80': '81' '81': '82' '82': '83' '83': '84' '84': '85' '85': '86' '86': '87' '87': '88' '88': '89' '89': '9' '90': '90' '91': '91' '92': '92' '93': '93' '94': '94' '95': '95' '96': '96' '97': '97' '98': '98' '99': '99' splits: - name: train num_bytes: 46281682.8 num_examples: 26802 - name: test num_bytes: 5142409.2 num_examples: 2978 download_size: 23665071 dataset_size: 51424092.0 - config_name: bp features: - name: id dtype: string - name: sequence dtype: string - name: go_terms sequence: string - name: stratum_id dtype: class_label: names: '0': '0' '1': '1' '2': '10' '3': '11' '4': '12' '5': '13' '6': '14' '7': '15' '8': '16' '9': '17' '10': '18' '11': '19' '12': '2' '13': '20' '14': '21' '15': '22' '16': '23' '17': '24' '18': '25' '19': '26' '20': '27' '21': '28' '22': '29' '23': '3' '24': '30' '25': '31' '26': '32' '27': '33' '28': '34' '29': '35' '30': '36' '31': '37' '32': '38' '33': '39' '34': '4' '35': '40' '36': '41' '37': '42' '38': '43' '39': '44' '40': '45' '41': '46' '42': '47' '43': '48' '44': '49' '45': '5' '46': '50' '47': '51' '48': '52' '49': '53' '50': '54' '51': '55' '52': '56' '53': '57' '54': '58' '55': '59' '56': '6' '57': '60' '58': '61' '59': '62' '60': '63' '61': '64' '62': '65' '63': '66' '64': '67' '65': '68' '66': '69' '67': '7' '68': '70' '69': '71' '70': '72' '71': '73' '72': '74' '73': '75' '74': '76' '75': '77' '76': '78' '77': '79' '78': '8' '79': '80' '80': '81' '81': '82' '82': '83' '83': '84' '84': '85' '85': '86' '86': '87' '87': '88' '88': '89' '89': '9' '90': '90' '91': '91' '92': '92' '93': '93' '94': '94' '95': '95' '96': '96' '97': '97' '98': '98' '99': '99' splits: - name: train num_bytes: 64510835.33632783 num_examples: 56203 - name: test num_bytes: 7168125.663672175 num_examples: 6245 download_size: 41521603 dataset_size: 71678961.0 - config_name: cc features: - name: id dtype: string - name: sequence dtype: string - name: go_terms sequence: string - name: stratum_id dtype: class_label: names: '0': '0' '1': '1' '2': '10' '3': '11' '4': '12' '5': '13' '6': '14' '7': '15' '8': '16' '9': '17' '10': '18' '11': '19' '12': '2' '13': '20' '14': '21' '15': '22' '16': '23' '17': '24' '18': '25' '19': '26' '20': '27' '21': '28' '22': '29' '23': '3' '24': '30' '25': '31' '26': '32' '27': '33' '28': '34' '29': '35' '30': '36' '31': '37' '32': '38' '33': '39' '34': '4' '35': '40' '36': '41' '37': '42' '38': '43' '39': '44' '40': '45' '41': '46' '42': '47' '43': '48' '44': '49' '45': '5' '46': '50' '47': '51' '48': '52' '49': '53' '50': '54' '51': '55' '52': '56' '53': '57' '54': '58' '55': '59' '56': '6' '57': '60' '58': '61' '59': '62' '60': '63' '61': '64' '62': '65' '63': '66' '64': '67' '65': '68' '66': '69' '67': '7' '68': '70' '69': '71' '70': '72' '71': '73' '72': '74' '73': '75' '74': '76' '75': '77' '76': '78' '77': '79' '78': '8' '79': '80' '80': '81' '81': '82' '82': '83' '83': '84' '84': '85' '85': '86' '86': '87' '87': '88' '88': '89' '89': '9' '90': '90' '91': '91' '92': '92' '93': '93' '94': '94' '95': '95' '96': '96' '97': '97' '98': '98' '99': '99' splits: - name: train num_bytes: 41225407.72291223 num_examples: 54057 - name: test num_bytes: 4581109.277087773 num_examples: 6007 download_size: 34660388 dataset_size: 45806517.0 - config_name: mf features: - name: id dtype: string - name: sequence dtype: string - name: go_terms sequence: string - name: stratum_id dtype: class_label: names: '0': '0' '1': '1' '2': '10' '3': '11' '4': '12' '5': '13' '6': '14' '7': '15' '8': '16' '9': '17' '10': '18' '11': '19' '12': '2' '13': '20' '14': '21' '15': '22' '16': '23' '17': '24' '18': '25' '19': '26' '20': '27' '21': '28' '22': '29' '23': '3' '24': '30' '25': '31' '26': '32' '27': '33' '28': '34' '29': '35' '30': '36' '31': '37' '32': '38' '33': '39' '34': '4' '35': '40' '36': '41' '37': '42' '38': '43' '39': '44' '40': '45' '41': '46' '42': '47' '43': '48' '44': '49' '45': '5' '46': '50' '47': '51' '48': '52' '49': '53' '50': '54' '51': '55' '52': '56' '53': '57' '54': '58' '55': '59' '56': '6' '57': '60' '58': '61' '59': '62' '60': '63' '61': '64' '62': '65' '63': '66' '64': '67' '65': '68' '66': '69' '67': '7' '68': '70' '69': '71' '70': '72' '71': '73' '72': '74' '73': '75' '74': '76' '75': '77' '76': '78' '77': '79' '78': '8' '79': '80' '80': '81' '81': '82' '82': '83' '83': '84' '84': '85' '85': '86' '86': '87' '87': '88' '88': '89' '89': '9' '90': '90' '91': '91' '92': '92' '93': '93' '94': '94' '95': '95' '96': '96' '97': '97' '98': '98' '99': '99' splits: - name: train num_bytes: 30136909.6695969 num_examples: 42488 - name: test num_bytes: 3348624.330403101 num_examples: 4721 download_size: 27450810 dataset_size: 33485534.0 configs: - config_name: all data_files: - split: train path: all/train-* - split: test path: all/test-* - config_name: bp data_files: - split: train path: bp/train-* - split: test path: bp/test-* - config_name: cc data_files: - split: train path: cc/train-* - split: test path: cc/test-* - config_name: mf data_files: - split: train path: mf/train-* - split: test path: mf/test-* --- # AmiGO Dataset AmiGO is a friendly dataset of high-quality samples for protein function prediction. It is derived from the UniProt database and contains human-reviewed amino acid sequences annotated with their corresponding gene ontology (GO) terms. The samples are divided into three subsets each containing a set of GO terms that are associated with one of the three subgraphs of the gene ontology - `Molecular Function`, `Biological Process`, and `Cellular Component`. In addition, we provide a stratified `train`/`test` split that utilizes latent subgraph embeddings to distribute GO term annotations equally. ## Processing Steps - Filter high-quality empirical evidence codes. - Remove duplicate GO term annotations. - Expand annotations to include the entire GO subgraph. - Embed subgraphs and assign stratum IDs to the samples. - Generate stratified train/test split. ## Subsets The [AmiGO](https://huggingface.co/datasets/andrewdalpino/AmiGO) dataset is available on HuggingFace Hub and can be loaded using the HuggingFace [Datasets](https://huggingface.co/docs/datasets) library. The dataset is divided into three subsets according to the GO terms that the sequences are annotated with. - `all` - All annotations - `mf` - Only molecular function terms - `cc` - Only celluar component terms - `bp` - Only biological process terms To load the default AmiGO dataset with all function annotations you can use the example below. ```python from datasets import load_dataset dataset = load_dataset("andrewdalpino/AmiGO") ``` To load a subset of the AmiGO dataset use the example below. ```python dataset = load_dataset("andrewdalpino/AmiGO", "mf") ``` ## Splits We provide a 90/10 `train` and `test` split for your convenience. The subsets were determined using a stratified approach which assigns cluster numbers to sequences based on their terms embeddings. We've included the stratum IDs so that you can generate additional custom stratified splits as shown in the example below. ```python from datasets import load_dataset dataset = load_dataset("andrewdalpino/AmiGO", split="train") dataset = dataset.class_encode_column("stratum_id") dataset = dataset.train_test_split(test_size=0.2, stratify_by_column="stratum_id") ``` ## Filtering You can also filter the samples of the dataset like in the example below. ```python dataset = dataset.filter(lambda sample: len(sample["sequence"]) <= 2048) ``` ## Tokenizing Some tasks may require you to tokenize the amino acid sequences. In this example, we loop through the samples and add a `tokens` column to store the tokenized sequences. ```python def tokenize(sample: dict): list[int]: tokens = tokenizer.tokenize(sample["sequence"]) sample["tokens"] = tokens return sample dataset = dataset.map(tokenize, remove_columns="sequence") ``` ## Evidence Codes These charts show the distribution of evidence codes among the samples. For a full explanation of the meaning of each evidence code visit [https://geneontology.org/docs/guide-go-evidence-codes/](https://geneontology.org/docs/guide-go-evidence-codes/). ![All Evidence Codes](https://raw.githubusercontent.com/andrewdalpino/AmiGO/master/docs/images/evidence_codes_all.png) ![Molecular Function Evidence Codes](https://raw.githubusercontent.com/andrewdalpino/AmiGO/master/docs/images/evidence_codes_mf.png) ![Biological Process Evidence Codes](https://raw.githubusercontent.com/andrewdalpino/AmiGO/master/docs/images/evidence_codes_bp.png) ![Cellular Component Evidence Codes](https://raw.githubusercontent.com/andrewdalpino/AmiGO/master/docs/images/evidence_codes_cc.png) ## References >- The UniProt Consortium, UniProt: the Universal Protein Knowledgebase in 2025, Nucleic Acids Research, 2025, 53, D609–D617.