-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathNamedEntity.test.js
432 lines (431 loc) · 17.9 KB
/
NamedEntity.test.js
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
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
import test from 'ava';
import gql from 'graphql-tag';
import { client } from '../../client';
test('NamedEntity path: (NamedEntity)<-[MENTIONS]-(Abstract)-[HAS_FRAGMENT]->(FromAbstract:Fragment)-[MENTIONS]->(GeneSymbol)', async t => {
t.plan(1);
const query = gql`
query {
NamedEntity(first: 3) {
id
external_ids
type
value
mentionedInAbstracts(first: 3) {
count
abstract {
_hash_id
fragments(first: 3) {
text
sequence
kind
next {
kind
}
mentionsGeneSymbols(first: 3) {
score
geneSymbol {
sid
taxid
}
}
}
}
}
}
}
`;
const expected = {
"data": {
"NamedEntity": [
{
"id": "55b3e4310f0c317e396beb0bb69cf00e",
"external_ids": null,
"type": "gene",
"value": "herpes simplex virus type 1 (HSV1)",
"mentionedInAbstracts": [
{
"count": 1,
"abstract": {
"_hash_id": "5390ca71c4cd71a4f2dcbeff2ba3ed01",
"fragments": [
{
"text": "The addition of O-linked oligosaccharides did not occur in cells treated with the ionophore monensin or in a ricin-resistant cell line defective in the processing of N-linked oligosaccharides",
"sequence": 3,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
},
{
"text": "Fatty acid acylation (principally of gE) could be detected just prior to the shifts, whereas conversion of high-mannose-type N-linked oligosaccharides to the complex type occurred coincident with the shifts",
"sequence": 2,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
},
{
"text": "Other posttranslational modifications of HSV1 glycoproteins (designated gB, gC, gD and gE) were related temporally to the discrete shifts in electrophoretic mobilities that signal acquisition of the O-linked oligosaccharides",
"sequence": 1,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [
{
"score": 2.1439621448516846,
"geneSymbol": {
"sid": "GD",
"taxid": "9606",
"__typename": "GeneSymbol"
},
"__typename": "_FromAbstractMentionsGeneSymbols"
}
],
"__typename": "FromAbstract"
}
],
"__typename": "Abstract"
},
"__typename": "_NamedEntityMentionedInAbstracts"
},
{
"count": 1,
"abstract": {
"_hash_id": "4e20cf2e010efba39f5904ec87588e7f",
"fragments": [
{
"text": "The addition of O-linked oligosaccharides did not occur in cells treated with the ionophore monensin or in a ricinresistant cell line defective in the processing of N-linked oligosaccharides",
"sequence": 3,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
},
{
"text": "Abstract The O-linked oligosaccharides on mature forms of herpes simplex virus type 1 (HSV1) glycoproteins were characterized, and were found to account largely for the lower electrophoretic mobilities of these forms relative to the mobilities of immature forms",
"sequence": 0,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
},
{
"text": "Other posttranslational modifications of HSV1 glycoproteins (designated gB, gC, gD and gE) were related temporally to the discrete shifts in electrophoretic mobilities that signal acquisition of the O-linked oligosaccharides",
"sequence": 1,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [
{
"score": 2.1439621448516846,
"geneSymbol": {
"sid": "GD",
"taxid": "9606",
"__typename": "GeneSymbol"
},
"__typename": "_FromAbstractMentionsGeneSymbols"
}
],
"__typename": "FromAbstract"
}
],
"__typename": "Abstract"
},
"__typename": "_NamedEntityMentionedInAbstracts"
}
],
"__typename": "NamedEntity"
},
{
"id": "1c10fef8cd88ab6db4f9592f00722d08",
"external_ids": null,
"type": "gene",
"value": "HSV1 glycoproteins",
"mentionedInAbstracts": [
{
"count": 2,
"abstract": {
"_hash_id": "4e20cf2e010efba39f5904ec87588e7f",
"fragments": [
{
"text": "The addition of O-linked oligosaccharides did not occur in cells treated with the ionophore monensin or in a ricinresistant cell line defective in the processing of N-linked oligosaccharides",
"sequence": 3,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
},
{
"text": "Abstract The O-linked oligosaccharides on mature forms of herpes simplex virus type 1 (HSV1) glycoproteins were characterized, and were found to account largely for the lower electrophoretic mobilities of these forms relative to the mobilities of immature forms",
"sequence": 0,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
},
{
"text": "Other posttranslational modifications of HSV1 glycoproteins (designated gB, gC, gD and gE) were related temporally to the discrete shifts in electrophoretic mobilities that signal acquisition of the O-linked oligosaccharides",
"sequence": 1,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [
{
"score": 2.1439621448516846,
"geneSymbol": {
"sid": "GD",
"taxid": "9606",
"__typename": "GeneSymbol"
},
"__typename": "_FromAbstractMentionsGeneSymbols"
}
],
"__typename": "FromAbstract"
}
],
"__typename": "Abstract"
},
"__typename": "_NamedEntityMentionedInAbstracts"
},
{
"count": 2,
"abstract": {
"_hash_id": "5390ca71c4cd71a4f2dcbeff2ba3ed01",
"fragments": [
{
"text": "The addition of O-linked oligosaccharides did not occur in cells treated with the ionophore monensin or in a ricin-resistant cell line defective in the processing of N-linked oligosaccharides",
"sequence": 3,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
},
{
"text": "Fatty acid acylation (principally of gE) could be detected just prior to the shifts, whereas conversion of high-mannose-type N-linked oligosaccharides to the complex type occurred coincident with the shifts",
"sequence": 2,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
},
{
"text": "Other posttranslational modifications of HSV1 glycoproteins (designated gB, gC, gD and gE) were related temporally to the discrete shifts in electrophoretic mobilities that signal acquisition of the O-linked oligosaccharides",
"sequence": 1,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [
{
"score": 2.1439621448516846,
"geneSymbol": {
"sid": "GD",
"taxid": "9606",
"__typename": "GeneSymbol"
},
"__typename": "_FromAbstractMentionsGeneSymbols"
}
],
"__typename": "FromAbstract"
}
],
"__typename": "Abstract"
},
"__typename": "_NamedEntityMentionedInAbstracts"
}
],
"__typename": "NamedEntity"
},
{
"id": "255821001",
"external_ids": [
"MESH:D010020"
],
"type": "disease",
"value": "ON",
"mentionedInAbstracts": [
{
"count": 4,
"abstract": {
"_hash_id": "9db570902eb8e42e6fc051e758d73789",
"fragments": [
{
"text": "There were significant correlations between the ABCB1 rs1045642 mutant and SONFH in the prednisone-use and methylprednisolone/prednisone-use populations",
"sequence": 5,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [
{
"score": 3.8224406242370605,
"geneSymbol": {
"sid": "ABCB1",
"taxid": "9606",
"__typename": "GeneSymbol"
},
"__typename": "_FromAbstractMentionsGeneSymbols"
}
],
"__typename": "FromAbstract"
},
{
"text": "We explored the relationship between polymorphisms and steroid-induced osteonecrosis of the femoral head (SONFH) incidence with variables",
"sequence": 2,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
},
{
"text": "Steroid treatment has become recognized as an important risk factor for avascular osteonecrosis of the femoral head",
"sequence": 0,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
}
],
"__typename": "Abstract"
},
"__typename": "_NamedEntityMentionedInAbstracts"
},
{
"count": 2,
"abstract": {
"_hash_id": "ed103594f11e091208581033a88fba26",
"fragments": [
{
"text": "Furthermore, the reversible nature of the weak host–guest cross-links enables infiltration and migration of external cells into Ci-I gelatin hydrogels, thereby promoting the participation of endogenous cells in the healing process",
"sequence": 4,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
},
{
"text": "However, most conventional hydrogels cannot be injected after gelation and do not support the infiltration of cells because of the static nature of their network structure",
"sequence": 1,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
},
{
"text": "Our findings show that Ci-I hydrogels can mediate sustained delivery of small hydrophobic molecular drugs (e.g., icaritin) to boost differentiation of stem cells while avoiding the adverse effects (e.g., in treatment of bone necrosis) associated with high drug dosage",
"sequence": 5,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
}
],
"__typename": "Abstract"
},
"__typename": "_NamedEntityMentionedInAbstracts"
},
{
"count": 2,
"abstract": {
"_hash_id": "4c138a6ded0fd43a4de04b08e3ac7127",
"fragments": [
{
"text": "In fact, if the articular surface subsides more than 2 mm, total hip arthroplasty is preferable",
"sequence": 8,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
},
{
"text": "CONCLUSIONS: The pericollapse stage with distinct clinical and imaging characteristics provides a last good opportunity for the use of joint-preserving techniques",
"sequence": 9,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
},
{
"text": "Accumulating evidence has indicated that these findings may be secondary to the changes after subchondral fractures",
"sequence": 5,
"kind": "Abstract",
"next": {
"kind": "Abstract",
"__typename": "FromAbstract"
},
"mentionsGeneSymbols": [],
"__typename": "FromAbstract"
}
],
"__typename": "Abstract"
},
"__typename": "_NamedEntityMentionedInAbstracts"
}
],
"__typename": "NamedEntity"
}
]
}
};
await client
.query({ query })
.then(data => {
t.deepEqual(data.data, expected.data);
})
.catch(error => {
t.fail(error.message);
});
});