-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqueries.pro
More file actions
65 lines (51 loc) · 1.69 KB
/
Copy pathqueries.pro
File metadata and controls
65 lines (51 loc) · 1.69 KB
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
:- use_module(library(semweb/rdf_library)).
:- use_module(library(semweb/rdf_http_plugin)).
:- use_module(library(semweb/rdf_cache)).
:- use_module(library(semweb/rdf11)).
:- rdf_attach_library('void.ttl').
:- use_module(library(sparkle)).
:- use_module(library(obo_metadata/oio)).
:- use_module(library(obo_ro/ro), [only_in_taxon/2, never_in_taxon/2]).
:- use_module(library(rdf_owl/owl)).
:- use_module(library(rdf_owl/svf_entailment)).
:- use_module(library(rdf_owl/reasoner_adv)).
:- use_module(library(rdf_owl)).
:- rdf_set_cache_options([ global_directory('RDF-Cache'),
create_global_directory(true)
]).
:- rdf_register_ns(obo,'http://purl.obolibrary.org/obo/').
:- rdf_register_ns(oio,'http://www.geneontology.org/formats/oboInOwl#').
l :-
rdf_load_library(ext),
rdf_load_library(ro).
expand((subClassOf(C,R),
owl_some(R,never_in_taxon,T)
),
( subClassOf(C,InTaxonR),
owl_some(InTaxonR,in_taxon,ComplR),
complementOf(ComplR,T)
)).
%:- debug(sparkle).
xref_src(C,X,A,V) :-
has_dbxref_axiom(C,X,A),
rdf(A,oio:source,V).
subclass_of_src(C,X,A,V) :-
subClassOf_axiom(C,X,A),
rdf(A,oio:source,V).
wq(Q) :-
format('~n===~nQuery: ~w~n~n',[Q]),
create_sparql_select(Q,S),
format('Sparql:~n ~w',[S]),
nl.
wex(From,To) :-
format('~n===~nTr: ~w -> ~w~n~n',[From,To]),
create_sparql_construct(To,From,S),
format('Sparql:~n ~w',[S]),
nl.
w :-
nl,
wq(xref_src(_,_,_,_)),
wq(subclass_of_src(_,_,_,_)),
forall(expand(From,To),
wex(From,To)),
nl.