File size: 17,542 Bytes
2fdc721
689b0f7
 
 
 
4688169
 
594ef1a
 
689b0f7
 
 
4688169
689b0f7
 
 
 
 
 
 
594ef1a
 
689b0f7
 
 
 
 
 
 
594ef1a
 
 
 
689b0f7
 
 
 
 
594ef1a
 
 
 
689b0f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
594ef1a
 
bb46f98
 
 
b146506
689b0f7
726c8aa
b01c7d0
 
bb46f98
6c50e03
bed1eb8
 
6c50e03
c8593e7
 
a22e2e4
c8593e7
 
 
 
 
b9c732b
f77192c
9ec50fb
3ca38f4
 
 
b9c732b
90f5a64
6c50e03
90f5a64
6c50e03
 
 
90f5a64
6c50e03
bb46f98
 
 
6c50e03
a223ee4
3f4e373
6c50e03
 
a223ee4
 
6c50e03
a223ee4
 
6c50e03
a223ee4
 
6c50e03
a223ee4
6c50e03
a223ee4
 
6c50e03
a223ee4
6c50e03
a223ee4
 
 
6c50e03
a223ee4
 
 
6c50e03
a223ee4
 
6c50e03
a223ee4
 
 
6c50e03
a223ee4
 
6c50e03
a223ee4
 
 
6c50e03
a223ee4
 
 
6c50e03
a223ee4
6c50e03
a223ee4
 
6c50e03
a223ee4
6c50e03
a223ee4
 
6c50e03
a223ee4
6c50e03
a223ee4
6c50e03
 
bb46f98
6c50e03
bb46f98
 
 
 
 
 
 
 
 
 
 
 
 
 
da5371c
bb46f98
90f5a64
 
bb46f98
 
 
 
 
 
