File size: 9,597 Bytes
caf8531
 
7570fb5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
caf8531
7570fb5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3f31a91
 
 
6d940b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7570fb5
3f31a91
7570fb5
 
6d940b2
 
 
 
 
 
7570fb5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
language:
- en
tags:
- biology
- protein structure
- token classification
configs:
- config_name: protein_structure_NER_model_v3.1
  data_files:
  - split: train
    path: "annotation_IOB/train.tsv"
  - split: dev
    path: "annotation_IOB/dev.tsv"
  - split: test
    path: "annotation_IOB/test.tsv"
---

## Overview

This data was used to train model:
https://huggingface.co/PDBEurope/BiomedNLP-PubMedBERT-ProteinStructure-NER-v3.1

There are 20 different entity types in this dataset:
"bond_interaction", "chemical", "complex_assembly", "evidence", "experimental_method", "gene", 
"mutant", "oligomeric_state", "protein", "protein_state", "protein_type", "ptm", "residue_name",
"residue_name_number","residue_number", "residue_range", "site", "species", "structure_element",
"taxonomy_domain"

The data prepared as IOB formated input has been used during training, develiopment
and testing. Additional data formats such as JSON and XML as well as CSV files are
also available and are described below.

Annotation was carried out with the free annotation tool TeamTat (https://www.teamtat.org/) and
documents were downloaded as BioC XML before converting them to IOB, annotation only JSON and CSV format.

The number of annotations and sentences in each file is given below:

| document ID | number of annotations in BioC XML | number of annotations in IOB/JSON/CSV | number of sentences |
| --- | --- | --- | --- |
| PMC4850273 | 1129 | 1129 | 205 |
| PMC4784909 | 868 | 868 | 204 |
| PMC4850288 | 717 | 709 | 146 |
| PMC4887326 | 942 | 942 | 152 |
| PMC4833862 | 1044 | 1044 | 192 |
| PMC4832331 | 739 | 718 | 134 |
| PMC4852598 | 1239 | 1228 | 250 |
| PMC4786784 | 1573 | 1573 | 232 |
| PMC4848090 | 1000 | 998 | 192 |
| PMC4792962 | 1297 | 1297 | 256 |
| PMC4841544 | 1460 | 1459 | 274 |
| PMC4772114 | 824 | 824 | 165 |
| PMC4872110 | 1283 | 1283 | 250 |
| PMC4848761 | 888 | 884 | 252 |
| PMC4919469 | 1636 | 1624 | 336 |
| PMC4880283 | 783 | 783 | 166 |
| PMC4968113 | 1245 | 1245 | 292 |
| PMC4937829 | 633 | 633 | 181 |
| PMC4854314 | 498 | 488 | 139 |
| PMC4871749 | 411 | 411 | 79 |
| PMC4869123 | 922 | 922 | 195 |
| PMC4888278 | 580 | 580 | 102 |
| PMC4795551 | 1475 | 1475 | 297 |
| PMC4831588 | 1087 | 1070 | 224 |
| PMC4918766 | 1027 | 1027 | 210 |
| PMC4802042 | 1441 | 1441 | 264 |
| PMC4896748 | 2652 | 2638 | 480 |
| PMC4781976 | 115 | 113 | 24 |
| PMC4802085 | 983 | 983 | 193 |
| PMC4887163 | 856 | 856 | 196|
| PMC4918759 | 803 | 803 | 175 |
| PMC4855620 | 563 | 563 | 122 |
| PMC4822050 | 1521 | 1521 | 249 |
| PMC4822561 | 367 | 366 | 84 |
| PMC4885502 | 577 | 577 | 97 |
| PMC4746701 | 1130 | 1130 | 245 |
| PMC4820378 | 733 | 733 | 170 |
| PMC4773095 | 1323 | 1323 | 252 |
| PMC4857006 | 1358 | 1358 | 249 |
| PMC4774019 | 532 | 530 | 117 |
| total | 40254 | 40149 | 8042 |

Documents and annotations are easiest viewed by using the BioC XML files and opening
them in free annotation tool TeamTat. More about the BioC
format can be found here: https://bioc.sourceforge.net/

## Raw BioC XML files
These are the raw, un-annotated XML files for the publications in the dataset in BioC format.
The files are found in the directory: "raw_BioC_XML".
There is one file for each document and they follow standard naming
"unique PubMedCentral ID"_raw.xml.

## Annotations in IOB format
The IOB formated files can be found in the directory: "annotation_IOB"
The four files are as follows:
* all.tsv --> all sentences and annotations used to create model
              "PDBEurope/BiomedNLP-PubMedBERT-ProteinStructure-NER-v3.1"; 8042 sentences
* train.tsv --> training subset of the data; 5629 sentences
* dev.tsv --> development subset of the data; 1206 sentences
* test.tsv --> testing subset of the data; 1207 sentences

The total number of annotations is: 40149


## Annotations in BioC JSON
The BioC formated JSON files of the publications have been downloaded from the annotation
tool TeamTat. The files are found in the directory: "annotated_BioC_JSON"
There is one file for each document and they follow standard naming
"unique PubMedCentral ID"_ann.json

Each document JSON contains the following relevant keys:
* "sourceid" --> giving the numerical part of the unique PubMedCentral ID
* "text" --> containing the complete raw text of the publication as a string
* "denotations" --> containing a list of all the annotations for the text

Each annotation is a dictionary with the following keys:
* "span" --> gives the start and end of the annotatiom span defined by sub keys:
  * "begin" --> character start position of annotation
  * "end" --> character end position of annotation
* "obj" --> a string containing a number of terms that can be separated by ","; the order
            of the terms gives the following: entity type, reference to ontology, annotator,
            time stamp
* "id" --> unique annotation ID

Here an example:
```json
[{"sourceid":"4784909",
  "sourcedb":"",
  "project":"",
  "target":"",
  "text":"",
  "denotations":[{"span":{"begin":24,
                          "end":34},
                  "obj":"chemical,CHEBI:,melaniev@ebi.ac.uk,2023-03-21T15:19:42Z",
                  "id":"4500"},
                 {"span":{"begin":50,
                          "end":59},
                  "obj":"taxonomy_domain,DUMMY:,melaniev@ebi.ac.uk,2023-03-21T15:15:03Z",
                  "id":"1281"}]
  }
]
```


## Annotations in BioC XML
The BioC formated XML files of the publications have been downloaded from the annotation
tool TeamTat. The files are found in the directory: "annotated_BioC_XML"
There is one file for each document and they follow standard naming
"unique PubMedCentral ID_ann.xml

The key XML tags to be able to visualise the annotations in TeamTat as well as extracting
them to create the training data are "passage" and "offset". The "passage" tag encloses a
text passage or paragraph to which the annotations are linked. "Offset" gives the passage/
paragraph offset and allows to determine the character starting and ending postions of the
annotations. The tag "text" encloses the raw text of the passage.

Each annotation in the XML file is tagged as below:
* "annotation id=" --> giving the unique ID of the annotation
* "infon key="type"" --> giving the entity type of the annotation
* "infon key="identifier"" --> giving a reference to an ontology for the annotation
* "infon key="annotator"" --> giving the annotator
* "infon key="updated_at"" --> providing a time stamp for annotation creation/update
* "location" --> start and end character positions for the annotated text span
  * "offset" --> start character position as defined by offset value
  * "length" --> length of the annotation span; sum of "offset" and "length" creates
                 the end character position

Here is a basic example of what the BioC XML looks like. Additional tags for document
management are not given. Please refer to the documenttation to find out more.

```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE collection SYSTEM "BioC.dtd">
<collection>
  <source>PMC</source>
  <date>20140719</date>
  <key>pmc.key</key>
  <document>
    <id>4784909</id>
    <passage>
      <offset>0</offset>
      <text>The Structural Basis of Coenzyme A Recycling in a Bacterial Organelle</text>
      <annotation id="4500">
        <infon key="type">chemical</infon>
        <infon key="identifier">CHEBI:</infon>
        <infon key="annotator">melaniev@ebi.ac.uk</infon>
        <infon key="updated_at">2023-03-21T15:19:42Z</infon>
        <location offset="24" length="10"/>
        <text>Coenzyme A</text>
      </annotation>
    </passage>
  </document>
</collection>
```


## Annotations in CSV
The annotations and the relevant sentences they have been found in have also been made
available as tab-separated CSV files, one for each publication in the dataset. The files can
be found in directory "annotation_CSV". Each file is named as "unique PubMedCentral ID".csv.

The column labels in the CSV files are as follows:
* "anno_start" --> character start position of the annotation
* "anno_end" --> character end position of the annotation
* "anno_text" --> text covered by the annotation
* "entity_type" --> entity type of the annotation
* "sentence" --> sentence text in which the annotation was found
* "section" --> publication section in which the annotation was found


## Annotations in JSON
A combined JSON file was created only containing the relevant sentences and associated
annotations for each publication in the dataset. The file can be found in directory
"annotation_JSON" under the name "annotations.json".

The following keys are used:
* "PMC4850273" --> unique PubMedCentral of the publication
* "annotations" --> list of dictionaries for the relevant, annotated sentences of the
                    document; each dictionary has the following sub keys
  * "sid" --> unique sentence ID
  * "sent" --> sentence text as string
  * "section" --> publication section the sentence is in
  * "ner" --> nested list of annotations; each sublist contains the following items:
              start character position, end character position, annotation text,
              entity type

Here is an example of a sentence and its annotations:
```json
{"PMC4850273": {"annotations":
                [{"sid": 0,
                  "sent": "Molecular Dissection of Xyloglucan Recognition in a Prominent Human Gut Symbiont",
                  "section": "TITLE",
                  "ner": [
                    [24,34,"Xyloglucan","chemical"],
                    [62,67,"Human","species"],]
                 },]
}}
```