-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path02_05_ocrs_SubStructureSearch.ttl
126 lines (108 loc) · 5.27 KB
/
02_05_ocrs_SubStructureSearch.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
@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 api: <http://purl.org/linked-data/api/vocab#> .
@prefix ops_api: <http://www.openphacts.org/api/#> .
@prefix ops_api_search: <http://www.openphacts.org/api/searchOptions#> .
@prefix ops_api_result: <http://www.openphacts.org/api/searchResultOptions#> .
@prefix ops_api_common: <http://www.openphacts.org/api/commonOptions#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<#chemspider> a api:API ;
rdfs:label "ChemSpider structure search"@en;
api:sparqlEndpoint <http://alpha.openphacts.org:8890/sparql/> ;
api:contentNegotiation api:parameterBased ;
api:variable ops_api:searchOptions ;
api:variable ops_api:commonOptions ;
api:variable ops_api:searchResultOptions ;
api:dataset <http://www.chemspider.com> ;
api:description "An API configuration to return the result of a chemical substructure search." ;
api:endpoint [
a api:ExternalHTTPService ;
api:description "A set of ChemSpider compound URLs that contain the specified structure. Driven by ChemSpider." ;
api:name "Chemical Structure Search: Substructure" ;
api:enableCache false ;
api:uriTemplate "/structure/substructure?searchOptions.Molecule={searchOptions.Molecule}" ;
api:externalRequestTemplate "https://chemistry.openphacts.org/api/JSON.ashx?op=SubStructureSearch&CSCSearchScopeOptions.RealOnly=true&searchOptions.Molecule={searchOptions.Molecule}" ;
api:externalResponseHandler "converters/chemspider_structure_search_json_to_rdf.php" ;
api:exampleRequestPath "/structure/substructure?searchOptions.Molecule=CC(%3DO)Oc1ccccc1C(%3DO)O" ;
api:viewer <#externalResponseViewer> ;
api:defaultViewer <#externalResponseViewer> . ] .
<http://www.chemspider.com> api:label "ChemSpider" .
ops_api:searchOptions api:name "searchOptions" ;
api:label "searchOptions" ;
api:value "Possible search option values" ;
api:subType ops_api_search:Molecule ;
api:subType ops_api_search:MatchTautomers ;
api:subType ops_api_search:MolType .
ops_api_search:MatchTautomers api:name "MatchTautomers" ;
api:label "MatchTautomers" ;
api:value "(Not supported at the moment) Search exactly for the given tautomeric form and ignore others. Not supported at the moment . Boolean" .
ops_api_search:Molecule api:name "Molecule" ;
api:label "Molecule" ;
api:value "A SMILES string. E.g. CC(=O)Oc1ccccc1C(=O)O" .
ops_api_search:MolType api:name "MolType" ;
api:label "MolType" ;
api:value "0: SMILES ; 1: SMARTS" .
ops_api:commonOptions api:name "commonOptions" ;
api:label "commonOptions";
api:value "Possible common option values" ;
api:subType ops_api_common:Complexity ;
api:subType ops_api_common:Isotopic ;
api:subType ops_api_common:HasSpectra ;
api:subType ops_api_common:HasPatents .
ops_api_common:Complexity api:name "Complexity" ;
api:label "Complexity";
api:value "(Not supported at the moment) 0: Any ; 1: Single ; 2: Multi" .
ops_api_common:Isotopic api:name "Isotopic" ;
api:label "Isotopic" ;
api:value "(Not supported at the moment) 0: Any ; 1: Labeled ; 2: NotLabeled" .
ops_api_common:HasSpectra api:name "HasSpectra" ;
api:label "HasSpectra" ;
api:value "(Not supported at the moment) Boolean" .
ops_api_common:HasPatents api:name "HasPatents" ;
api:label "HasPatents" ;
api:value "(Not supported at the moment) Boolean" .
ops_api:searchResultOptions api:name "resultOptions" ;
api:label "resultOptions";
api:value "Possible search result option values" ;
api:subType ops_api_result:Start ;
api:subType ops_api_result:Count .
ops_api_result:Start api:name "Start" ;
api:label "Start" ;
api:value "Integer. Return results starting from this index value. Default value: 0" .
ops_api_result:Count api:name "Count" ;
api:label "Count" ;
api:value "Integer. How many results should be returned starting from Start index. Default value: -1." .
<#externalResponseViewer> a api:Viewer ;
api:name "externalResponseViewer" ;
api:template "
{pageUri} foaf:primaryTopic ?primaryTopic .
?primaryTopic foaf:isPrimaryTopicOf {pageUri} .
?primaryTopic rdf:type ?searchType ;
ops_api_search:Molecule ?moleculeSmiles ;
ops_api_search:MolType ?searchMolType ;
ops_api:result ?result ;
ops_api_search:MatchTautomers ?searchMatchTautomers ;
ops_api_common:Complexity ?complexity ;
ops_api_common:Isotopic ?isotopic ;
ops_api_common:HasSpectra ?hasSpectra ;
ops_api_common:HasPatents ?hasPatents ;
ops_api_result:Start ?start ;
ops_api_result:Count ?count .
?result ops_api:relevance ?relevance .
" ;
api:where "
GRAPH <{result_hash}> {
?primaryTopic rdf:type ?searchType .
?primaryTopic ops_api_search:Molecule ?moleculeSmiles .
?primaryTopic ops_api:result ?result .
?result ops_api:relevance ?relevance .
OPTIONAL { ?primaryTopic ops_api_search:MatchTautomers ?searchMatchTautomers }
OPTIONAL { ?primaryTopic ops_api_search:MolType ?searchMolType }
OPTIONAL { ?primaryTopic ops_api_common:Complexity ?complexity }
OPTIONAL { ?primaryTopic ops_api_common:Isotopic ?isotopic }
OPTIONAL { ?primaryTopic ops_api_common:HasSpectra ?hasSpectra }
OPTIONAL { ?primaryTopic ops_api_common:HasPatents ?hasPatents }
OPTIONAL { ?primaryTopic ops_api_result:Start ?start }
OPTIONAL { ?primaryTopic ops_api_result:Count ?count }
}".