-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path05_06_associationsByTarget.ttl
105 lines (97 loc) · 4.49 KB
/
05_06_associationsByTarget.ttl
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
@base <http://www.openphacts.org/api> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix api: <http://purl.org/linked-data/api/vocab#> .
@prefix rel: <http://vocab.org/relationship/> .
@prefix void: <http://rdfs.org/ns/void#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix sio: <http://semanticscience.org/resource/> .
@prefix ops: <http://www.openphacts.org/api#> .
@prefix cito: <http://purl.org/spar/cito/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ncit: <http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#> .
@prefix uniprot: <http://purl.uniprot.org/core/> .
<#diseaseByTarget> a api:API ;
rdfs:label "Disease"@en ;
api:sparqlEndpoint <http://alpha.openphacts.org:8890/sparql/> ;
api:contentNegotiation api:parameterBased ;
api:variable <#input> ;
api:variable rdf:type ;
api:dataset <http://rdf.imim.es> ;
api:vocabulary <http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#> ;
api:vocabulary <http://semanticscience.org/resource/> ;
api:description "An API configuration to return information about diseases" ;
api:endpoint [
a api:ListEndpoint ;
api:name "Associations for Target: List" ;
api:description "A list of disease-target associations which correspond to a target {uri}.";
api:uriTemplate "/disease/assoc/byTarget?uri={uri}" ;
api:itemTemplate "{uri}" ;
api:exampleRequestPath "/disease/assoc/byTarget?uri=http%3A%2F%2Fpurl.uniprot.org%2Funiprot%2FQ9Y5Y9" ;
api:selector <#assocByTargetViewer> ;
api:viewer <#assocByTargetViewer> ;
api:defaultViewer <#assocByTargetViewer> . ] .
<http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#> api:label "ncit" .
<http://semanticscience.org/resource/> api:label "sio" .
<#input> api:name "uri" ;
api:label "uri";
api:value "A target URI. e.g.: http://purl.uniprot.org/uniprot/Q9Y5Y9" ;
rdfs:range rdfs:Resource .
rdf:type api:name "assoc_type" ;
api:label "assoc_type" ;
api:filterVariable "?item";
api:value "One of the following association type URIs: http://semanticscience.org/resource/SIO_001119 (gene-disease association linked with causal mutation), http://semanticscience.org/resource/SIO_001120 (therapeutic gene-disease association), http://semanticscience.org/resource/SIO_001121 (gene-disease biomarker association), http://semanticscience.org/resource/SIO_001122 (gene-disease association linked with genetic variation), http://semanticscience.org/resource/SIO_001123 (gene-disease association linked with altered gene expression), http://semanticscience.org/resource/SIO_001124 (gene-disease association linked with post-translational modification)" ;
a rdf:Property .
<#assocByTargetViewer> a api:Viewer ;
api:name "assocByTargetViewer" ;
api:template
"?item ops:disease ?disease ;
ops:gene ?dg_gene_uri ;
rdf:type ?type ;
dcterms:description ?description ;
ops:pmid ?pubmed_id ;
ops:primarySource ?primarySource ;
void:inDataset ?assocDataset .
?type rdfs:label ?type_label .
?disease foaf:name ?diseaseName ;
ops:diseaseClass ?diseaseClass ;
void:inDataset ?diseaseDataset .
?diseaseClass foaf:name ?diseaseClassName ;
void:inDataset ?diseaseClassDataset .
?dg_gene_uri ops:encodes ?uniprot_target_uri ;
void:inDataset ?geneDataset .
?uniprot_target_uri skos:exactMatch ?cw_target_uri ;
void:inDataset <http://purl.uniprot.org> .
?cw_target_uri skos:prefLabel ?cw_prefLabel ;
void:inDataset <http://www.conceptwiki.org> .
";
api:where
"GRAPH <http://purl.uniprot.org> {
?uniprot_target_uri uniprot:existence ?existence .
}
GRAPH <http://rdf.imim.es> {
?item sio:SIO_000628 ?dg_gene_uri .
?dg_gene_uri rdf:type ncit:C16612 ;
void:inDataset ?geneDataset .
?item rdf:type ?type .
?type rdfs:label ?type_label .
?item sio:SIO_000253 ?primarySource .
?item sio:SIO_000628 ?disease .
?disease rdf:type ncit:C7057 ;
foaf:name ?diseaseName ;
void:inDataset ?diseaseDataset .
?item void:inDataset ?assocDataset .
OPTIONAL { ?disease sio:SIO_000095 ?diseaseClass .
?diseaseClass foaf:name ?diseaseClassName ;
void:inDataset ?diseaseClassDataset .
}
OPTIONAL { ?item dcterms:description ?description .}
OPTIONAL { ?item sio:SIO_000772 ?pubmed_id . }
}
OPTIONAL {GRAPH <http://www.conceptwiki.org> {
?cw_target_uri skos:prefLabel ?cw_prefLabel .
}}" .