aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRncLsn <rnc.lsn@gmail.com>2015-07-03 12:33:55 +0100
committerRncLsn <rnc.lsn@gmail.com>2015-07-03 12:33:55 +0100
commit133dab6e21f263df2baca913d3d0b7a4fd152d08 (patch)
tree88b2783fcb84c0511bf5919ce5602e967b2bdd39
parentafb949a595bf351d4c9f1a8984ed82edbd13b725 (diff)
downloadACQuA-133dab6e21f263df2baca913d3d0b7a4fd152d08.tar.gz
ACQuA-133dab6e21f263df2baca913d3d0b7a4fd152d08.zip
Reactome test: standard and sygenia queries.
-rw-r--r--data/reactome/reactome_sygenia_queries.sparql649
-rw-r--r--test/uk/ac/ox/cs/pagoda/global_tests/SkolemisationTests.java269
-rw-r--r--test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaReactome.java14
3 files changed, 932 insertions, 0 deletions
diff --git a/data/reactome/reactome_sygenia_queries.sparql b/data/reactome/reactome_sygenia_queries.sparql
new file mode 100644
index 0000000..97ba1c9
--- /dev/null
+++ b/data/reactome/reactome_sygenia_queries.sparql
@@ -0,0 +1,649 @@
1^[query1]
2PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
3PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
4SELECT ?x
5WHERE {
6 ?x rdf:type reactome:CellVocabulary
7}
8
9^[query2]
10PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
11PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
12SELECT ?x
13WHERE {
14 ?x reactome:cofactor _:y
15}
16
17^[query3]
18PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
19PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
20SELECT ?x
21WHERE {
22 ?x reactome:participant _:y .
23 _:y rdf:type reactome:PhysicalEntity
24}
25
26^[query4]
27PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
28PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
29SELECT ?x
30WHERE {
31 ?x rdf:type reactome:SequenceRegionVocabulary
32}
33
34^[query5]
35PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
36PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
37SELECT ?x ?y
38WHERE {
39 ?x reactome:bindsTo ?y
40}
41
42^[query6]
43PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
44PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
45SELECT ?x
46WHERE {
47 ?x rdf:type reactome:EntityFeature
48}
49
50^[query7]
51PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
52PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
53SELECT ?x
54WHERE {
55 ?x rdf:type reactome:Score
56}
57
58^[query8]
59PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
60PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
61SELECT ?x
62WHERE {
63 ?x rdf:type reactome:ExperimentalForm
64}
65
66^[query9]
67PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
68PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
69SELECT ?x
70WHERE {
71 ?x reactome:stepProcess _:y .
72 _:y rdf:type reactome:Conversion
73}
74
75^[query10]
76PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
77PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
78SELECT ?x
79WHERE {
80 ?x reactome:stepProcess _:y .
81 _:y rdf:type reactome:Entity
82}
83
84^[query11]
85PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
86PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
87SELECT ?x
88WHERE {
89 ?x rdf:type reactome:PathwayStep
90}
91
92^[query12]
93PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
94PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
95SELECT ?x
96WHERE {
97 ?x rdf:type reactome:RelationshipTypeVocabulary
98}
99
100^[query13]
101PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
102PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
103SELECT ?x
104WHERE {
105 ?x rdf:type reactome:TissueVocabulary
106}
107
108^[query14]
109PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
110PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
111SELECT ?x
112WHERE {
113 _:y reactome:bindsTo ?x
114}
115
116^[query15]
117PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
118PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
119SELECT ?x
120WHERE {
121 ?x reactome:stepConversion _:y
122}
123
124^[query16]
125PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
126PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
127SELECT ?x
128WHERE {
129 ?x rdf:type reactome:Conversion
130}
131
132^[query17]
133PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
134PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
135SELECT ?x
136WHERE {
137 ?x rdf:type reactome:Control
138}
139
140^[query18]
141PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
142PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
143SELECT ?x
144WHERE {
145 ?x rdf:type reactome:Catalysis
146}
147
148^[query19]
149PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
150PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
151SELECT ?x
152WHERE {
153 ?x reactome:stepConversion _:y .
154 _:y rdf:type reactome:Conversion
155}
156
157^[query20]
158PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
159PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
160SELECT ?x
161WHERE {
162 ?x reactome:right _:y .
163 _:y rdf:type reactome:Entity
164}
165
166^[query21]
167PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
168PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
169SELECT ?x ?y
170WHERE {
171 ?x reactome:participant ?y
172}
173
174^[query22]
175PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
176PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
177SELECT ?x
178WHERE {
179 ?x reactome:left _:y
180}
181
182^[query23]
183PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
184PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
185SELECT ?x
186WHERE {
187 ?x reactome:product _:y
188}
189
190^[query24]
191PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
192PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
193SELECT ?x
194WHERE {
195 ?x rdf:type reactome:PhenotypeVocabulary
196}
197
198^[query25]
199PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
200PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
201SELECT ?x
202WHERE {
203 ?x reactome:stepProcess _:y
204}
205
206^[query26]
207PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
208PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
209SELECT ?x
210WHERE {
211 _:y reactome:bindsTo ?x .
212 _:y rdf:type reactome:EntityFeature
213}
214
215^[query27]
216PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
217PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
218SELECT ?x
219WHERE {
220 ?x reactome:cofactor _:y .
221 _:y rdf:type reactome:PhysicalEntity
222}
223
224^[query28]
225PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
226PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
227SELECT ?x ?y
228WHERE {
229 ?x reactome:stepProcess ?y
230}
231
232^[query29]
233PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
234PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
235SELECT ?x
236WHERE {
237 ?x rdf:type reactome:Stoichiometry
238}
239
240^[query30]
241PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
242PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
243SELECT ?x
244WHERE {
245 ?x rdf:type reactome:UtilityClass
246}
247
248^[query31]
249PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
250PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
251SELECT ?x
252WHERE {
253 ?x rdf:type reactome:ChemicalStructure
254}
255
256^[query32]
257PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
258PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
259SELECT ?x
260WHERE {
261 ?x rdf:type reactome:SequenceSite
262}
263
264^[query33]
265PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
266PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
267SELECT ?x
268WHERE {
269 ?x rdf:type reactome:BioSource
270}
271
272^[query34]
273PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
274PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
275SELECT ?x
276WHERE {
277 _:y reactome:bindsTo ?x .
278 _:y rdf:type reactome:UtilityClass
279}
280
281^[query35]
282PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
283PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
284SELECT ?x
285WHERE {
286 ?x rdf:type reactome:ControlledVocabulary
287}
288
289^[query36]
290PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
291PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
292SELECT ?x
293WHERE {
294 ?x rdf:type reactome:Transport
295}
296
297^[query37]
298PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
299PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
300SELECT ?x
301WHERE {
302 ?x reactome:bindsTo _:y
303}
304
305^[query38]
306PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
307PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
308SELECT ?x
309WHERE {
310 ?x reactome:template _:y
311}
312
313^[query39]
314PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
315PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
316SELECT ?x
317WHERE {
318 ?x reactome:participant _:y
319}
320
321^[query40]
322PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
323PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
324SELECT ?x
325WHERE {
326 ?x reactome:controlled _:y
327}
328
329^[query41]
330PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
331PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
332SELECT ?x
333WHERE {
334 ?x rdf:type reactome:ModificationFeature
335}
336
337^[query42]
338PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
339PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
340SELECT ?x ?y
341WHERE {
342 ?y reactome:bindsTo ?x
343}
344
345^[query43]
346PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
347PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
348SELECT ?x
349WHERE {
350 ?x rdf:type reactome:InteractionVocabulary
351}
352
353^[query44]
354PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
355PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
356SELECT ?x
357WHERE {
358 ?x rdf:type reactome:SequenceModificationVocabulary
359}
360
361^[query45]
362PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
363PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
364SELECT ?x
365WHERE {
366 ?x reactome:right _:y .
367 _:y rdf:type reactome:PhysicalEntity
368}
369
370^[query46]
371PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
372PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
373SELECT ?x
374WHERE {
375 ?x reactome:participant _:y .
376 _:y rdf:type reactome:Entity
377}
378
379^[query47]
380PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
381PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
382SELECT ?x
383WHERE {
384 ?x rdf:type reactome:EvidenceCodeVocabulary
385}
386
387^[query48]
388PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
389PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
390SELECT ?x
391WHERE {
392 ?x rdf:type reactome:Complex
393}
394
395^[query49]
396PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
397PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
398SELECT ?x
399WHERE {
400 ?x rdf:type reactome:Provenance
401}
402
403^[query50]
404PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
405PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
406SELECT ?x
407WHERE {
408 ?x rdf:type reactome:SequenceLocation
409}
410
411^[query51]
412PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
413PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
414SELECT ?x
415WHERE {
416 ?x reactome:right _:y
417}
418
419^[query52]
420PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
421PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
422SELECT ?x
423WHERE {
424 ?x rdf:type reactome:Evidence
425}
426
427^[query53]
428PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
429PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
430SELECT ?x
431WHERE {
432 ?x rdf:type reactome:TemplateReaction
433}
434
435^[query54]
436PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
437PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
438SELECT ?x
439WHERE {
440 ?x rdf:type reactome:Entity
441}
442
443^[query55]
444PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
445PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
446SELECT ?x
447WHERE {
448 ?x reactome:bindsTo _:y .
449 _:y rdf:type reactome:BindingFeature
450}
451
452^[query56]
453PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
454PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
455SELECT ?x
456WHERE {
457 ?x rdf:type reactome:Xref
458}
459
460^[query57]
461PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
462PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
463SELECT ?x
464WHERE {
465 ?x rdf:type reactome:BiochemicalReaction
466}
467
468^[query58]
469PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
470PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
471SELECT ?x
472WHERE {
473 ?x reactome:stepProcess _:y .
474 _:y rdf:type reactome:Interaction
475}
476
477^[query59]
478PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
479PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
480SELECT ?x
481WHERE {
482 ?x rdf:type reactome:BindingFeature
483}
484
485^[query60]
486PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
487PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
488SELECT ?x
489WHERE {
490 ?x rdf:type reactome:RelationshipXref
491}
492
493^[query61]
494PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
495PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
496SELECT ?x
497WHERE {
498 ?x rdf:type reactome:PhysicalEntity
499}
500
501^[query62]
502PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
503PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
504SELECT ?x
505WHERE {
506 ?x rdf:type reactome:CellularLocationVocabulary
507}
508
509^[query63]
510PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
511PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
512SELECT ?x
513WHERE {
514 ?x rdf:type reactome:EntityReference
515}
516
517^[query64]
518PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
519PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
520SELECT ?x
521WHERE {
522 ?x reactome:bindsTo _:y .
523 _:y rdf:type reactome:UtilityClass
524}
525
526^[query65]
527PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
528PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
529SELECT ?x
530WHERE {
531 ?x reactome:left _:y .
532 _:y rdf:type reactome:Entity
533}
534
535^[query66]
536PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
537PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
538SELECT ?x
539WHERE {
540 ?x rdf:type reactome:KPrime
541}
542
543^[query67]
544PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
545PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
546SELECT ?x
547WHERE {
548 ?x rdf:type reactome:GeneticInteraction
549}
550
551^[query68]
552PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
553PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
554SELECT ?x
555WHERE {
556 ?x reactome:bindsTo _:y .
557 _:y rdf:type reactome:EntityFeature
558}
559
560^[query69]
561PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
562PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
563SELECT ?x
564WHERE {
565 ?x rdf:type reactome:Interaction
566}
567
568^[query70]
569PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
570PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
571SELECT ?x
572WHERE {
573 ?x rdf:type reactome:ExperimentalFormVocabulary
574}
575
576^[query71]
577PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
578PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
579SELECT ?x
580WHERE {
581 ?x reactome:left _:y .
582 _:y rdf:type reactome:PhysicalEntity
583}
584
585^[query72]
586PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
587PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
588SELECT ?x
589WHERE {
590 ?x rdf:type reactome:SequenceInterval
591}
592
593^[query73]
594PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
595PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
596SELECT ?x
597WHERE {
598 ?x rdf:type reactome:BiochemicalPathwayStep
599}
600
601^[query74]
602PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
603PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
604SELECT ?x
605WHERE {
606 ?x rdf:type reactome:Pathway
607}
608
609^[query75]
610PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
611PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
612SELECT ?x
613WHERE {
614 ?x reactome:controller _:y
615}
616
617^[query76]
618PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
619PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
620SELECT ?x
621WHERE {
622 _:y reactome:bindsTo ?x .
623 _:y rdf:type reactome:BindingFeature
624}
625
626^[query77]
627PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
628PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
629SELECT ?x
630WHERE {
631 ?x rdf:type reactome:SmallMoleculeReference
632}
633
634^[query78]
635PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
636PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
637SELECT ?x
638WHERE {
639 ?x rdf:type reactome:DeltaG
640}
641
642^[query79]
643PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
644PREFIX reactome: <http://www.biopax.org/release/biopax-level3.owl#>
645SELECT ?x
646WHERE {
647 ?x rdf:type reactome:EntityReferenceTypeVocabulary
648}
649
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/SkolemisationTests.java b/test/uk/ac/ox/cs/pagoda/global_tests/SkolemisationTests.java
new file mode 100644
index 0000000..2fc682b
--- /dev/null
+++ b/test/uk/ac/ox/cs/pagoda/global_tests/SkolemisationTests.java
@@ -0,0 +1,269 @@
1package uk.ac.ox.cs.pagoda.global_tests;
2
3import org.semanticweb.owlapi.apibinding.OWLManager;
4import org.semanticweb.owlapi.model.*;
5import org.testng.Assert;
6import org.testng.annotations.Test;
7import uk.ac.ox.cs.pagoda.query.AnswerTuple;
8import uk.ac.ox.cs.pagoda.query.AnswerTuples;
9import uk.ac.ox.cs.pagoda.query.QueryRecord;
10import uk.ac.ox.cs.pagoda.reasoner.QueryReasoner;
11import uk.ac.ox.cs.pagoda.util.TestUtil;
12
13import java.io.IOException;
14import java.nio.file.Files;
15import java.nio.file.Paths;
16
17public class SkolemisationTests {
18
19 public static final String NS = "http://example.org/test#%s";
20
21 private IRI getEntityIRI(String name) {
22 return IRI.create(String.format(NS, name));
23 }
24
25// @Test
26 public void commonSuccessorTest() throws OWLOntologyCreationException, IOException, OWLOntologyStorageException {
27
28 /*
29 * Build test ontology
30 * */
31
32 OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
33 OWLDataFactory factory = manager.getOWLDataFactory();
34 OWLOntology ontology = manager.createOntology();
35
36 OWLClass classA = factory.getOWLClass(getEntityIRI("A"));
37 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(classA));
38 OWLClass classB = factory.getOWLClass(getEntityIRI("B"));
39 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(classB));
40 OWLClass classC = factory.getOWLClass(getEntityIRI("C"));
41 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(classC));
42 OWLNamedIndividual c = factory.getOWLNamedIndividual(getEntityIRI("c"));
43 OWLNamedIndividual d = factory.getOWLNamedIndividual(getEntityIRI("d"));
44 OWLObjectProperty roleR = factory.getOWLObjectProperty(IRI.create(String.format(NS, "R")));
45 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleR));
46
47 // Class assertions
48 manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(classA, c)); // A(c)
49 manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(classA, d)); // A(d)
50
51 // Minimum cardinality axiom
52 manager.addAxiom(ontology,
53 factory.getOWLSubClassOfAxiom(classA,
54 factory.getOWLObjectUnionOf(
55 factory.getOWLObjectSomeValuesFrom(roleR, classB),
56 factory.getOWLObjectSomeValuesFrom(roleR, classC))));
57
58 /*
59 * Save the ontology
60 * */
61
62// manager.saveOntology(ontology, Files.newOutputStream(Paths.get("/home/alessandro/Desktop/test-ontology.owl")));
63
64 /*
65 * Test one query
66 * */
67
68 QueryReasoner pagoda = QueryReasoner.getInstance(ontology);
69 pagoda.loadOntology(ontology);
70 if(pagoda.preprocess()) {
71 String queryStr = "select distinct ?x ?y " +
72 " where { "
73 + " ?x <" + roleR.toStringID() + "> _:z . "
74 + " ?y <" + roleR.toStringID() + "> _:z " +
75 " }";
76 QueryRecord queryRecord = pagoda.getQueryManager().create(queryStr);
77 pagoda.evaluate(queryRecord);
78 AnswerTuples answers = queryRecord.getAnswers();
79 System.out.println("Difficulty: " + queryRecord.getDifficulty());
80 int count = 0;
81 for(AnswerTuple ans; answers.isValid(); answers.moveNext()) {
82 ans = answers.getTuple();
83 TestUtil.logInfo(ans);
84 count++;
85 }
86 Assert.assertEquals(count, 2);
87 }
88 pagoda.dispose();
89 }
90
91// @Test
92 public void yTest() throws OWLOntologyCreationException, IOException, OWLOntologyStorageException {
93
94 /*
95 * Build test ontology
96 * */
97
98 OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
99 OWLDataFactory factory = manager.getOWLDataFactory();
100 OWLOntology ontology = manager.createOntology();
101
102 OWLClass classA = factory.getOWLClass(getEntityIRI("A"));
103 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(classA));
104 OWLClass classB = factory.getOWLClass(getEntityIRI("B"));
105 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(classB));
106 OWLClass classC = factory.getOWLClass(getEntityIRI("C"));
107 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(classC));
108 OWLClass classD = factory.getOWLClass(getEntityIRI("D"));
109 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(classD));
110 OWLNamedIndividual a = factory.getOWLNamedIndividual(getEntityIRI("a"));
111 OWLNamedIndividual b = factory.getOWLNamedIndividual(getEntityIRI("b"));
112 OWLNamedIndividual c = factory.getOWLNamedIndividual(getEntityIRI("c"));
113 OWLNamedIndividual d = factory.getOWLNamedIndividual(getEntityIRI("d"));
114 OWLObjectProperty roleR = factory.getOWLObjectProperty(IRI.create(String.format(NS, "R")));
115 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleR));
116 OWLObjectProperty roleS = factory.getOWLObjectProperty(IRI.create(String.format(NS, "S")));
117 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleS));
118 OWLObjectProperty roleP = factory.getOWLObjectProperty(IRI.create(String.format(NS, "P")));
119 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleP));
120
121 // Class assertions
122 manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(classD, a)); // D(a)
123 manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(classD, b)); // D(b)
124 manager.addAxiom(ontology, factory.getOWLObjectPropertyAssertionAxiom(roleS, c, a)); // S(c,a)
125 manager.addAxiom(ontology, factory.getOWLObjectPropertyAssertionAxiom(roleP, d, b)); // P(d,b)
126
127 // Axioms
128 // subsetOf(D someValuesFrom(R owl:Thing))
129 manager.addAxiom(ontology,
130 factory.getOWLSubClassOfAxiom(classD,
131 factory.getOWLObjectSomeValuesFrom(roleR,
132 factory.getOWLThing())));
133 // subsetOf(someValuesFrom(inverseOf(S) owl:Thing) allValuesFrom(R A))
134 manager.addAxiom(ontology,
135 factory.getOWLSubClassOfAxiom(factory.getOWLObjectSomeValuesFrom(roleS.getInverseProperty(),
136 factory.getOWLThing()),
137 factory.getOWLObjectAllValuesFrom(roleR, classA)));
138 // subsetOf(someValuesFrom(inverseOf(P) owl:Thing) B)
139 manager.addAxiom(ontology,
140 factory.getOWLSubClassOfAxiom(factory.getOWLObjectSomeValuesFrom(roleP.getInverseProperty(),
141 factory.getOWLThing()),
142 classB));
143 // subsetOf(someValuesFrom(R A) C)
144 manager.addAxiom(ontology,
145 factory.getOWLSubClassOfAxiom(factory.getOWLObjectSomeValuesFrom(roleR, classA), classC));
146
147 /*
148 * Save the ontology
149 * */
150
151 manager.saveOntology(ontology, Files.newOutputStream(Paths.get("/home/alessandro/Desktop/test-ontology.owl")));
152
153 /*
154 * Test one query
155 * */
156
157 QueryReasoner pagoda = QueryReasoner.getInstance(ontology);
158 pagoda.loadOntology(ontology);
159 if(pagoda.preprocess()) {
160 String queryStr = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> " +
161 "select distinct ?x" +
162 " where { "
163// + " ?x rdf:type " + classB + " ."
164// + " ?x " + roleR + " "+ "_:y . "
165 + " ?x rdf:type " + classC +
166 " }";
167 QueryRecord queryRecord = pagoda.getQueryManager().create(queryStr);
168 System.out.println(queryRecord);
169 pagoda.evaluate(queryRecord);
170 AnswerTuples answers = queryRecord.getAnswers();
171 System.out.println("Difficulty: " + queryRecord.getDifficulty());
172 int count = 0;
173 for(AnswerTuple ans; answers.isValid(); answers.moveNext()) {
174 ans = answers.getTuple();
175 TestUtil.logInfo(ans);
176 count++;
177 }
178// Assert.assertEquals(count, 1);
179 }
180 pagoda.dispose();
181 }
182
183 @Test
184 public void rTest() throws OWLOntologyCreationException, IOException, OWLOntologyStorageException {
185
186 /*
187 * Build test ontology
188 * */
189
190 OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
191 OWLDataFactory factory = manager.getOWLDataFactory();
192 OWLOntology ontology = manager.createOntology();
193
194 OWLClass classA = factory.getOWLClass(getEntityIRI("A"));
195 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(classA));
196 OWLClass classB = factory.getOWLClass(getEntityIRI("B"));
197 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(classB));
198// OWLClass classC = factory.getOWLClass(getEntityIRI("C"));
199// manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(classC));
200// OWLClass classD = factory.getOWLClass(getEntityIRI("D"));
201// manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(classD));
202 OWLNamedIndividual a = factory.getOWLNamedIndividual(getEntityIRI("a"));
203 OWLNamedIndividual b = factory.getOWLNamedIndividual(getEntityIRI("b"));
204 OWLNamedIndividual c = factory.getOWLNamedIndividual(getEntityIRI("c"));
205// OWLNamedIndividual d = factory.getOWLNamedIndividual(getEntityIRI("d"));
206 OWLObjectProperty roleR = factory.getOWLObjectProperty(IRI.create(String.format(NS, "R")));
207 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleR));
208// OWLObjectProperty roleF = factory.getOWLObjectProperty(IRI.create(String.format(NS, "F")));
209// manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleF));
210 OWLObjectProperty roleP = factory.getOWLObjectProperty(IRI.create(String.format(NS, "P")));
211 manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleP));
212// OWLObjectProperty roleL = factory.getOWLObjectProperty(IRI.create(String.format(NS, "L")));
213// manager.addAxiom(ontology, factory.getOWLDeclarationAxiom(roleL));
214
215 // Class assertions
216 manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(classA, a)); // A(a)
217 manager.addAxiom(ontology, factory.getOWLClassAssertionAxiom(classA, b)); // A(b)
218 manager.addAxiom(ontology, factory.getOWLObjectPropertyAssertionAxiom(roleP, c, a)); // P(c,a)
219
220 // Axioms
221 // subsetOf(A someValuesFrom(R owl:Thing))
222 manager.addAxiom(ontology,
223 factory.getOWLSubClassOfAxiom(classA,
224 factory.getOWLObjectSomeValuesFrom(roleR,
225 factory.getOWLThing())));
226
227 // inverseFunctional(R)
228 manager.addAxiom(ontology,
229 factory.getOWLInverseFunctionalObjectPropertyAxiom(roleR));
230
231 // subsetOf(someValuesFrom(inverseOf(P) owl:thing) B)
232 manager.addAxiom(ontology,
233 factory.getOWLSubClassOfAxiom(factory.getOWLObjectSomeValuesFrom(roleP.getInverseProperty(),
234 factory.getOWLThing()),
235 classB));
236 /*
237 * Save the ontology
238 * */
239
240 manager.saveOntology(ontology, Files.newOutputStream(Paths.get("/home/alessandro/Desktop/test-ontology.owl")));
241
242 /*
243 * Test one query
244 * */
245
246 QueryReasoner pagoda = QueryReasoner.getInstance(ontology);
247 pagoda.loadOntology(ontology);
248 if(pagoda.preprocess()) {
249 String queryStr = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> " +
250 "select distinct ?x" +
251 " where { "
252 + " ?x rdf:type " + classB +
253 " }";
254 QueryRecord queryRecord = pagoda.getQueryManager().create(queryStr);
255 System.out.println(queryRecord);
256 pagoda.evaluate(queryRecord);
257 AnswerTuples answers = queryRecord.getAnswers();
258 System.out.println("Difficulty: " + queryRecord.getDifficulty());
259 int count = 0;
260 for(AnswerTuple ans; answers.isValid(); answers.moveNext()) {
261 ans = answers.getTuple();
262 TestUtil.logInfo(ans);
263 count++;
264 }
265// Assert.assertEquals(count, 1);
266 }
267 pagoda.dispose();
268 }
269}
diff --git a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaReactome.java b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaReactome.java
index 5c05b94..30f3d93 100644
--- a/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaReactome.java
+++ b/test/uk/ac/ox/cs/pagoda/global_tests/TestPagodaReactome.java
@@ -23,4 +23,18 @@ public class TestPagodaReactome {
23 .run(); 23 .run();
24 } 24 }
25 25
26 @Test(groups = {"sygenia"})
27 public void justExecute_sygenia() throws IOException {
28 String ontoDir = TestUtil.getConfig().getProperty("ontoDir");
29
30 Pagoda.builder()
31 .ontology(Paths.get(ontoDir, "reactome/biopax-level3-processed.owl"))
32 .data(Paths.get(ontoDir, "reactome/data/sample_10.ttl"))
33 .query(Paths.get(ontoDir, "reactome/reactome_sygenia_queries.sparql"))
34 .classify(true)
35 .hermit(true)
36 .build()
37 .run();
38 }
39
26} 40}