Skip to content

Commit

Permalink
query update
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelrosko committed Oct 9, 2015
1 parent 6f5fc5b commit 5fe6e65
Show file tree
Hide file tree
Showing 34 changed files with 52 additions and 55 deletions.
2 changes: 1 addition & 1 deletion queries/AE-01.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-08-13
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions queries/EP-04.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-08-13
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand All @@ -20,13 +20,13 @@ PREFIX swande: <http://purl.org/swan/1.2/discourse-elements#>


# What other claims are supported by this evidence item?
## using <http://www.ncbi.nlm.nih.gov/pubmed/10771452> as "this evidence item" and claim-154 as "other than this claim"
## using <http://dailymed.nlm.nih.gov/dailymed/lookup.cfm?setid=165cff62-b284-4a27-a65d-9ec8a5bfcdd8> as "this evidence item" and claim-261 as "other than this claim"

SELECT DISTINCT ?claim ?cLabel
FROM <inferred-graph-oa-mp.xml>
WHERE
{
?aURN oa:hasSource <http://www.ncbi.nlm.nih.gov/pubmed/10771452>.
?aURN oa:hasSource <http://dailymed.nlm.nih.gov/dailymed/lookup.cfm?setid=165cff62-b284-4a27-a65d-9ec8a5bfcdd8>.

?anItem oa:hasTarget ?aURN.

Expand All @@ -38,5 +38,5 @@ WHERE

?claim rdfs:label ?cLabel.

FILTER (!regex( ?claim, poc:ddi-spl-annotation-claim-154 ))
FILTER (!regex( ?claim, poc:ddi-spl-annotation-claim-261 ))
}
6 changes: 3 additions & 3 deletions queries/EP-05.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-08-13
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand All @@ -20,7 +20,7 @@ PREFIX swande: <http://purl.org/swan/1.2/discourse-elements#>


# What other claims are challenged by this evidence item?
## using <http://www.ncbi.nlm.nih.gov/pubmed/10771452> as "this evidence item" and claim-192 as "other than this claim"
## using <http://www.ncbi.nlm.nih.gov/pubmed/10771452> as "this evidence item" and claim-96 as "other than this claim"

SELECT DISTINCT ?claim ?cLabel
FROM <inferred-graph-oa-mp.xml>
Expand All @@ -38,5 +38,5 @@ WHERE

?claim rdfs:label ?cLabel.

