Upload folder using huggingface_hub
Browse files- README.md +2 -3
- drugbank-drug-goa.rq +32 -0
- drugbank-drug-smiles.rq +17 -0
- drugbank-drug-synonym.rq +14 -0
- drugbank-drug-target.rq +29 -0
- drugbank-sider-sideeffects.rq +29 -0
- drugbank-target-seq.rq +18 -0
- human-interactome.rq +13 -0
- omim-disease-hpo.rq +13 -0
- omim-disease-mesh-bioportal.rq +15 -0
- omim-disease-mesh.rq +15 -0
- openpredict-omim-drug.rq +11 -0
README.md
CHANGED
@@ -1,3 +1,2 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
---
|
|
|
1 |
+
# sparql-api
|
2 |
+
SPARQL queries for use with grlc
|
|
drugbank-drug-goa.rq
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#+ summary: We should add a summary.
|
2 |
+
#+ endpoint: "http://example.com/sparql"
|
3 |
+
|
4 |
+
PREFIX dct: <http://purl.org/dc/terms/>
|
5 |
+
PREFIX dv: <http://bio2rdf.org/drugbank_vocabulary:>
|
6 |
+
PREFIX hv: <http://bio2rdf.org/hgnc_vocabulary:>
|
7 |
+
PREFIX goa: <http://bio2rdf.org/goa_vocabulary:>
|
8 |
+
PREFIX kv: <http://bio2rdf.org/kegg_vocabulary:>
|
9 |
+
|
10 |
+
SELECT distinct ?drugid ?g
|
11 |
+
{
|
12 |
+
?drug <http://bio2rdf.org/openpredict_vocabulary:indication> ?disease .
|
13 |
+
{
|
14 |
+
?drug a dv:Drug .
|
15 |
+
?drug dv:target ?t .
|
16 |
+
?t dv:x-hgnc ?x .
|
17 |
+
}
|
18 |
+
UNION {
|
19 |
+
?d a kv:Drug .
|
20 |
+
?d kv:target ?l .
|
21 |
+
?l kv:link ?t .
|
22 |
+
BIND (URI( REPLACE(str(?t),"HSA","hsa")) AS ?target) .
|
23 |
+
?target a kv:Gene .
|
24 |
+
?target kv:x-hgnc ?x .
|
25 |
+
?d kv:x-drugbank ?drug .
|
26 |
+
}
|
27 |
+
?x hv:x-uniprot ?uniprot .
|
28 |
+
?uniprot ?p ?go .
|
29 |
+
FILTER (?p = goa:process || ?p = goa:component || ?p = goa:function)
|
30 |
+
BIND(STRAFTER(str(?go), "http://bio2rdf.org/") AS $g)
|
31 |
+
BIND ( STRAFTER(str(?drug),"http://bio2rdf.org/drugbank:") AS ?drugid)
|
32 |
+
}
|
drugbank-drug-smiles.rq
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#+ summary: We should add a summary.
|
2 |
+
#+ endpoint: "http://example.com/sparql"
|
3 |
+
|
4 |
+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
5 |
+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
6 |
+
PREFIX dv: <http://bio2rdf.org/drugbank_vocabulary:>
|
7 |
+
PREFIX sv: <http://bio2rdf.org/sider_vocabulary:>
|
8 |
+
|
9 |
+
SELECT distinct ?drugid ?smiles
|
10 |
+
{
|
11 |
+
?d <http://bio2rdf.org/openpredict_vocabulary:indication> ?disease .
|
12 |
+
?d a dv:Drug .
|
13 |
+
?d dv:calculated-properties ?cp .
|
14 |
+
?cp a dv:SMILES .
|
15 |
+
?cp dv:value ?smiles .
|
16 |
+
BIND( STRAFTER(str(?d), "http://bio2rdf.org/drugbank:") AS ?drugid)
|
17 |
+
}
|
drugbank-drug-synonym.rq
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
PREFIX dv: <http://bio2rdf.org/drugbank_vocabulary:>
|
2 |
+
PREFIX dc: <http://purl.org/dc/terms/>
|
3 |
+
select ?drugid ?name where {
|
4 |
+
?d ?p dv:Drug .
|
5 |
+
{
|
6 |
+
?d dv:synonym ?s .
|
7 |
+
?s dc:title ?name .
|
8 |
+
}
|
9 |
+
UNION
|
10 |
+
{
|
11 |
+
?d dc:title ?name
|
12 |
+
}
|
13 |
+
BIND ( STRAFTER(str(?d),"http://bio2rdf.org/drugbank:") AS ?drugid)
|
14 |
+
}
|
drugbank-drug-target.rq
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#+ summary: We should add a summary.
|
2 |
+
#+ endpoint: "http://example.com/sparql"
|
3 |
+
|
4 |
+
PREFIX iv: <http://bio2rdf.org/irefindex_vocabulary:>
|
5 |
+
PREFIX dv: <http://bio2rdf.org/drugbank_vocabulary:>
|
6 |
+
PREFIX hv: <http://bio2rdf.org/hgnc_vocabulary:>
|
7 |
+
PREFIX kv: <http://bio2rdf.org/kegg_vocabulary:>
|
8 |
+
SELECT DISTINCT ?drugid ?geneid WHERE {
|
9 |
+
?drug <http://bio2rdf.org/openpredict_vocabulary:indication> ?disease .
|
10 |
+
{
|
11 |
+
?d a kv:Drug .
|
12 |
+
?d kv:target ?l .
|
13 |
+
?l kv:link ?t .
|
14 |
+
BIND (URI( REPLACE(str(?t),"HSA","hsa")) AS ?target) .
|
15 |
+
?target a kv:Gene .
|
16 |
+
?target kv:x-ncbigene ?ncbi .
|
17 |
+
?d kv:x-drugbank ?drug .
|
18 |
+
}
|
19 |
+
UNION
|
20 |
+
{
|
21 |
+
?drug a dv:Drug .
|
22 |
+
?drug dv:target ?target .
|
23 |
+
?target dv:x-hgnc ?hgnc .
|
24 |
+
?hgnc hv:x-ncbigene ?ncbi .
|
25 |
+
}
|
26 |
+
BIND ( STRAFTER(str(?ncbi),"http://bio2rdf.org/ncbigene:") AS ?geneid)
|
27 |
+
BIND ( STRAFTER(str(?drug),"http://bio2rdf.org/drugbank:") AS ?drugid)
|
28 |
+
|
29 |
+
}
|
drugbank-sider-sideeffects.rq
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#+ summary: We should add a summary.
|
2 |
+
#+ endpoint: "http://example.com/sparql"
|
3 |
+
|
4 |
+
PREFIX dv: <http://bio2rdf.org/drugbank_vocabulary:>
|
5 |
+
PREFIX ov: <http://bio2rdf.org/openpredict_vocabulary:>
|
6 |
+
PREFIX sider: <http://bio2rdf.org/sider_vocabulary:>
|
7 |
+
|
8 |
+
SELECT distinct ?drugid ?umlsid
|
9 |
+
{
|
10 |
+
?dia sider:drug ?stitch_flat .
|
11 |
+
?dia sider:effect ?se .
|
12 |
+
{
|
13 |
+
?stitch_flat sider:x-pubchem.compound ?pc .
|
14 |
+
}
|
15 |
+
UNION{
|
16 |
+
?stitch_flat sider:stitch-stereo ?stitch_stereo .
|
17 |
+
?stitch_stereo sider:x-pubchem.compound ?pc .
|
18 |
+
}
|
19 |
+
{
|
20 |
+
?d ov:x-pubchemcompound ?pc .
|
21 |
+
}
|
22 |
+
UNION
|
23 |
+
{
|
24 |
+
?d dv:x-pubchemcompound ?pc .
|
25 |
+
}
|
26 |
+
?d ov:indication ?disease .
|
27 |
+
BIND(STRAFTER( str(?d), "http://bio2rdf.org/drugbank:") AS ?drugid)
|
28 |
+
BIND(STRAFTER( str(?se), "http://bio2rdf.org/umls:") AS ?umlsid)
|
29 |
+
}
|
drugbank-target-seq.rq
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#+ summary: We should add a summary.
|
2 |
+
#+ endpoint: "http://example.com/sparql"
|
3 |
+
|
4 |
+
PREFIX dv: <http://bio2rdf.org/drugbank_vocabulary:>
|
5 |
+
PREFIX hv: <http://bio2rdf.org/hgnc_vocabulary:>
|
6 |
+
PREFIX sider: <http://bio2rdf.org/sider_vocabulary:>
|
7 |
+
|
8 |
+
SELECT distinct ?geneid ?seq
|
9 |
+
{
|
10 |
+
?drug <http://bio2rdf.org/openpredict_vocabulary:indication> ?disease .
|
11 |
+
?d a dv:Drug .
|
12 |
+
?d dv:target ?t .
|
13 |
+
#?t a dv:Target .
|
14 |
+
?t dv:x-hgnc ?hgnc .
|
15 |
+
?hgnc hv:x-ncbigene ?ncbi .
|
16 |
+
?t dv:amino-acid-sequence ?seq .
|
17 |
+
BIND ( STRAFTER(str(?ncbi),"http://bio2rdf.org/ncbigene:") AS ?geneid)
|
18 |
+
}
|
human-interactome.rq
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#+ summary: We should add a summary.
|
2 |
+
#+ endpoint: "http://example.com/sparql"
|
3 |
+
|
4 |
+
PREFIX iv: <http://bio2rdf.org/irefindex_vocabulary:>
|
5 |
+
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
6 |
+
SELECT distinct ?geneid1 ?geneid2
|
7 |
+
WHERE {
|
8 |
+
?s rdf:type <http://edamontology.org/topic_0128> .
|
9 |
+
?s iv:interactor_a ?gene1 .
|
10 |
+
?s iv:interactor_b ?gene2 .
|
11 |
+
BIND(STRAFTER( str(?gene1), "http://bio2rdf.org/ncbigene:") AS ?geneid1)
|
12 |
+
BIND(STRAFTER( str(?gene2), "http://bio2rdf.org/ncbigene:") AS ?geneid2)
|
13 |
+
}
|
omim-disease-hpo.rq
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#+ summary: We should add a summary.
|
2 |
+
#+ endpoint: "http://example.com/sparql"
|
3 |
+
PREFIX ov: <http://bio2rdf.org/openpredict_vocabulary:>
|
4 |
+
PREFIX dct: <http://purl.org/dc/terms/>
|
5 |
+
SELECT distinct ?diseaseid ?hpoid
|
6 |
+
WHERE{
|
7 |
+
?drug ov:indication ?disease .
|
8 |
+
GRAPH <http://w3id.org/fairworkflows/dataset.openpredict.hpoannot.R1>{
|
9 |
+
?disease <http://semanticscience.org/resource/SIO_000255> ?hpo .
|
10 |
+
BIND( STRAFTER(str(?disease),"http://bio2rdf.org/omim:") AS ?diseaseid)
|
11 |
+
BIND( STRAFTER(str(?hpo),"http://bio2rdf.org/") AS ?hpoid)
|
12 |
+
}
|
13 |
+
}
|
omim-disease-mesh-bioportal.rq
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#+ summary: We should add a summary.
|
2 |
+
#+ endpoint: "http://example.com/sparql"
|
3 |
+
|
4 |
+
PREFIX ov: <http://bio2rdf.org/openpredict_vocabulary:>
|
5 |
+
PREFIX dct: <http://purl.org/dc/terms/>
|
6 |
+
SELECT distinct ?diseaseid ?hpoid
|
7 |
+
WHERE{
|
8 |
+
?drug ov:indication ?disease .
|
9 |
+
GRAPH <http://w3id.org/fairworkflows/dataset.openpredict.meshannot_bioportal.R1>
|
10 |
+
{
|
11 |
+
?disease <http://semanticscience.org/resource/SIO_000255> ?hpo .
|
12 |
+
BIND( STRAFTER(str(?disease),"http://bio2rdf.org/omim:") AS ?diseaseid)
|
13 |
+
BIND( STRAFTER(str(?hpo),"http://bio2rdf.org/") AS ?hpoid)
|
14 |
+
}
|
15 |
+
}
|
omim-disease-mesh.rq
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#+ summary: We should add a summary.
|
2 |
+
#+ endpoint: "http://example.com/sparql"
|
3 |
+
|
4 |
+
PREFIX ov: <http://bio2rdf.org/openpredict_vocabulary:>
|
5 |
+
PREFIX dct: <http://purl.org/dc/terms/>
|
6 |
+
SELECT distinct ?diseaseid ?hpoid
|
7 |
+
WHERE{
|
8 |
+
?drug ov:indication ?disease .
|
9 |
+
GRAPH <http://w3id.org/fairworkflows/dataset.openpredict.meshannot.R1>
|
10 |
+
{
|
11 |
+
?disease <http://semanticscience.org/resource/SIO_000255> ?hpo .
|
12 |
+
BIND( STRAFTER(str(?disease),"http://bio2rdf.org/omim:") AS ?diseaseid)
|
13 |
+
BIND( STRAFTER(str(?hpo),"http://bio2rdf.org/") AS ?hpoid)
|
14 |
+
}
|
15 |
+
}
|
openpredict-omim-drug.rq
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#+ summary: We should add a summary.
|
2 |
+
#+ endpoint: "http://example.com/sparql"
|
3 |
+
|
4 |
+
PREFIX ov: <http://bio2rdf.org/openpredict_vocabulary:>
|
5 |
+
SELECT distinct ?drugid ?omimid
|
6 |
+
{
|
7 |
+
?drug ov:indication ?disease .
|
8 |
+
BIND( STRAFTER(str(?disease),"http://bio2rdf.org/omim:") AS ?omimid)
|
9 |
+
BIND( STRAFTER(str(?drug),"http://bio2rdf.org/drugbank:") AS ?drugid)
|
10 |
+
|
11 |
+
}
|