-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path05_04_diseaseGetTargets.ttl
86 lines (79 loc) · 3.28 KB
/
05_04_diseaseGetTargets.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
@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/> .
<#targetsByDisease> a api:API ;
rdfs:label "Disease"@en ;
api:sparqlEndpoint <http://alpha.openphacts.org:8890/sparql/> ;
api:contentNegotiation api:parameterBased ;
api:variable <#input> ;
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:IntermediateExpansionEndpoint ;
api:name "Targets for Disease: List" ;
api:description "A list of targets which correspond to the disease {uri}.";
api:uriTemplate "/disease/getTargets?uri={uri}" ;
api:itemTemplate "{uri}" ;
api:exampleRequestPath "/disease/getTargets?uri=http%3A%2F%2Flinkedlifedata.com%2Fresource%2Fumls%2Fid%2FC0004238" ;
api:selector [
api:where "GRAPH <http://rdf.imim.es> {
?gene_disease_assoc sio:SIO_000628 ?item .
?item a ncit:C16612 ;
void:inDataset ?geneDataset .
?umls_disease_uri foaf:name ?diseaseName ;
void:inDataset ?diseaseDataset .
?gene_disease_assoc sio:SIO_000628 ?umls_disease_uri .
}" ;
api:expansionVariable "item" ;
] ;
api:viewer <#diseaseByTargetViewer> ;
api:defaultViewer <#diseaseByTargetViewer> . ] .
<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 disease URI. e.g.: http://linkedlifedata.com/resource/umls/id/C0004238" ;
rdfs:range rdfs:Resource .
<#diseaseByTargetViewer> a api:Viewer ;
api:name "diseaseByTargetViewer" ;
api:template
"?umls_disease_uri foaf:name ?diseaseName ;
void:inDataset ?diseaseDataset .
?item ops:forDisease ?umls_disease_uri ;
void:inDataset ?geneDataset .
?ims_uniprot_target_uri void:inDataset <http://purl.uniprot.org> .
?ims_cw_target_uri skos:prefLabel ?prefLabel ;
void:inDataset <http://www.conceptwiki.org> .
";
api:where
"GRAPH <http://purl.uniprot.org> {
?ims_uniprot_target_uri uniprot:existence ?existence .
}
GRAPH <http://rdf.imim.es> {
?gene_disease_assoc sio:SIO_000628 ?item .
?item a ncit:C16612 .
?item void:inDataset ?geneDataset .
?umls_disease_uri foaf:name ?diseaseName ;
void:inDataset ?diseaseDataset .
?gene_disease_assoc sio:SIO_000628 ?umls_disease_uri .
}
OPTIONAL{
GRAPH <http://www.conceptwiki.org> {
?ims_cw_target_uri skos:prefLabel ?prefLabel .
}}" .