6c50e03
58e0e09
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6c50e03
33f5122
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
---
extra_gated_heading: Acknowledge license to accept the repository
extra_gated_prompt: >
  The Beijing Academy of Artificial Intelligence (hereinafter referred to as
  "we" or "BAAI") provides you with an open-source dataset (hereinafter referred
  to as "dataset") through the OPI HuggingFace repository
  (https://huggingface.co/datasets/BAAI/OPI). You can download the dataset you
  need and use it for purposes such as learning and research while abiding by
  the usage rules of each original dataset.

  Before you acquire the open-source dataset (including but not limited to
  accessing, downloading, copying, distributing, using, or any other handling of
  the dataset), you should read and understand this "OPI Open-Source Dataset
  Usage Notice and Disclaimer" (hereinafter referred to as "this statement").
  Once you acquire the open-source dataset, regardless of your method of
  acquisition, your actions will be regarded as acknowledgment of the full
  content of this statement.

  1. Ownership and Operation Rights

  You should fully understand that the ownership and operation rights of the OPI
  HuggingFace repository (including the current and all previous versions)
  belong to BAAI. BAAI has the final interpretation and decision rights over
  this platform/tool and the open-source dataset plan.

  You acknowledge and understand that due to updates and improvements in
  relevant laws and regulations and the need to fulfill our legal compliance
  obligations, we reserve the right to update, maintain, or even suspend or
  permanently terminate the services of this platform/tool from time to time. We
  will notify you of possible situations mentioned above reasonably such as
  through an announcement or email within a reasonable time. You should make
  corresponding adjustments and arrangements in a timely manner. However, we do
  not bear any responsibility for any losses caused to you by any of the
  aforementioned situations.

  2. Claim of Rights to Open-Source Datasets

  For the purpose of facilitating your dataset acquisition and use for learning,
  and research, we have performed necessary steps such as format integration,
  data cleaning, labeling, categorizing, annotating, and other related
  processing on the third-party original datasets to form the open-source
  datasets for this platform/tool's users.

  You understand and acknowledge that we do not claim the proprietary rights of
  intellectual property to the open-source datasets. Therefore, we have no
  obligation to actively recognize and protect the potential intellectual
  property of the open-source datasets. However, this does not mean that we
  renounce the personal rights to claim credit, publication, modification, and
  protection of the integrity of the work (if any) of the open-source datasets.
  The potential intellectual property and corresponding legal rights of the
  original datasets belong to the original rights holders.

  In addition, providing you with open-source datasets that have been reasonably
  arranged, processed, and handled does not mean that we acknowledge the
  authenticity, accuracy, or indisputability of the intellectual property and
  information content of the original datasets. You should filter and carefully
  discern the open-source datasets you choose to use. You understand and agree
  that BAAI does not undertake any obligation or warranty responsibility for any
  defects or flaws in the original datasets you choose to use.

  3. Usage Restrictions for Open-Source Datasets

  Your use of the dataset must not infringe on our or any third party's legal
  rights and interests (including but not limited to copyrights, patent rights,
  trademark rights, and other intellectual property and other rights).

  After obtaining the open-source dataset, you should ensure that your use of
  the open-source dataset does not exceed the usage rules explicitly stipulated
  by the rights holders of the original dataset in the form of a public notice
  or agreement, including the range, purpose, and lawful purposes of the use of
  the original data. We kindly remind you here that if your use of the
  open-source dataset exceeds the predetermined range and purpose of the
  original dataset, you may face the risk of infringing on the legal rights and
  interests of the rights holders of the original dataset, such as intellectual
  property, and may bear corresponding legal responsibilities.

  4. Personal Information Protection

  Due to technical limitations and the public welfare nature of the open-source
  datasets, we cannot guarantee that the open-source datasets do not contain any
  personal information, and we do not bear any legal responsibility for any
  personal information that may be involved in the open-source datasets.

  If the open-source dataset involves personal information, we do not bear any
  legal responsibility for any personal information processing activities you
  may involve when using the open-source dataset. We kindly remind you here that
  you should handle personal information in accordance with the provisions of
  the "Personal Information Protection Law" and other relevant laws and
  regulations.

  To protect the legal rights and interests of the information subject and to
  fulfill possible applicable laws and administrative regulations, if you find
  content that involves or may involve personal information during the use of
  the open-source dataset, you should immediately stop using the part of the
  dataset that involves personal information and contact us as indicated in "6.
  Complaints and Notices."

  5. Information Content Management

  We do not bear any legal responsibility for any illegal and bad information
  that may be involved in the open-source dataset.

  If you find that the open-source dataset involves or may involve any illegal
  and bad information during your use, you should immediately stop using the
  part of the dataset that involves illegal and bad information and contact us
  in a timely manner as indicated in "6. Complaints and Notices."

  6. Complaints and Notices

  If you believe that the open-source dataset has infringed on your legal rights
  and interests, you can contact us at 010-50955974, and we will handle your
  claims and complaints in accordance with the law in a timely manner.

  To handle your claims and complaints, we may need you to provide contact
  information, infringement proof materials, and identity proof materials.
  Please note that if you maliciously complain or make false statements, you
  will bear all legal responsibilities caused thereby (including but not limited
  to reasonable compensation costs).

  7. Disclaimer

  You understand and agree that due to the nature of the open-source dataset,
  the dataset may contain data from different sources and contributors, and the
  authenticity, accuracy, and objectivity of the data may vary, and we cannot
  make any promises about the availability and reliability of any dataset.

  In any case, we do not bear any legal responsibility for any risks such as
  personal information infringement, illegal and bad information dissemination,
  and intellectual property infringement that may exist in the open-source
  dataset.

  In any case, we do not bear any legal responsibility for any loss (including
  but not limited to direct loss, indirect loss, and loss of potential benefits)
  you suffer or is related to the open-source dataset.

  8. Others

  The open-source dataset is in a constant state of development and change. We
  may update, adjust the range of the open-source dataset we provide, or
  suspend, pause, or terminate the open-source dataset service due to business
  development, third-party cooperation, changes in laws and regulations, and
  other reasons.
extra_gated_fields:
  Name: text
  Affiliation: text
  Country: text
  I agree to accept the license: checkbox
extra_gated_button_content: Acknowledge license
license: cc-by-nc-4.0
language:
- en
tags:
- biology
- protein
- instruction tuning
- AI4Science
- Life Science
- LLM
pretty_name: Open Protein Instructions(OPI)
size_categories:
- 1M<n<10M
task_categories:
- text-generation
- question-answering
---

![image.png](./OPI_logo.png)

# Dataset Overview

**Dataset size: Thera are <u>1.64M samples</u>, including <u>training (1,615,661)</u> and <u>testing (26,607)</u> sets, in OPI dataset, covering 9 protein-related tasks.**

We are excited to announce the release of the **Open Protein Instructions (OPI)** dataset, a curated collection of instructions covering 9 tasks for adapting LLMs to protein biology. The dataset is designed to advance LLM-driven research in the field of protein biology. We welcome contributions and enhancements to this dataset from the community.

OPI is the initial part of Open Biology Instructions(OBI) project, together with the subsequent Open Molecule Instructions(OMI), Open DNA Instructions(ODI), Open RNA Instructions(ORI) and Open Single-cell Instructions (OSCI). OBI is a project which aims to fully leverage the potential ability of Large Language Models(LLMs), especially the scientific LLMs like Galactica, to facilitate research in AI for Life Science community. While OBI is still in an early stage, we hope to provide a starting point for the community to bridge LLMs and biological domain knowledge.

## Dataset Update
The previous version of OPI dataset is based on the **release 2022_01** of UniProtKB/Swiss-Prot protein knowledgebase. At current, OPI is updated to contain the latest **release 2023_05**, which can be accessed via the dataset file [OPI_updated_160k.json](./OPI_DATA/OPI_updated_160k.json).

Reference:
- https://ftp.uniprot.org/pub/databases/uniprot/previous_releases/release-2022_01/knowledgebase/UniProtKB_SwissProt-relstat.html
- https://ftp.uniprot.org/pub/databases/uniprot/previous_releases/release-2023_05/knowledgebase/UniProtKB_SwissProt-relstat.html

<!-- ## Dataset Description -->

<!-- - **Homepage:** 
- **Repository:** 
- **Paper:** 
- **Leaderboard:** 
- **Point of Contact:**  -->

## OPI Dataset Construction Pipeline
The OPI dataset is curated on our own by extracting key information from [Swiss-Prot](https://www.uniprot.org/uniprotkb?facets=reviewed%3Atrue&query=%2A) database. The following figure shows the general construction process.
![image.png](./OPI_data.png)

## OPI Dataset Folder Structure
The OPI dataset is organized into the three subfoldersβ€”AP, KM, and SUβ€”by in the [OPI_DATA](https://huggingface.co/datasets/BAAI/OPI/tree/main/OPI_DATA) directory within this repository, where you can find a subset for each specific task as well as the full dataset file: [OPI_full_1.61M_train.json](https://huggingface.co/datasets/BAAI/OPI/blob/main/OPI_DATA/OPI_full_1.61M_train.json). 
```
./OPI_DATA/
└── SU
β”‚   β”œβ”€β”€ EC_number
β”‚   β”‚   β”œβ”€β”€ test
β”‚   β”‚   β”‚   β”œβ”€β”€ CLEAN_EC_number_new_test.jsonl
β”‚   β”‚   β”‚   └── CLEAN_EC_number_price_test.jsonl
β”‚   β”‚   └── train
β”‚   β”‚       β”œβ”€β”€ CLEAN_EC_number_train.json
β”‚   β”œβ”€β”€ Fold_type
β”‚   β”‚   β”œβ”€β”€ test
β”‚   β”‚   β”‚   └── fold_type_test.jsonl
β”‚   β”‚   └── train
β”‚   β”‚       └── fold_type_train.json
β”‚   └── Subcellular_localization
β”‚       β”œβ”€β”€ test
β”‚       β”‚   β”œβ”€β”€ subcell_loc_test.jsonl
β”‚       └── train
            └── subcell_loc_train.json
β”œβ”€β”€ AP
β”‚   └── Keywords
β”‚   β”‚   β”œβ”€β”€ test
β”‚   β”‚   β”‚   β”œβ”€β”€ CASPSimilarSeq_keywords_test.jsonl
β”‚   β”‚   β”‚   β”œβ”€β”€ IDFilterSeq_keywords_test.jsonl
β”‚   β”‚   β”‚   └── UniProtSeq_keywords_test.jsonl
β”‚   β”‚   └── train
β”‚   β”‚       β”œβ”€β”€ keywords_train.json
β”‚   β”œβ”€β”€ GO
β”‚   β”‚   β”œβ”€β”€ test
β”‚   β”‚   β”‚   β”œβ”€β”€ CASPSimilarSeq_go_terms_test.jsonl
β”‚   β”‚   β”‚   β”œβ”€β”€ IDFilterSeq_go_terms_test.jsonl
β”‚   β”‚   β”‚   └── UniProtSeq_go_terms_test.jsonl
β”‚   β”‚   └── train
β”‚   β”‚       β”œβ”€β”€ go_terms_train.json
β”‚   β”œβ”€β”€ Function
β”‚       β”œβ”€β”€ test
β”‚       β”‚   β”œβ”€β”€ CASPSimilarSeq_function_test.jsonl
β”‚       β”‚   β”œβ”€β”€ IDFilterSeq_function_test.jsonl
β”‚       β”‚   └── UniProtSeq_function_test.jsonl
β”‚       └── train
β”‚           β”œβ”€β”€ function_train.json
β”œβ”€β”€ KM
    └── gSymbol2Tissue
    β”‚   β”œβ”€β”€ test
    β”‚   β”‚   └── gene_symbol_to_tissue_test.jsonl
    β”‚   └── train
    β”‚       └── gene_symbol_to_tissue_train.json
    β”œβ”€β”€ gSymbol2Cancer
    β”‚   β”œβ”€β”€ test
    β”‚   β”‚   └── gene_symbol_to_cancer_test.jsonl
    β”‚   └── train
    β”‚       └── gene_symbol_to_cancer_train.json
    β”œβ”€β”€ gName2Cancer
        β”œβ”€β”€ test
        β”‚   └── gene_name_to_cancer_test.jsonl
        └── train
            └── gene_name_to_cancer_train.json
```

## Dataset Examples

**An example of OPI training data:**
```
instruction: 
    What is the EC classification of the input protein sequence based on its biological function?
input:                         
    MGLVSSKKPDKEKPIKEKDKGQWSPLKVSAQDKDAPPLPPLVVFNHLTPPPPDEHLDEDKHFVVALYDYTAMNDRDLQMLKGEKLQVLKGTGDWWLARS
    LVTGREGYVPSNFVARVESLEMERWFFRSQGRKEAERQLLAPINKAGSFLIRESETNKGAFSLSVKDVTTQGELIKHYKIRCLDEGGYYISPRITFPSL
    QALVQHYSKKGDGLCQRLTLPCVRPAPQNPWAQDEWEIPRQSLRLVRKLGSGQFGEVWMGYYKNNMKVAIKTLKEGTMSPEAFLGEANVMKALQHERLV
    RLYAVVTKEPIYIVTEYMARGCLLDFLKTDEGSRLSLPRLIDMSAQIAEGMAYIERMNSIHRDLRAANILVSEALCCKIADFGLARIIDSEYTAQEGAK
    FPIKWTAPEAIHFGVFTIKADVWSFGVLLMEVVTYGRVPYPGMSNPEVIRNLERGYRMPRPDTCPPELYRGVIAECWRSRPEERPTFEFLQSVLEDFYT
    ATERQYELQP
output: 
    2.7.10.2
```
**An example of OPI testing data:**
```
{"id": "seed_task_0", "name": "EC number of price dataset from CLEAN", "instruction":
"Return the EC number of the protein sequence.", "instances": [{"input":
"MAIPPYPDFRSAAFLRQHLRATMAFYDPVATDASGGQFHFFLDDGTVYNTHTRHLVSATRFVVTHAMLYRTTGEARYQVGMRHALEFLRTAFLDPATGGY
AWLIDWQDGRATVQDTTRHCYGMAFVMLAYARAYEAGVPEARVWLAEAFDTAEQHFWQPAAGLYADEASPDWQLTSYRGQNANMHACEAMISAFRATGERR
YIERAEQLAQGICQRQAALSDRTHAPAAEGWVWEHFHADWSVDWDYNRHDRSNIFRPWGYQVGHQTEWAKLLLQLDALLPADWHLPCAQRLFDTAVERGWD
AEHGGLYYGMAPDGSICDDGKYHWVQAESMAAAAVLAVRTGDARYWQWYDRIWAYCWAHFVDHEHGAWFRILHRDNRNTTREKSNAGKVDYHNMGACYDVL
LWALDAPGFSKESRSAALGRP", "output": "5.3.1.7"}], "is_classification": false}
```

## OPEval: Nine evaluation tasks using the OPI dataset

To assess the effectiveness of instruction tuning with the OPI dataset, we developed OPEval, which comprises three categories of evaluation tasks. Each category includes three specific tasks. The table below outlines the task types, names, and the corresponding sizes of the training and testing sets.

<table border="1" style="text-align:center; border-collapse:collapse;">
  <tr>
    <th style="text-align:center;">Task Type</th>
    <th style="text-align:center;">Type Abbr.</th>
    <th style="text-align:center;">Task Name</th>
    <th style="text-align:center;">Task Abbr.</th>
    <th style="text-align:center;">Training set size</th>
    <th style="text-align:center;">Testing set size</th>
  </tr>
  <tr>
    <td rowspan="3">Sequence Understanding</td>
    <td rowspan="3">SU</td>
    <td>EC Number Prediction</td>
    <td>EC_number</td>
    <td style="text-align:center;">74,487</td>
    <td style="text-align:center;">392 (NEW-392), 149 (Price-149)</td>
  </tr>
  <tr>
    <td>Fold Type Prediction</td>
    <td>Fold_type</td>
    <td style="text-align:center;">12,312</td>
    <td style="text-align:center;">718 (Fold), 1254 (Superfamily), 1272 (Family)</td>
  </tr>
  <tr>
    <td>Subcellular Localization Prediction</td>
    <td>Subcellular_localization</td>
    <td style="text-align:center;">11,230</td>
    <td style="text-align:center;">2,772</td>
  </tr>
  <tr>
    <td rowspan="3">Annotation Prediction</td>
    <td rowspan="3">AP</td>
    <td>Function Keywords Prediction</td>
    <td>Keywords</td>
    <td style="text-align:center;">451,618</td>
    <td style="text-align:center;">184 (CASPSimilarSeq), 1,112 (IDFilterSeq), 4562 (UniprotSeq)</td>
  </tr>
  <tr>
    <td>Gene Ontology(GO) Terms Prediction</td>
    <td>GO</td>
    <td style="text-align:center;">451,618</td>
    <td style="text-align:center;">184 (CASPSimilarSeq), 1,112 (IDFilterSeq), 4562 (UniprotSeq)</td>
  </tr>
  <tr>
    <td>Function Description Prediction</td>
    <td>Function</td>
    <td style="text-align:center;">451,618</td>
    <td style="text-align:center;">184 (CASPSimilarSeq), 1,112 (IDFilterSeq), 4562 (UniprotSeq)</td>
  </tr>
  <tr>
    <td rowspan="3">Knowledge Mining</td>
    <td rowspan="3">KM</td>
    <td>Tissue Location Prediction from Gene Symbol</td>
    <td>gSymbol2Tissue</td>
    <td style="text-align:center;">8,723</td>
    <td style="text-align:center;">2,181</td>
  </tr>
  <tr>
    <td>Cancer Prediction from Gene Symbol</td>
    <td>gSymbol2Cancer</td>
    <td style="text-align:center;">590</td>
    <td style="text-align:center;">148</td>
  </tr>
  <tr>
    <td>Cancer Prediction from Gene Name</td>
    <td>gName2Cancer</td>
    <td style="text-align:center;">590</td>
    <td style="text-align:center;">148</td>
  </tr>
</table>

## License
The dataset is licensed under a Creative Commons Attribution Non Commercial 4.0 License. The use of this dataset should also abide by the original [License & Disclaimer](https://www.uniprot.org/help/license) and [Privacy Notice](https://www.uniprot.org/help/privacy) of UniProt.