-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path13_02_assayMembers_Count.ttl
115 lines (105 loc) · 5.04 KB
/
13_02_assayMembers_Count.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
@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 skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix obo: <http://purl.obolibrary.org/obo/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix bao: <http://www.bioassayontology.org/bao#> .
@prefix chembl: <http://rdf.ebi.ac.uk/terms/chembl#> .
@prefix ops: <http://www.openphacts.org/api#> .
<#assay> a api:API ;
rdfs:label "Assay"@en ;
api:sparqlEndpoint <http://alpha.openphacts.org:8890/sparql/> ;
api:contentNegotiation api:parameterBased ;
api:variable chembl:taxonomy ;
api:variable chembl:targetConfScore ;
api:variable chembl:targetRelType ;
api:variable <#input> ;
api:variable _:dataset ;
api:description "An API configuration to return information about assays" ;
api:endpoint [
a api:ItemEndpoint ;
api:name "Assay Class Members: Count" ;
api:description "A list of assays classified with the given class in the supported hierarchies. Currently the only supported hierarchy is the BioAssay Ontology." ;
api:itemTemplate "{uri}" ;
api:variable <http://www.ebi.ac.uk/chembl> ;
api:variable <http://rdf.ncats.nih.gov/opddr> ;
api:variable <http://rdf.ncats.nih.gov/opddr/pubchem> ;
api:uriTemplate "/assay/members/count?uri={uri}" ;
api:exampleRequestPath "/assay/members/count?uri=http%3A%2F%2Fwww.bioassayontology.org%2Fbao%23BAO_0000219";
api:viewer <#assayMemberCountViewer> ;
api:defaultViewer <#assayMemberCountViewer> ] .
chembl:taxonomy api:name "organism_uri" ;
api:label "organism_uri" ;
api:value "An identifiers.org taxonomy URI e.g. http://identifiers.org/taxonomy/9606" ;
api:filterVariable "?item";
a rdf:Property .
chembl:targetRelType api:name "target_rel_type" ;
api:label "target_rel_type" ;
api:value "ChEMBL Assay relationship type annotation. A single capital letter as follows. U: Default value - Target has yet to be curated; D: Direct protein target assigned; H: Homologous protein target assigned; M: Molecular target other than protein assigned; N: Non-molecular target assigned; S: Subcellular target assigned" ;
api:filterVariable "?item";
a rdf:Property .
chembl:targetConfScore api:name "target_conf_score";
api:label "target_conf_score" ;
api:value "ChEMBL Target confidence score. An integer denoting the confidence of the target assigned. 0: Default value - Target unknown or has yet to be assigned; 1: Target assigned is non-molecular; 2: Target assigned is subcellular fraction; 3: Target assigned is molecular non-protein target; 4: Multiple homologous protein targets may be assigned; 5: Multiple direct protein targets may be assigned; 6: Homologous protein complex subunits assigned; 7: Direct protein complex subunits assigned; 8: Homologous single protein target assigned; 9: Direct single protein target assigned" ;
api:filterVariable "?conf_score" ;
rdfs:subPropertyOf api:graphFilter ;
a rdf:Property .
<#input> api:name "uri" ;
api:label "uri";
api:value "A class URI from one of the supported hierarchies. e.g.: http://www.bioassayontology.org/bao#BAO_0000219" ;
rdfs:range rdfs:Resource .
<http://www.ebi.ac.uk/chembl> api:name "chembl" .
<http://rdf.ncats.nih.gov/opddr> api:name "opddr" .
<http://rdf.ncats.nih.gov/opddr/pubchem> api:name "opddr-pubchem" .
_:dataset api:name "dataset" ;
api:label "dataset" ;
api:value "The dataset to retrieve Assays from. One of: chembl, opddr, opddr-pubchem" ;
api:filterVariable "?dataset" ;
rdfs:subPropertyOf api:graphFilter ;
a rdf:Property .
<#assayMemberCountViewer> a api:Viewer ;
api:name "assayMemberCountViewer" ;
api:template
"
?ops_item ops:memberCount ?count .
";
api:where
"
{ SELECT ( COUNT ( DISTINCT ?item ) AS ?count ) WHERE {
{ SELECT DISTINCT ?child_node {
GRAPH <http://www.bioassayontology.org> {
?child_node rdfs:subClassOf* ?node_uri
}
} }
{
GRAPH <http://www.ebi.ac.uk/chembl> {
?item bao:BAO_0000205 ?child_node;
dct:description ?assay_description ;
chembl:assayType ?chembl_type ;
chembl:taxonomy ?organism ;
chembl:organismName ?organism_name .
OPTIONAL { ?item chembl:targetConfScore ?conf_score_tmp }
BIND (IF (BOUND(?conf_score_tmp) , ?conf_score_tmp, 0) AS ?conf_score)
OPTIONAL { ?item chembl:targetRelType ?rel_type }
}
BIND(<http://www.ebi.ac.uk/chembl> AS ?dataset)
} UNION {
{
GRAPH <http://rdf.ncats.nih.gov/opddr> {
?pubchem_assay a ?child_node
}
BIND(<http://rdf.ncats.nih.gov/opddr> AS ?dataset)
} UNION {
GRAPH <http://rdf.ncats.nih.gov/opddr/pubchem> {
?pubchem_assay bao:BAO_0000210 ?child_node .
}
BIND(<http://rdf.ncats.nih.gov/opddr/pubchem> AS ?dataset)
}
GRAPH <http://rdf.ncats.nih.gov/opddr> {
?pubchem_assay skos:exactMatch ?item .
}
}
} }
".