-
Notifications
You must be signed in to change notification settings - Fork 7
/
04_13_pathwayOrganisms.ttl
71 lines (68 loc) · 2.78 KB
/
04_13_pathwayOrganisms.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
@base <http://www.openphacts.org/api> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@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 gc: <http://puelia-php.googlecode.com/svn/trunk/documents/config.ttl#> .
@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 ops: <http://www.openphacts.org/api#> .
@prefix chembl: <http://rdf.ebi.ac.uk/terms/chembl#> .
@prefix chembl-ops: <http://www.openphacts.org/terms/chembl#> .
@prefix qudt: <http://qudt.org/schema/qudt#> .
@prefix wp: <http://vocabularies.wikipathways.org/wp#> .
<#pathway> a api:API ;
rdfs:label "Pathway"@en ;
api:sparqlEndpoint <http://alpha.openphacts.org:8890/sparql/> ;
api:contentNegotiation api:parameterBased ;
api:dataset <http://www.ebi.ac.uk/chembl>;
api:vocabulary <http://semanticscience.org/resource/> ;
api:vocabulary <http://bio2rdf.org/drugbank_vocabulary:> ;
api:vocabulary <http://www.w3.org/2004/02/skos/core#> ;
api:vocabulary <http://www.openphacts.org/api#> ;
api:vocabulary <http://qudt.org/schema/qudt#> ;
api:vocabulary <http://rdf.ebi.ac.uk/terms/chembl#> ;
api:description "An API configuration to return information about Pathways." ;
api:endpoint [
a api:ListEndpoint ;
api:name "Pathway Organisms" ;
api:description "A list of organism URIs and labels for which pathway data is available." ;
api:uriTemplate "/pathways/organisms" ;
api:itemTemplate "http://www.wikipathways.org" ;
api:exampleRequestPath "/pathways/organisms";
api:selector [
api:where
"{
SELECT DISTINCT ?item ?label COUNT(?pathway) AS ?count WHERE {
GRAPH <http://www.wikipathways.org> {
?pathway wp:organism ?item ;
wp:organismName ?label .
}
} GROUP BY ?item ?label ORDER BY DESC(?count)
}" ;
api:orderBy ""] ;
api:viewer <#pathwayOrganismViewer> ;
api:defaultViewer <#pathwayOrganismViewer> . ] .
<http://www.openphacts.org/api#> api:label "ops" .
<#pathwayOrganismViewer> a api:Viewer ;
api:name "pathwayOrganismViewer" ;
api:template
"<http://www.wikipathways.org> ops:pathway_organism ?item .
?item rdfs:label ?label ;
ops:pathway_count ?count ." ;
api:where
"{
SELECT DISTINCT ?item ?label COUNT(?pathway) AS ?count WHERE {
GRAPH <http://www.wikipathways.org> {
?pathway wp:organism ?item ;
wp:organismName ?label .
}
} GROUP BY ?item ?label
}" .