-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path01_01_compoundInfo.ttl
More file actions
205 lines (199 loc) · 8.2 KB
/
01_01_compoundInfo.ttl
File metadata and controls
205 lines (199 loc) · 8.2 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
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
@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 drugbank: <http://bio2rdf.org/drugbank_vocabulary:> .
@prefix sio: <http://semanticscience.org/resource/> .
@prefix obo: <http://purl.obolibrary.org/obo/> .
@prefix cheminf: <http://semanticscience.org/resource/> .
@prefix qudt: <http://qudt.org/1.1/schema/qudt#> .
@prefix ops: <http://www.openphacts.org/api#> .
@prefix cito: <http://purl.org/spar/cito/> .
@prefix aers: <http://aers.data2semantics.org/resource/> .
@prefix aersv: <http://aers.data2semantics.org/vocab/> .
@prefix scco: <http://rdf.ebi.ac.uk/terms/surechembl#>.
<#compound> a api:API ;
rdfs:label "Compound"@en ;
api:sparqlEndpoint <http://alpha.openphacts.org:8890/sparql/> ;
api:contentNegotiation api:parameterBased ;
api:variable <#input> ;
api:dataset <http://www.conceptwiki.org> ;
api:dataset <http://www.ebi.ac.uk/chembl>;
api:dataset <http://www.openphacts.org/bio2rdf/drugbank> ;
api:dataset <http://www.ebi.ac.uk/surechembl> ;
api:vocabulary <http://semanticscience.org/resource/> ;
api:vocabulary <http://bio2rdf.org/drugbank_vocabulary:> ;
api:vocabulary <http://www.w3.org/2004/02/skos/core#> ;
api:description "An API configuration to return information about compounds" ;
api:endpoint [
a api:ItemEndpoint ;
api:name "Compound Information" ;
api:description "Returns information about a single compound including (but not limited to): molecular weight, biotransformation, protein binding and toxicity. Adverse event data (AERS) is returned where available, as well as drug/drug interactions.";
api:uriTemplate "/compound?uri={uri}" ;
api:itemTemplate "{uri}" ;
api:exampleRequestPath "/compound?uri=http%3A%2F%2Fwww.conceptwiki.org%2Fconcept%2F38932552-111f-4a4e-a46a-4ed1d7bdf9d5";
api:viewer <#compoundViewer> ;
api:defaultViewer <#compoundViewer> ] .
<http://www.conceptwiki.org> api:label "ConceptWiki" .
<http://www.ebi.ac.uk/chembl> api:label "ChEMBL - RDF" .
<http://www.openphacts.org/bio2rdf/drugbank> api:label "DrugBank" .
<http://semanticscience.org/resource/> api:label "sio" .
<http://bio2rdf.org/drugbank_vocabulary:> api:label "drugbank" .
<http://www.w3.org/2004/02/skos/core#> api:label "skos" .
<http://rdf.ebi.ac.uk/dataset/surechembl/1.1/void.ttl#surechembl_rdf_molecule_dataset> api:label "surechembl molecules" .
<#input> api:name "uri" ;
api:label "uri";
api:value "A compound URI. e.g.: http://www.conceptwiki.org/concept/38932552-111f-4a4e-a46a-4ed1d7bdf9d5" ;
rdfs:range rdfs:Resource .
<#compoundViewer> a api:Viewer ;
api:name "compoundViewer" ;
api:template
"?ops_item skos:exactMatch ?cw_compound_uri .
?cw_compound_uri skos:prefLabel ?compound_name ;
void:inDataset <http://www.conceptwiki.org> .
?ops_item skos:exactMatch ?ocrs_compound_uri .
?ocrs_compound_uri ops:smiles ?smiles ;
ops:inchi ?inchi ;
ops:inchikey ?inchiKey ;
ops:logp ?alogp ;
ops:hba ?hba ;
ops:hbd ?hbd ;
ops:ro5_violations ?num_ro5_violations ;
ops:psa ?psa;
ops:rtb ?rtb;
ops:molweight ?molweight ;
ops:molformula ?molformula ;
void:inDataset <http://chemistry.openphacts.org> .
?ops_item skos:exactMatch ?chembl_compound_uri .
?chembl_compound_uri ?bNode1 ?mw_freebase ;
a ?mol_type;
void:inDataset <http://www.ebi.ac.uk/chembl>.
?ops_item skos:exactMatch ?db_compound_uri .
?db_compound_uri drugbank:metabolism ?metabolism ;
drugbank:description ?description ;
drugbank:proteinBinding ?proteinBinding ;
drugbank:toxicity ?toxicity ;
drugbank:meltingPoint ?meltingPoint ;
drugbank:genericName ?drug_name ;
drugbank:drugType ?drugType ;
ops:drugInteraction ?interaction ;
void:inDataset <http://www.openphacts.org/bio2rdf/drugbank> .
?interaction ops:interactingDrug ?interacting_drug ;
drugbank:text ?interaction_text ;
void:inDataset <http://www.openphacts.org/bio2rdf/drugbank> .
?ops_item skos:exactMatch ?aers_compound_uri .
?aers_compound_uri ops:reportedAdverseEvent ?event ;
skos:prefLabel ?aers_drug_name ;
void:inDataset <http://aers.data2semantics.org/> .
?event skos:prefLabel ?event_label ;
void:inDataset <http://aers.data2semantics.org/> .
?ops_item skos:exactMatch ?schembl_compound_uri .
?schembl_compound_uri ops:smiles ?s_smiles;
ops:inchi ?s_inchi ;
ops:inchiKey ?s_inchiKey ;
ops:logp ?s_logp ;
ops:molweight ?s_molweight ;
ops:hbd ?s_hbd ;
ops:hba ?s_hba ;
ops:rings ?s_rings ;
ops:rotable_bonds ?s_rotable_bonds ;
void:inDataset <http://rdf.ebi.ac.uk/dataset/surechembl/1.1/void.ttl#surechembl_rdf_molecule_dataset> .
";
api:where
"
{ GRAPH <http://chemistry.openphacts.org> {
?ocrs_compound_uri cheminf:CHEMINF_000018 ?smiles.
?ocrs_compound_uri cheminf:CHEMINF_000396 ?inchi.
?ocrs_compound_uri cheminf:CHEMINF_000399 ?inchiKey.
{ ?ocrs_compound_uri cheminf:CHEMINF_000490 ?molformula . }
UNION { [] obo:IAO_0000136 ?ocrs_compound_uri ;
a cheminf:CHEMINF_000484 ;
qudt:numericValue ?molweight . }
UNION { [] obo:IAO_0000136 ?ocrs_compound_uri ;
a cheminf:CHEMINF_000348 ;
qudt:numericValue ?rtb . }
UNION { [] obo:IAO_0000136 ?ocrs_compound_uri ;
a cheminf:CHEMINF_000321;
qudt:numericValue ?alogp . }
UNION { [] obo:IAO_0000136 ?ocrs_compound_uri ;
a cheminf:CHEMINF_000345;
qudt:numericValue ?hba . }
UNION { [] obo:IAO_0000136 ?ocrs_compound_uri ;
a cheminf:CHEMINF_000346;
qudt:numericValue ?hbd . }
UNION { [] obo:IAO_0000136 ?ocrs_compound_uri ;
a cheminf:CHEMINF_000367;
qudt:numericValue ?num_ro5_violations . }
UNION { [] obo:IAO_0000136 ?ocrs_compound_uri ;
a cheminf:CHEMINF_000349;
qudt:numericValue ?psa . }
} }
UNION {
GRAPH <http://www.conceptwiki.org> {
?cw_compound_uri skos:prefLabel ?compound_name.
}
}
UNION {
GRAPH <http://www.ebi.ac.uk/chembl> {
?chembl_compound_uri a ?mol_type .
OPTIONAL { ?chembl_compound_uri sio:SIO_000008 ?bNode1 .
?bNode1 a sio:CHEMINF_000350 ;
sio:SIO_000300 ?mw_freebase. }
}
}
UNION {
GRAPH <http://www.openphacts.org/bio2rdf/drugbank> {
{ ?db_compound_uri drugbank:affected-organism/dcterms:title ?affectedOrganism . }
UNION { ?db_compound_uri drugbank:metabolism/dcterms:description ?metabolism . }
UNION { ?db_compound_uri dcterms:description ?description . }
UNION { ?db_compound_uri drugbank:indication/dcterms:description ?indication . }
UNION { ?db_compound_uri drugbank:protein-binding/dcterms:description ?proteinBinding . }
UNION { ?db_compound_uri drugbank:toxicity/dcterms:description ?toxicity . }
UNION { ?db_compound_uri drugbank:experimental-properties ?mp_prop .
?mp_prop a drugbank:Melting-Point ;
drugbank:value ?meltingPoint }
UNION { ?db_compound_uri dcterms:title ?drug_name }
UNION { ?db_compound_uri drugbank:drug-group/dcterms:title ?drugType . }
UNION { ?db_compound_uri drugbank:ddi-interactor-in ?interaction .
?interacting_drug drugbank:ddi-interactor-in ?interaction .
?interaction dcterms:title ?interaction_text .
FILTER (?db_compound_uri != ?interacting_drug) }
}}
UNION {
GRAPH <http://aers.data2semantics.org/> {
?inv a aersv:Involvement ;
aersv:drug ?aers_compound_uri ;
aersv:involved_in ?report .
MINUS {
?inv2 a aersv:Involvement ;
aersv:involved_in ?report .
FILTER (?inv != ?inv2)
}
?event aersv:reaction_of ?report ;
rdfs:label ?event_label .
?aers_compound_uri rdfs:label ?aers_drug_name .
}
}
UNION { GRAPH <http://www.ebi.ac.uk/surechembl> {
{
?schembl_compound_uri a scco:SCCO_000010 ;
scco:SCCO_000017 ?s_smiles ;
scco:SCCO_000018 ?s_inchi ;
scco:SCCO_000019 ?s_inchiKey ;
scco:SCCO_000011 ?s_molweight ;
scco:SCCO_000012 ?s_logp
}
OPTIONAL { ?schembl_compound_uri scco:SCCO_000013 ?s_hbd }
OPTIONAL { ?schembl_compound_uri scco:SCCO_000014 ?s_hba }
OPTIONAL { ?schembl_compound_uri scco:SCCO_000015 ?s_rings }
OPTIONAL { ?schembl_compound_uri scco:SCCO_000016 ?s_rotable_bonds }
}
}
" .