mevol commited on
Commit
9c98b22
1 Parent(s): b5f5589

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +187 -0
README.md CHANGED
@@ -1,3 +1,190 @@
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
+ The files are found in the directory: "raw_BioC_XML"
49
+ There is one file for each document and they follow standard naming
50
+ "unique PubMedCentral ID"_raw.xml
51
+
52
+ ## Annotations in IOB format
53
+ The IOB formated files can be found in the directory: "annotation_IOB". There is one file for each
54
+ document in the dataset and they all follow the naming "unique PubMedCentral ID".tsv.
55
+
56
+
57
+ ## Annotations in BioC JSON
58
+ The BioC formated JSON files of the publications have been downloaded from the annotation
59
+ tool TeamTat. The files are found in the directory: "annotated_BioC_JSON"
60
+ There is one file for each document and they follow standard naming
61
+ "unique PubMedCentral ID"_ann.json
62
+
63
+ Each document JSON contains the following relevant keys:
64
+ * "sourceid" --> giving the numerical part of the unique PubMedCentral ID
65
+ * "text" --> containing the complete raw text of the publication as a string
66
+ * "denotations" --> containing a list of all the annotations for the text
67
+
68
+ Each annotation is a dictionary with the following keys:
69
+ * "span" --> gives the start and end of the annotatiom span defined by sub keys:
70
+ * "begin" --> character start position of annotation
71
+ * "end" --> character end position of annotation
72
+ * "obj" --> a string containing a number of terms that can be separated by ","; the order
73
+ of the terms gives the following: entity type, reference to ontology, annotator,
74
+ time stamp
75
+ * "id" --> unique annotation ID
76
+
77
+ Here an example:
78
+ ```json
79
+ [{"sourceid":"4784909",
80
+ "sourcedb":"",
81
+ "project":"",
82
+ "target":"",
83
+ "text":"",
84
+ "denotations":[{"span":{"begin":24,
85
+ "end":34},
86
+ "obj":"chemical,CHEBI:,melaniev@ebi.ac.uk,2023-03-21T15:19:42Z",
87
+ "id":"4500"},
88
+ {"span":{"begin":50,
89
+ "end":59},
90
+ "obj":"taxonomy_domain,DUMMY:,melaniev@ebi.ac.uk,2023-03-21T15:15:03Z",
91
+ "id":"1281"}]
92
+ }
93
+ ]
94
+ ```
95
+
96
+
97
+ ## Annotations in BioC XML
98
+ The BioC formated XML files of the publications have been downloaded from the annotation
99
+ tool TeamTat. The files are found in the directory: "annotated_BioC_XML"
100
+ There is one file for each document and they follow standard naming
101
+ "unique PubMedCentral ID_ann.xml
102
+
103
+ The key XML tags to be able to visualise the annotations in TeamTat as well as extracting
104
+ them to create the training data are "passage" and "offset". The "passage" tag encloses a
105
+ text passage or paragraph to which the annotations are linked. "Offset" gives the passage/
106
+ paragraph offset and allows to determine the character starting and ending postions of the
107
+ annotations. The tag "text" encloses the raw text of the passage.
108
+
109
+ Each annotation in the XML file is tagged as below:
110
+ * "annotation id=" --> giving the unique ID of the annotation
111
+ * "infon key="type"" --> giving the entity type of the annotation
112
+ * "infon key="identifier"" --> giving a reference to an ontology for the annotation
113
+ * "infon key="annotator"" --> giving the annotator
114
+ * "infon key="updated_at"" --> providing a time stamp for annotation creation/update
115
+ * "location" --> start and end character positions for the annotated text span
116
+ * "offset" --> start character position as defined by offset value
117
+ * "length" --> length of the annotation span; sum of "offset" and "length" creates
118
+ the end character position
119
+
120
+ Here is a basic example of what the BioC XML looks like. Additional tags for document
121
+ management are not given. Please refer to the documenttation to find out more.
122
+
123
+ ```xml
124
+ <?xml version="1.0" encoding="UTF-8"?>
125
+ <!DOCTYPE collection SYSTEM "BioC.dtd">
126
+ <collection>
127
+ <source>PMC</source>
128
+ <date>20140719</date>
129
+ <key>pmc.key</key>
130
+ <document>
131
+ <id>4784909</id>
132
+ <passage>
133
+ <offset>0</offset>
134
+ <text>The Structural Basis of Coenzyme A Recycling in a Bacterial Organelle</text>
135
+ <annotation id="4500">
136
+ <infon key="type">chemical</infon>
137
+ <infon key="identifier">CHEBI:</infon>
138
+ <infon key="annotator">melaniev@ebi.ac.uk</infon>
139
+ <infon key="updated_at">2023-03-21T15:19:42Z</infon>
140
+ <location offset="24" length="10"/>
141
+ <text>Coenzyme A</text>
142
+ </annotation>
143
+ </passage>
144
+ </document>
145
+ </collection>
146
+ ```
147
+
148
+
149
+ ## Annotations in CSV
150
+ The annotations and the relevant sentences they have been found in have also been made
151
+ available as tab-separated CSV files, one for each publication in the dataset. The files can
152
+ be found in directory "annotation_CSV". Each file is named as "unique PubMedCentral ID".csv.
153
+
154
+ The column labels in the CSV files are as follows:
155
+ * "anno_start" --> character start position of the annotation
156
+ * "anno_end" --> character end position of the annotation
157
+ * "anno_text" --> text covered by the annotation
158
+ * "entity_type" --> entity type of the annotation
159
+ * "sentence" --> sentence text in which the annotation was found
160
+ * "section" --> publication section in which the annotation was found
161
+
162
+
163
+ ## Annotations in JSON
164
+ A combined JSON file was created only containing the relevant sentences and associated
165
+ annotations for each publication in the dataset. The file can be found in directory
166
+ "annotation_JSON" under the name "annotations.json".
167
+
168
+ The following keys are used:
169
+ * "PMC4850273" --> unique PubMedCentral of the publication
170
+ * "annotations" --> list of dictionaries for the relevant, annotated sentences of the
171
+ document; each dictionary has the following sub keys
172
+ * "sid" --> unique sentence ID
173
+ * "sent" --> sentence text as string
174
+ * "section" --> publication section the sentence is in
175
+ * "ner" --> nested list of annotations; each sublist contains the following items:
176
+ start character position, end character position, annotation text,
177
+ entity type
178
+
179
+ Here is an example of a sentence and its annotations:
180
+ ```json
181
+ {"PMC4850273": {"annotations":
182
+ [{"sid": 0,
183
+ "sent": "Molecular Dissection of Xyloglucan Recognition in a Prominent Human Gut Symbiont",
184
+ "section": "TITLE",
185
+ "ner": [
186
+ [24,34,"Xyloglucan","chemical"],
187
+ [62,67,"Human","species"],]
188
+ },]
189
+ }}
190
+ ```