Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,188 @@
|
|
1 |
---
|
2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
tags:
|
6 |
+
- biology
|
7 |
+
- protein structure
|
8 |
+
- token classification
|
9 |
---
|
10 |
+
|
11 |
+
## Overview
|
12 |
+
|
13 |
+
This data was used to evaluate the two models below to decide whether convergence was reached.
|
14 |
+
https://huggingface.co/PDBEurope/BiomedNLP-PubMedBERT-ProteinStructure-NER-v2.1
|
15 |
+
https://huggingface.co/PDBEurope/BiomedNLP-PubMedBERT-ProteinStructure-NER-v3.1
|
16 |
+
|
17 |
+
There are 20 different entity types in this dataset:
|
18 |
+
"bond_interaction", "chemical", "complex_assembly", "evidence", "experimental_method", "gene",
|
19 |
+
"mutant", "oligomeric_state", "protein", "protein_state", "protein_type", "ptm", "residue_name",
|
20 |
+
"residue_name_number","residue_number", "residue_range", "site", "species", "structure_element",
|
21 |
+
"taxonomy_domain"
|
22 |
+
|
23 |
+
Annotation was carried out with the free annotation tool TeamTat (https://www.teamtat.org/) and
|
24 |
+
documents were downloaded as BioC XML before converting them to IOB, annotation only JSON and CSV format.
|
25 |
+
|
26 |
+
The number of annotations and sentences in each file is given below:
|
27 |
+
|
28 |
+
| document ID | number of annotations in BioC XML | number of annotations in IOB/JSON/CSV | number of sentences |
|
29 |
+
| --- | --- | --- | --- |
|
30 |
+
| PMC5173035 | 885 | 885 | 195 |
|
31 |
+
| PMC4993997 | 1052 | 1051 | 217 |
|
32 |
+
| PMC5014086 | 676 | 676 | 136 |
|
33 |
+
| PMC5063996 | 1048 | 1046 | 243 |
|
34 |
+
| PMC4980666 | 669 | 669 | 164 |
|
35 |
+
| PMC4817029 | 897 | 897 | 180 |
|
36 |
+
| PMC5012862 | 2203 | 2202 | 438 |
|
37 |
+
| PMC4981400 | 570 | 570 | 121 |
|
38 |
+
| PMC4806292 | 760 | 760 | 167 |
|
39 |
+
| PMC5603727 | 1353 | 1353 | 240 |
|
40 |
+
| total | 10113 | 10109 | 2101 |
|
41 |
+
|
42 |
+
Documents and annotations are easiest viewed by using the BioC XML files and opening
|
43 |
+
them in free annotation tool TeamTat (https://www.teamtat.org/). More about the BioC
|
44 |
+
format can be found here: https://bioc.sourceforge.net/
|
45 |
+
|
46 |
+
## Raw BioC XML files
|
47 |
+
These are the raw, un-annotated XML files for the publications in the dataset in BioC format
|
48 |
+
|
49 |
+
## Annotations in IOB format
|
50 |
+
The IOB formated files can be found in the directory: "annotation_IOB". There is one file for each
|
51 |
+
document in the dataset and they all follow the naming "unique PubMedCentral ID".tsv.
|
52 |
+
|
53 |
+
|
54 |
+
## Annotations in BioC JSON
|
55 |
+
The BioC formated JSON files of the publications have been downloaded from the annotation
|
56 |
+
tool TeamTat. The files are found in the directory: "annotated_BioC_JSON"
|
57 |
+
There is one file for each document and they follow standard naming
|
58 |
+
"unique PubMedCentral ID"_ann.json
|
59 |
+
|
60 |
+
Each document JSON contains the following relevant keys:
|
61 |
+
* "sourceid" --> giving the numerical part of the unique PubMedCentral ID
|
62 |
+
* "text" --> containing the complete raw text of the publication as a string
|
63 |
+
* "denotations" --> containing a list of all the annotations for the text
|
64 |
+
|
65 |
+
Each annotation is a dictionary with the following keys:
|
66 |
+
* "span" --> gives the start and end of the annotatiom span defined by sub keys:
|
67 |
+
* "begin" --> character start position of annotation
|
68 |
+
* "end" --> character end position of annotation
|
69 |
+
* "obj" --> a string containing a number of terms that can be separated by ","; the order
|
70 |
+
of the terms gives the following: entity type, reference to ontology, annotator,
|
71 |
+
time stamp
|
72 |
+
* "id" --> unique annotation ID
|
73 |
+
|
74 |
+
Here an example:
|
75 |
+
```json
|
76 |
+
[{"sourceid":"4784909",
|
77 |
+
"sourcedb":"",
|
78 |
+
"project":"",
|
79 |
+
"target":"",
|
80 |
+
"text":"",
|
81 |
+
"denotations":[{"span":{"begin":24,
|
82 |
+
"end":34},
|
83 |
+
"obj":"chemical,CHEBI:,melaniev@ebi.ac.uk,2023-03-21T15:19:42Z",
|
84 |
+
"id":"4500"},
|
85 |
+
{"span":{"begin":50,
|
86 |
+
"end":59},
|
87 |
+
"obj":"taxonomy_domain,DUMMY:,melaniev@ebi.ac.uk,2023-03-21T15:15:03Z",
|
88 |
+
"id":"1281"}]
|
89 |
+
}
|
90 |
+
]
|
91 |
+
```
|
92 |
+
|
93 |
+
|
94 |
+
## Annotations in BioC XML
|
95 |
+
The BioC formated XML files of the publications have been downloaded from the annotation
|
96 |
+
tool TeamTat. The files are found in the directory: "annotated_BioC_XML"
|
97 |
+
There is one file for each document and they follow standard naming
|
98 |
+
"unique PubMedCentral ID_ann.xml
|
99 |
+
|
100 |
+
The key XML tags to be able to visualise the annotations in TeamTat as well as extracting
|
101 |
+
them to create the training data are "passage" and "offset". The "passage" tag encloses a
|
102 |
+
text passage or paragraph to which the annotations are linked. "Offset" gives the passage/
|
103 |
+
paragraph offset and allows to determine the character starting and ending postions of the
|
104 |
+
annotations. The tag "text" encloses the raw text of the passage.
|
105 |
+
|
106 |
+
Each annotation in the XML file is tagged as below:
|
107 |
+
* "annotation id=" --> giving the unique ID of the annotation
|
108 |
+
* "infon key="type"" --> giving the entity type of the annotation
|
109 |
+
* "infon key="identifier"" --> giving a reference to an ontology for the annotation
|
110 |
+
* "infon key="annotator"" --> giving the annotator
|
111 |
+
* "infon key="updated_at"" --> providing a time stamp for annotation creation/update
|
112 |
+
* "location" --> start and end character positions for the annotated text span
|
113 |
+
* "offset" --> start character position as defined by offset value
|
114 |
+
* "length" --> length of the annotation span; sum of "offset" and "length" creates
|
115 |
+
the end character position
|
116 |
+
|
117 |
+
Here is a basic example of what the BioC XML looks like. Additional tags for document
|
118 |
+
management are not given. Please refer to the documenttation to find out more.
|
119 |
+
|
120 |
+
```xml
|
121 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
122 |
+
<!DOCTYPE collection SYSTEM "BioC.dtd">
|
123 |
+
<collection>
|
124 |
+
<source>PMC</source>
|
125 |
+
<date>20140719</date>
|
126 |
+
<key>pmc.key</key>
|
127 |
+
<document>
|
128 |
+
<id>4784909</id>
|
129 |
+
<passage>
|
130 |
+
<offset>0</offset>
|
131 |
+
<text>The Structural Basis of Coenzyme A Recycling in a Bacterial Organelle</text>
|
132 |
+
<annotation id="4500">
|
133 |
+
<infon key="type">chemical</infon>
|
134 |
+
<infon key="identifier">CHEBI:</infon>
|
135 |
+
<infon key="annotator">melaniev@ebi.ac.uk</infon>
|
136 |
+
<infon key="updated_at">2023-03-21T15:19:42Z</infon>
|
137 |
+
<location offset="24" length="10"/>
|
138 |
+
<text>Coenzyme A</text>
|
139 |
+
</annotation>
|
140 |
+
</passage>
|
141 |
+
</document>
|
142 |
+
</collection>
|
143 |
+
```
|
144 |
+
|
145 |
+
|
146 |
+
## Annotations in CSV
|
147 |
+
The annotations and the relevant sentences they have been found in have also been made
|
148 |
+
available as tab-separated CSV files, one for each publication in the dataset. The files can
|
149 |
+
be found in directory "annotation_CSV". Each file is named as "unique PubMedCentral ID".csv.
|
150 |
+
|
151 |
+
The column labels in the CSV files are as follows:
|
152 |
+
* "anno_start" --> character start position of the annotation
|
153 |
+
* "anno_end" --> character end position of the annotation
|
154 |
+
* "anno_text" --> text covered by the annotation
|
155 |
+
* "entity_type" --> entity type of the annotation
|
156 |
+
* "sentence" --> sentence text in which the annotation was found
|
157 |
+
* "section" --> publication section in which the annotation was found
|
158 |
+
|
159 |
+
|
160 |
+
## Annotations in JSON
|
161 |
+
A combined JSON file was created only containing the relevant sentences and associated
|
162 |
+
annotations for each publication in the dataset. The file can be found in directory
|
163 |
+
"annotation_JSON" under the name "annotations.json".
|
164 |
+
|
165 |
+
The following keys are used:
|
166 |
+
* "PMC4850273" --> unique PubMedCentral of the publication
|
167 |
+
* "annotations" --> list of dictionaries for the relevant, annotated sentences of the
|
168 |
+
document; each dictionary has the following sub keys
|
169 |
+
* "sid" --> unique sentence ID
|
170 |
+
* "sent" --> sentence text as string
|
171 |
+
* "section" --> publication section the sentence is in
|
172 |
+
* "ner" --> nested list of annotations; each sublist contains the following items:
|
173 |
+
start character position, end character position, annotation text,
|
174 |
+
entity type
|
175 |
+
|
176 |
+
Here is an example of a sentence and its annotations:
|
177 |
+
```json
|
178 |
+
{"PMC4850273": {"annotations":
|
179 |
+
[{"sid": 0,
|
180 |
+
"sent": "Molecular Dissection of Xyloglucan Recognition in a Prominent Human Gut Symbiont",
|
181 |
+
"section": "TITLE",
|
182 |
+
"ner": [
|
183 |
+
[24,34,"Xyloglucan","chemical"],
|
184 |
+
[62,67,"Human","species"],]
|
185 |
+
},]
|
186 |
+
}}
|
187 |
+
```
|
188 |
+
|