FILTER (!regex( ?claim, poc:ddi-spl-annotation-claim-192 ))
FILTER (!regex( ?claim, poc:ddi-spl-annotation-claim-96 ))
}
2 changes: 1 addition & 1 deletion queries/FA-01.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/FA-02.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/FA-03.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/FA-04.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/FA-05.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
4 changes: 2 additions & 2 deletions queries/FA-06.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand All @@ -26,7 +26,7 @@ SELECT ?claim ?claimlabel
FROM <inferred-graph-oa-mp.xml>
WHERE
{
?druglabelstatement a dikbEvidence:Non_traceable_Drug_Label_Statement;
?druglabelstatement a dikbEvidence:Non_traceable_Statement;
mp:supports ?claim.

?claim rdfs:label ?claimlabel.
Expand Down
2 changes: 1 addition & 1 deletion queries/FA-07.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/FA-08.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/FA-09.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/FA-10.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/FA-11.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/FE-01.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
10 changes: 5 additions & 5 deletions queries/FE-02.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand All @@ -20,15 +20,15 @@ PREFIX swande: <http://purl.org/swan/1.2/discourse-elements#>


# List all the evidence (supporting or challenging) for claim X from a specific evidence type?
## The example claim here is claim-103, and the source is drug-label statements
## The example claim here is claim-330, and the source is drug-label statements

SELECT DISTINCT xsd:string(?source) as ?evidence_source ?modality
FROM <inferred-graph-oa-mp.xml>
WHERE
{
{?evidence mp:supports poc:ddi-spl-annotation-claim-103} UNION {?evidence mp:challenges poc:ddi-spl-annotation-claim-103} .
?evidence rdf:type dikbEvidence:Non_traceable_Drug_Label_Statement.
?evidence ?modality poc:ddi-spl-annotation-claim-103.
{?evidence mp:supports poc:ddi-spl-annotation-claim-330} UNION {?evidence mp:challenges poc:ddi-spl-annotation-claim-330} .
?evidence rdf:type dikbEvidence:Non_traceable_Statement.
?evidence ?modality poc:ddi-spl-annotation-claim-330.

?anItem oa:hasBody ?evidence;
oa:hasTarget ?aURN.
Expand Down
8 changes: 4 additions & 4 deletions queries/FE-03.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand All @@ -20,15 +20,15 @@ PREFIX swande: <http://purl.org/swan/1.2/discourse-elements#>


# List all the in vitro (supporting or challenging) evidence for claim X?
## In this case, claim-86 is used as claim X
## In this case, claim-102 is used as claim X

SELECT DISTINCT xsd:string(?source) as ?evidence_source ?modality
FROM <inferred-graph-oa-mp.xml>
WHERE
{
{?evidence mp:supports poc:ddi-spl-annotation-claim-86} UNION {?evidence mp:challenges poc:ddi-spl-annotation-claim-86} .
{?evidence mp:supports poc:ddi-spl-annotation-claim-102} UNION {?evidence mp:challenges poc:ddi-spl-annotation-claim-102} .

?evidence ?modality poc:ddi-spl-annotation-claim-86.
?evidence ?modality poc:ddi-spl-annotation-claim-102.

?method mp:supports ?evidence;
rdf:type ?type.
Expand Down
8 changes: 4 additions & 4 deletions queries/FE-04.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand All @@ -20,15 +20,15 @@ PREFIX swande: <http://purl.org/swan/1.2/discourse-elements#>


# List all the in vivo evidence(supporting or challenging) for claim X?
## In this case, claim-90 is used as claim X
## In this case, claim-11 is used as claim X

SELECT DISTINCT xsd:string(?source) as ?evidence_source ?modality
FROM <inferred-graph-oa-mp.xml>
WHERE
{
{?evidence mp:supports poc:ddi-spl-annotation-claim-90} UNION {?evidence mp:challenges poc:ddi-spl-annotation-claim-90} .
{?evidence mp:supports poc:ddi-spl-annotation-claim-11} UNION {?evidence mp:challenges poc:ddi-spl-annotation-claim-11} .

?evidence ?modality poc:ddi-spl-annotation-claim-90.
?evidence ?modality poc:ddi-spl-annotation-claim-11.

?method mp:supports ?evidence;
rdf:type ?type.
Expand Down
2 changes: 1 addition & 1 deletion queries/FE-06.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-23
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/FE-07.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-23
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/FE-08.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-22
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/FE-09.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-22
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/FE-10.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-22
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/PK-01.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
6 changes: 3 additions & 3 deletions queries/PK-03.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand All @@ -19,13 +19,13 @@ PREFIX siocns: <http://rdfs.org/sioc/ns#>
PREFIX swande: <http://purl.org/swan/1.2/discourse-elements#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

# For a given pharmacokinetic property, ie ketoconazole_increases_auc_triazolam (claim-30)
# For a given pharmacokinetic property, ie fluoxetine_increases_auc_despiramine (claim-34)
# What is the average of the pharmacokinetic value?

SELECT avg(xsd:decimal(?v)) as ?average_value
FROM <inferred-graph-oa-mp.xml>
WHERE
{
{?e mp:supports poc:ddi-spl-annotation-claim-30} UNION {?e mp:challenges poc:ddi-spl-annotation-claim-30} .
{?e mp:supports poc:ddi-spl-annotation-claim-34} UNION {?e mp:challenges poc:ddi-spl-annotation-claim-34} .
?e dikbD2R:increases_auc ?v.
}
2 changes: 1 addition & 1 deletion queries/STAT-01.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/STAT-02.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/STAT-03.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
6 changes: 2 additions & 4 deletions queries/STAT-04.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-07-21
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand All @@ -20,15 +20,13 @@ PREFIX swande: <http://purl.org/swan/1.2/discourse-elements#>
PREFIX obo: <http://purl.obolibrary.org/obo/>

#### Show distribution of evidence types for all types of claims
### LIMITATION OF THE CURRENT MODEL - have to query for count of label statements separately, see STAT-05

SELECT ?cType as ?claim_type ?type as ?evidence_type count(?type) as ?evidence_count
FROM <inferred-graph-oa-mp.xml>
WHERE
{
{ ?data mp:supports ?claim } UNION { ?data mp:challenges ?claim }.
?methods mp:supports ?data;
rdf:type ?type.
?data rdf:type ?type.
{?claim mp:qualifiedBy obo:DIDEO_00000096} UNION {?claim mp:qualifiedBy obo:RO_0002449} UNION {?claim mp:qualifiedBy obo:DIDEO_00000000}.
?claim mp:qualifiedBy ?cType.
FILTER (!regex ( ?cType, obo:CHEBI_ ) && !regex( ?cType, obo:PR_ ))
Expand Down
2 changes: 1 addition & 1 deletion queries/STAT-06.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-08-07
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
2 changes: 1 addition & 1 deletion queries/STAT-07.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-08-12
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand Down
3 changes: 1 addition & 2 deletions queries/STAT-08.sparql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPARQL version: 1.1
# DIKB MP/NP version: 2015-08-13
# DIKB MP/NP version: 2015-10-09

PREFIX aoOld: <http://purl.org/ao/core/> # needed for AnnotationSet and item until the equivalent is in Open Data Annotation
PREFIX cnt: <http://www.w3.org/2011/content#>
Expand All @@ -25,7 +25,6 @@ SELECT ?cType as ?claim_type COUNT(DISTINCT ?claim) as ?claim_count
FROM <inferred-graph-oa-mp.xml>
WHERE
{
{ ?statement mp:supports ?claim } UNION { ?statement mp:challenges ?claim }.
{?claim mp:qualifiedBy obo:DIDEO_00000096} UNION {?claim mp:qualifiedBy obo:RO_0002449} UNION {?claim mp:qualifiedBy obo:DIDEO_00000000}.
?claim mp:qualifiedBy ?cType.
FILTER ( !regex(?cType, obo:CHEBI_) && !regex(?cType, obo:PR_) )
Expand Down
2 changes: 1 addition & 1 deletion queries/use-cases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ different versions of product labeling for the same drug? **DEFERRED**
2. Number of evidence items for each claim type **done**
3. Number of evidence items against each claim type **done**
4. Show the distribution of the evidence types for types of claims **done**
5. Show the count of label statements for all types of claims **done**
5. Show the count of label statements for all types of claims **no longer relevant, merged with 4**
6. Show the count of drugs included in this version of the DIKB **done**
7. Show the count of full nanopublications in the system **done**
8. Show the count of claims by the type of claims

0 comments on commit 5fe6e65

Please sign in to comment.