mevol commited on
Commit
94e6a2f
1 Parent(s): 58bece1

Update README.md

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