#-*- mode: n3 -*- # # SAMPLE QUERIES AGAINST THE THE DEMONSTRATION RDF STORE FOR THE TRIADS LAB # # # NOTE: These queries are known to work against the following public RDF store: http://dbmi-icode-01.dbmi.pitt.edu:8080/sparql # # NOTE: Some of the queries DO NOT work on the public D2R server: http://dbmi-icode-01.dbmi.pitt.edu/linkedSPLs/ # There are several graphs stored on this server that are useful for # demonstration of ongoing research on the use of semantic technologies # to improve drug safety. Sevarl examplee queries for each graph are # listed below. # REFERENCES: # Boyce RD, Horn JR, Hassanzadeh O, de Waard A, Schneider J, Luciano JS, Rastegar-Mojarad M, Liakata M. Dynamic enhancement of drug product labels to support drug safety, efficacy, and effectiveness. J Biomed Semantics. 2013 Jan 26;4(1):5. [Epub ahead of print] PubMed PMID: 23351881. # Boyce, RD., Freimuth, RR., Romagnoli, KM., Pummer, T., Hochheiser, H., Empey, PE. Toward semantic modeling of pharmacogenomic knowledge for clinical and translational decision support. Proceedings of the 2013 AMIA Summit on Translational Bioinformatics. San Francisco, March 2013. # Hassanzadeh, O., Zhu, Qian., Freimuth, RR., Boyce R. Extending the “Web of Drug Identity” with Knowledge Extracted from United States Product Labels. Proceedings of the 2013 AMIA Summit on Translational Bioinformatics. San Francisco, March 2013. ################################################################################ # GRAPH: http://dbmi-icode-01.dbmi.pitt.edu/linkedSPLs/ # # DATE CREATED: 2012 - 2013 # # PURPOSE: LinkedSPLs publishes all sections of FDA-approved drug package inserts from DailyMed for use by NLP and Semantic Web researchers # Queries for product label content and metadata present in the LinkedSPLs RDF graph PREFIX rdfs: PREFIX dailymed: PREFIX foaf: ## Get metadata for the SPLs of all products containing a drug ## SELECT ?label ?splId ?version ?setId ?org ?date ?homepage WHERE { ?splId rdfs:label ?label. ?splId dailymed:subjectXref <%s>. ## The URI to the drug in DrugBank. For example, try ## ?splId dailymed:versionNumber ?version. ?splId dailymed:setId ?setId. ?splId dailymed:representedOrganization ?org. ?splId dailymed:effectiveTime ?date. ?splId foaf:homepage ?homepage. } ## Get the three sections of interest for a specific SPL ## ## (substituting an ?splid value from the above query for %s. ## ## For example, try ) ## SELECT ?textClinicalStudies ?textDrugInteractions ?textClinicalPharmacology WHERE { OPTIONAL { <%s> dailymed:clinicalStudies ?textClinicalStudies } OPTIONAL { <%s> dailymed:drugInteractions ?textDrugInteractions } OPTIONAL { <%s> dailymed:clinicalPharmacology ?textClinicalPharmacology } } # return all sections from all drug products containing clopidogrel 75 MG oral tablet that the FDA notes as having pharmgx information: PREFIX dc: PREFIX dailymed: SELECT DISTINCT ?setId ?biomarker ?sectionTag ?sectionText WHERE { ?s dc:subject . ?s dailymed:setId ?setId. ?pharmgxData dailymed:setId ?setId. ?pharmgxData dailymed:pharmgxBiomarker ?biomarker. ?pharmgxData dailymed:pharmgxSPLSection ?sectionTag. ?s ?sectionTag ?sectionText. } # return all setIds and drug product rxcuis for product labels that contain sections with FDA pharmgx data for biomarker "CYPD6": PREFIX dc: PREFIX dailymed: SELECT DISTINCT ?setId ?rxcuiDrugProduct ?sectionTag ?sectionText WHERE { ?pharmgxData dailymed:pharmgxBiomarker "CYP2D6". ?pharmgxData dailymed:setId ?setId. ?pharmgxData dailymed:pharmgxSPLSection ?sectionTag. ?spl dailymed:setId ?setId. ?spl ?sectionTag ?sectionText. ?spl dc:subject ?rxcuiDrugProduct. } LIMIT 10 # get all sections w/ FDA pharmgx data for drugs with an antidepressant application. PREFIX dc: PREFIX dailymed: PREFIX ncbit: SELECT DISTINCT * WHERE { ?s dailymed:setId ?setId. ?pharmgxData dailymed:setId ?setId. ?pharmgxData dailymed:therapeuticApplication ncbit:Psychiatry. ?pharmgxData dailymed:activeMoietyRxCUI ?moiety. ?pharmgxData dailymed:pharmgxBiomarker ?biomarker. ?pharmgxData dailymed:pharmgxSPLSection ?sectionTag. ?s ?sectionTag ?sectionText. } LIMIT 10 # return SPLs for all drugs that are of the statin class: PREFIX dailymed: SELECT DISTINCT ?med ?s WHERE { ?s dailymed:establishedPharmacologicClassPreferredName "HMG-CoA Reductase Inhibitor [EPC]". ?s dailymed:fullName ?med. } LIMIT 100 # what pharmgx biomarkers are common to EPC classes? PREFIX dailymed: SELECT DISTINCT ?biomarker ?epcName WHERE { ?s a dailymed:structuredProductLabelMetadata; dailymed:setId ?setId; dailymed:establishedPharmacologicClassPreferredName ?epcName. FILTER (REGEX(?epcName," \\[EPC\\]")) ?pharmgx dailymed:setId ?setId. ?pharmgx dailymed:pharmgxBiomarker ?biomarker. } ORDER BY ?biomarker LIMIT 100 # what pharmgx biomarkers are common to MoA (mechanism of action) classes? PREFIX dailymed: SELECT DISTINCT ?biomarker ?epcName WHERE { ?s a dailymed:structuredProductLabelMetadata; dailymed:setId ?setId; dailymed:establishedPharmacologicClassPreferredName ?epcName. FILTER (REGEX(?epcName," \\[MOA\\]")) ?pharmgx dailymed:setId ?setId. ?pharmgx dailymed:pharmgxBiomarker ?biomarker. } ORDER BY ?biomarker LIMIT 100 # what pharmgx biomarkers are common to Chemical/Ingredient classes (suggests how incomplete the class mapping is)? PREFIX dailymed: SELECT DISTINCT ?biomarker ?epcName WHERE { ?s a dailymed:structuredProductLabelMetadata; dailymed:setId ?setId; dailymed:establishedPharmacologicClassPreferredName ?epcName. FILTER (REGEX(?epcName," \\[CHEMICAL/INGREDIENT\\]")) ?pharmgx dailymed:setId ?setId. ?pharmgx dailymed:pharmgxBiomarker ?biomarker. } ORDER BY ?biomarker LIMIT 100 # Get the most recent product label for .... PREFIX dailymed: SELECT DISTINCT * WHERE { ?s dailymed:activeMoiety "DULOXETINE". ?s dailymed:effectiveTime ?date } ORDER BY DESC(?date) LIMIT 1 # Get the PRO, HUGO, and Pharmgkb mappings for pharmgx biomarkers associated with TRIMIPRAMINE in product labeling PREFIX dailymed: PREFIX rdfs: PREFIX foaf: PREFIX owl: SELECT * WHERE { ?pharmgxData a dailymed:pharmgxData; dailymed:pharmgxDrug "TRIMIPRAMINE"; dailymed:pharmgxBiomarker ?biomarker; dailymed:pharmgxSPLSection ?splSect; dailymed:HGNCGeneSymbol ?genSymb; owl:sameAs ?biomarkerMapping; foaf:homepage ?home; dailymed:setId ?setId. } # Query chain that gets all sections containing pharmgx data from the most recent PI for warfarin and clopidogrel: PREFIX dailymed: # first get the most recent product label.... SELECT DISTINCT * WHERE { ?s a dailymed:structuredProductLabelMetadata; dailymed:activeMoiety "WARFARIN"; dailymed:setId ?setid; dailymed:effectiveTime ?date. } ORDER BY DESC(?date) LIMIT 1 # then, query with its setid PREFIX dailymed: SELECT ?rxcui ?sectionTag ?section WHERE { ?pharmgxData a dailymed:pharmgxData; dailymed:setId "d655ff56-c17d-4331-8e9c-93e36f4ffeae"; dailymed:pharmgxSPLSection ?sectionTag. ?s a dailymed:structuredProductLabelMetadata; dailymed:setId "d655ff56-c17d-4331-8e9c-93e36f4ffeae"; dailymed:activeMoietyRxCUI ?rxcui; ?sectionTag ?section. } ############################################################ # GRAPH: http://purl.org/net/nlprepository/ddi-nlp-annotation # # Date Created: Varies # # Purpose: Analyze data from the SPL DDI pipeline # # QUERY: Get a Highlight annotation done by NLP on a particular product label section PREFIX oa: PREFIX sio: PREFIX poc: PREFiX rdfs: PREFIX oa: PREFIX sio: PREFIX poc: PREFiX rdfs: SELECT * FROM WHERE { ?s a oa:Highlight; oa:context ?context. ?context a oa:SpecificResource; oa:hasSource "http://130.49.206.86:8080/AnnoStudy/package-insert-section-114.txt.html"; oa:hasSelector ?selector. ?selector oa:prefix ?prefixText. ?selector oa:exact ?exactText. ?selector oa:suffix ?suffixText. } # Query: get back a DDI annotation for a specific section PREFIX oa: PREFIX sio: PREFIX poc: PREFIX rdfs: PREFIX dikbD2R: PREFIX domeo: SELECT ?annot ?exactText ?modality ?statementType ?drug1 ?drug1Type ?drug1Role ?drug2 ?drug2Type ?drug2Role FROM WHERE { ?annot a oa:expertstudyAnnotation; oa:body ?bn1; oa:context ?context. ?context oa:hasSource "http://130.49.206.86:8080/AnnoStudy/package-insert-section-114.txt.html". ?context oa:hasSelector ?selector. ?selector oa:exact ?exactText. ?bn1 domeo:sets ?statement. ?statement a poc:DrugDrugInteractionStatement; dikbD2R:modality ?modality; dikbD2R:statement ?statementType; sio:SIO_000628 ?drugsInvolved. ?drugsInvolved a dikbD2R:PK_DDI; sio:SIO_000132 ?drug1; sio:SIO_000132 ?drug2.FILTER(?drug1 > ?drug2) ?drug1 rdf:type ?drug1Type. ?drug1 sio:SIO_000228 ?drug1Role. ?drug2 rdf:type ?drug2Type. ?drug2 sio:SIO_000228 ?drug2Role. } ############################################################ # GRAPH: http://purl.org/net/nlprepository/pharmgx-consensus # # Date Created: 6/20/2014 # # Purpose: Early consensus pharmacogenomics annotations by pharmacists # # QUERY: Which sources have been annotated? PREFIX ao: SELECT DISTINCT(?source) FROM WHERE { ?s ao:hasSource ?source. } # QUERY: How many annotation sets? PREFIX ao: SELECT COUNT(?s) FROM WHERE { ?s a ao:AnnotationSet. } # QUERY: Create a report of , , and any PREFIX ao: PREFIX sio: PREFIX poc: PREFiX rdfs: SELECT ?s ?labelSect ?exactText ?variant ?testResult ?comment FROM WHERE { ?s a ao:SPLAnnotation; ao:body ?body; ao:context ?target. ?target ao:exact ?exactText. OPTIONAL { ?body sio:SIO_000111 ?labelSect. } OPTIONAL { ?body sio:SIO_000628 "poc:Variant". ?body rdfs:label ?variant. } OPTIONAL { ?body sio:SIO_000338 "poc:TestResult". ?body rdfs:label ?testResult. } OPTIONAL { ?body ?comment. } } GROUP BY ?s ################################################################################ # GRAPH: http://purl.org/net/nlprepository/spl-pharmgx-annotation-poc # # DATE CREATED: 2013 # # PURPOSE: To demonstrate an interoperable annotation data set # consisting of portions of product labels annotated by a team of # pharmacists for pharmacogenomics statements. The annotations are # published according to the W3C Open Data Annotation standard # # QUERY: Following the Open Annotation Data Model (www.openannotation.org/spec/beta/), each annotation links an annotation "body" to a "target." Show a complete annotation by enumerating the body and target URIs PREFIX dcterms: PREFIX dctypes: PREFIX dailymed: PREFIX sio: PREFIX oa: PREFIX cnt: PREFIX gcds: PREFIX linkedspls: PREFIX dailymed: PREFIX poc: SELECT ?exact ?describes ?description ?specifies ?spec ?refersTo ?referred WHERE { ?s a oa:Annotation; oa:annotatedAt ?annCreatedOn; oa:annotatedBy ?annCreatedBy; oa:hasTarget ?target; oa:hasBody ?body. ?target oa:hasSource ?dailyMedPage. ?target poc:SPLSection ?section. ?target oa:hasSelector ?selector. ?selector oa:prefix ?prefix. ?selector oa:exact ?exact. ?selector oa:postfix ?postfix. OPTIONAL { ?body dailymed:pharmgxDrug ?drug. ?body dailymed:pharmgxBiomarker ?biomarker. ?body sio:SIO_000563 ?describes. ?body ?describes ?description. } OPTIONAL { ?body sio:SIO_000338 ?specifies. ?body ?specifies ?spec. } OPTIONAL{ ?body sio:SIO_000628 ?refersTo. ?body ?refersTo ?referred. } } LIMIT 1 # QUERY: Get back the SPL URL for an annotation over a given piece of text. To do this, replace the text in the regex with the text you are interested in: PREFIX oa: PREFIX poc: SELECT ?s ?dailyMedPage ?exact WHERE { ?s a oa:Annotation; oa:annotatedAt ?annCreatedOn; oa:annotatedBy ?annCreatedBy; oa:hasTarget ?target. ?target oa:hasSource ?dailyMedPage. ?target poc:SPLSection ?section. ?target oa:hasSelector ?selector. ?selector oa:prefix ?prefix. ?selector oa:exact ?exact.FILTER(regex(?exact,"The prevalence of this CYP2D6 phenotype varies widely and has been estimated at 0.5 to 1% in Chinese ")) ?selector oa:postfix ?postfix. } # QUERY: Annotations are grouped into Collections, one per SPL resource; show the number of annotations in each annotation collection for CLOPIDOGREL product labels PREFIX dcterms: PREFIX dctypes: PREFIX dailymed: PREFIX sio: PREFIX oa: PREFIX cnt: PREFIX gcds: PREFIX linkedspls: PREFIX dailymed: PREFIX poc: SELECT ?s ?annCreatedOn ?annCreatedBy ?setId COUNT(?item) WHERE { ?splUri a dailymed:structuredProductLabelMetadata; dailymed:activeMoiety "CLOPIDOGREL"; dailymed:setId ?setId. ?s a dctypes:Collection; oa:annotatedAt ?annCreatedOn; oa:annotatedBy ?annCreatedBy; oa:onResource ?splUri; oa:item ?item. } # QUERY: Show for all annotations for a given CLOPIDOGREL/CYP2C19 occuring in the boxedWarning section PREFIX dcterms: PREFIX dctypes: PREFIX dailymed: PREFIX sio: PREFIX oa: PREFIX cnt: PREFIX gcds: PREFIX linkedspls: PREFIX dailymed: PREFIX poc: SELECT * WHERE { ?s a poc:PharmacogenomicsStatement; dailymed:pharmgxDrug "CLOPIDOGREL"; dailymed:pharmgxBiomarker "CYP2C19"; sio:SIO_000563 ?entityDescribed; ?entityDescribed ?val. ?ann oa:hasBody ?s. ?ann oa:hasTarget ?target. ?target poc:SPLSection dailymed:boxedWarning. } # QUERY: Show all annotations of any SPL boxedWarning section PREFIX dcterms: PREFIX dctypes: PREFIX dailymed: PREFIX sio: PREFIX oa: PREFIX cnt: PREFIX gcds: PREFIX linkedspls: PREFIX dailymed: PREFIX poc: SELECT ?drug ?biomarker ?descriptionCls ?description ?text WHERE { ?s a oa:Annotation; oa:hasTarget ?target; oa:hasBody ?body. ?target poc:SPLSection dailymed:boxedWarning. ?target oa:hasSelector ?selector. ?selector oa:exact ?text. ?body dailymed:pharmgxDrug ?drug. ?body dailymed:pharmgxBiomarker ?biomarker. ?body sio:SIO_000563 ?descriptionCls. ?body ?descriptionCls ?description. } GROUP BY ?drug ORDER BY ?drug -------------------------------------------------------------------------------- # QUERY: Show any pharmacodynamic impact for HLA-B*5701 PREFIX dcterms: PREFIX dctypes: PREFIX dailymed: PREFIX sio: PREFIX oa: PREFIX cnt: PREFIX gcds: PREFIX linkedspls: PREFIX dailymed: PREFIX poc: SELECT ?drug ?splSect ?description ?text WHERE { ?s a oa:Annotation; oa:hasTarget ?target; oa:hasBody ?body. ?target poc:SPLSection ?splSect. ?target oa:hasSelector ?selector. ?selector oa:exact ?text. ?body dailymed:pharmgxDrug ?drug. ?body dailymed:pharmgxBiomarker "HLA-B*5701". ?body sio:SIO_000563 poc:PharmacodynamicImpact. ?body poc:PharmacodynamicImpact ?description. } GROUP BY ?splSect ORDER BY ?drug -------------------------------------------------------------------------------- # QUERY: Show any biomarkers expected to have a pharmacodynamic impact on any drug PREFIX dcterms: PREFIX dctypes: PREFIX dailymed: PREFIX sio: PREFIX oa: PREFIX cnt: PREFIX gcds: PREFIX linkedspls: PREFIX dailymed: PREFIX poc: SELECT ?pdImpact ?biomarker ?pharmgkb ?drug ?section ?text WHERE { ?s a oa:Annotation; oa:hasTarget ?target; oa:hasBody ?body. ?body dailymed:pharmgxDrug ?drug. ?body dailymed:pharmgxBiomarker ?biomarker. ?body sio:SIO_000563 poc:PharmacodynamicImpact. ?body poc:PharmacodynamicImpact ?pdImpact. ?target poc:SPLSection ?section. ?target oa:hasSelector ?selector. ?selector oa:exact ?text. # Extra information on the biomarker ?pgx a dailymed:pharmgxData; dailymed:pharmgxDrug ?drug; dailymed:pharmgxBiomarker ?biomarker; dailymed:pharmgxSPLSection ?section; foaf:homepage ?pharmgkb. } GROUP BY ?pdImpact ORDER BY ?biomarker -------------------------------------------------------------------------------- # QUERY: Show any biomarkers expected to have a pharmacokinetic impact on any drug PREFIX dcterms: PREFIX dctypes: PREFIX dailymed: PREFIX sio: PREFIX oa: PREFIX cnt: PREFIX gcds: PREFIX linkedspls: PREFIX dailymed: PREFIX poc: SELECT ?pkImpact ?biomarker ?drug ?section ?text WHERE { ?s a oa:Annotation; oa:hasTarget ?target; oa:hasBody ?body. ?body dailymed:pharmgxDrug ?drug. ?body dailymed:pharmgxBiomarker ?biomarker. ?body sio:SIO_000563 poc:PharmacokineticImpact. ?body poc:PharmacokineticImpact ?pkImpact. ?target poc:SPLSection ?section. ?target oa:hasSelector ?selector. ?selector oa:exact ?text. } GROUP BY ?pkImpact ORDER BY ?biomarker -------------------------------------------------------------------------------- ##### INTEGRATION WITH linkedSPLs -------------------------------------------------------------------------------- # What do product labels say about for Pharmgkb PA124 (CYP2C19)? PREFIX dcterms: PREFIX dctypes: PREFIX dailymed: PREFIX sio: PREFIX oa: PREFIX cnt: PREFIX gcds: PREFIX linkedspls: PREFIX dailymed: PREFIX poc: SELECT DISTINCT ?text ?drug ?section ?setId WHERE { ?pgx a dailymed:pharmgxData; dailymed:pharmgxXref ; dailymed:pharmgxDrug ?drug; dailymed:pharmgxBiomarker ?biomarker; dailymed:setId ?setId; dailymed:pharmgxSPLSection ?section. ?spl a dailymed:structuredProductLabelMetadata; dailymed:setId ?setId. ?c a dctypes:Collection; oa:onResource ?spl; oa:item ?item. ?item a oa:Annotation; oa:hasTarget ?target; oa:hasBody ?body. ?body dailymed:pharmgxDrug ?drug. ?body dailymed:pharmgxBiomarker ?biomarker. ?target poc:SPLSection ?section. ?target oa:hasSelector ?selector. ?selector oa:exact ?text. } GROUP BY ?drug ORDER BY ?drug -------------------------------------------------------------------------------- # For which drugs do product labels associate Pharmgkb PA124 (CYP2C19) with a toxicity? PREFIX dcterms: PREFIX dctypes: PREFIX dailymed: PREFIX sio: PREFIX oa: PREFIX cnt: PREFIX gcds: PREFIX linkedspls: PREFIX dailymed: PREFIX poc: SELECT DISTINCT ?text ?drug ?section ?setId WHERE { ?pgx a dailymed:pharmgxData; dailymed:pharmgxXref ; dailymed:pharmgxDrug ?drug; dailymed:pharmgxBiomarker ?biomarker; dailymed:setId ?setId; dailymed:pharmgxSPLSection ?section. ?spl a dailymed:structuredProductLabelMetadata; dailymed:setId ?setId. ?c a dctypes:Collection; oa:onResource ?spl; oa:item ?item. ?item a oa:Annotation; oa:hasTarget ?target; oa:hasBody ?body. ?body dailymed:pharmgxDrug ?drug. ?body dailymed:pharmgxBiomarker ?biomarker. ?body poc:PharmacodynamicImpact poc:drug-toxicity-risk-increased. ?target poc:SPLSection ?section. ?target oa:hasSelector ?selector. ?selector oa:exact ?text. } GROUP BY ?drug ORDER BY ?drug -------------------------------------------------------------------------------- # For which drugs do product labels associate a biomarker with toxicity? PREFIX dcterms: PREFIX dctypes: PREFIX dailymed: PREFIX sio: PREFIX oa: PREFIX cnt: PREFIX gcds: PREFIX linkedspls: PREFIX dailymed: PREFIX poc: SELECT ?biomarker ?HGNC ?pharmgkb ?drug ?section ?text ?setId WHERE { ?pgx a dailymed:pharmgxData; dailymed:pharmgxDrug ?drug; dailymed:pharmgxBiomarker ?biomarker; dailymed:HGNCGeneSymbol ?HGNC; dailymed:pharmgxXref ?pharmgkb; dailymed:setId ?setId; dailymed:pharmgxSPLSection ?section. ?spl a dailymed:structuredProductLabelMetadata; dailymed:setId ?setId. ?c a dctypes:Collection; oa:onResource ?spl; oa:item ?item. ?item a oa:Annotation; oa:hasTarget ?target; oa:hasBody ?body. ?body dailymed:pharmgxDrug ?drug. ?body dailymed:pharmgxBiomarker ?biomarker. ?body poc:PharmacodynamicImpact poc:drug-toxicity-risk-increased. ?target poc:SPLSection ?section. ?target oa:hasSelector ?selector. ?selector oa:exact ?text. } GROUP BY ?biomarker ORDER BY ?biomarker -------------------------------------------------------------------------------- # Show the annotations on product label statements for Pharmgkb PA124 (CYP2C19) PREFIX dcterms: PREFIX dctypes: PREFIX dailymed: PREFIX sio: PREFIX oa: PREFIX cnt: PREFIX gcds: PREFIX linkedspls: PREFIX dailymed: PREFIX poc: SELECT DISTINCT ?text ?drug ?section ?setId ?pdImpact ?pkImpact ?monitoringRec ?drugSelection ?doseSelection ?testRec ?testResult ?variantFrequency ?variant ?medCondit WHERE { ?pgx a dailymed:pharmgxData; dailymed:pharmgxXref ; dailymed:pharmgxDrug ?drug; dailymed:pharmgxBiomarker ?biomarker; dailymed:setId ?setId; dailymed:pharmgxSPLSection ?section. ?spl a dailymed:structuredProductLabelMetadata; dailymed:setId ?setId. ?c a dctypes:Collection; oa:onResource ?spl; oa:item ?item. ?item a oa:Annotation; oa:hasTarget ?target; oa:hasBody ?body. ?body dailymed:pharmgxDrug ?drug. ?body dailymed:pharmgxBiomarker ?biomarker. ?target poc:SPLSection ?section. ?target oa:hasSelector ?selector. ?selector oa:exact ?text. OPTIONAL { ?body poc:PharmacodynamicImpact ?pdImpact. } OPTIONAL { ?body poc:PharmacokineticImpact ?pkImpact. } OPTIONAL { ?body poc:MonitoringRecommendation ?monitoringRec. } OPTIONAL { ?body poc:DrugSelectionRecommendation ?drugSelection. } OPTIONAL { ?body poc:DoseSelectionRecommendation ?doseSelection. } OPTIONAL { ?body poc:TestRecommendation ?testRec. } OPTIONAL { ?body poc:TestResult ?testResult. } OPTIONAL { ?body poc:VariantFrequency ?variantFrequency. } OPTIONAL{ ?body poc:Variant ?variant. } OPTIONAL{ ?body poc:MedicalCondition ?medCondit. } } GROUP BY ?drug ORDER BY ?drug -------------------------------------------------------------------------------- ##### INTEGRATION WITH THE GENOMIC CDS ONTOLOGY -------------------------------------------------------------------------------- # What sections of the Warfarin SPL have been annotated for pharmgx # information and what is described? PREFIX rdf: PREFIX owl: PREFIX xsd: PREFIX rdfs: PREFIX gcds: PREFIX splPoc: PREFIX oa: PREFIX sio: PREFIX linkedSPLs: SELECT ?section ?describes ?dailyMedPage WHERE { ?subject rdfs:seeAlso gcds:Warfarin. ?subject rdfs:seeAlso gcds:CYP2C9. ?subject sio:SIO_000563 ?describes. ?annot oa:hasBody ?subject. ?annot oa:hasTarget ?target. ?target splPoc:SPLSection ?section. ?target oa:hasSource ?dailyMedPage. } ---------------------------------------------------------------------------------- # What is the monitoring recommendation in the SPL for Warfarin and CYP2C9? PREFIX rdf: PREFIX owl: PREFIX xsd: PREFIX rdfs: PREFIX gcds: PREFIX splPoc: PREFIX oa: PREFIX sio: PREFIX linkedSPLs: SELECT ?recommendation ?exact WHERE { ?subject rdfs:seeAlso gcds:Warfarin. ?subject rdfs:seeAlso gcds:CYP2C9. ?subject splPoc:MonitoringRecommendation ?recommendation. ?annot oa:hasBody ?subject. ?annot oa:hasTarget ?target. ?target oa:hasSelector ?selector. ?selector oa:exact ?exact. } -------------------------------------------------------------------------------- # Get the text from the Clinical Pharmacology section of an SPL that # discusses the pharmacokinetic impact of CYP2C9 on Warfarin PREFIX rdf: PREFIX owl: PREFIX xsd: PREFIX rdfs: PREFIX gcds: PREFIX splPoc: PREFIX oa: PREFIX sio: PREFIX linkedSPLs: SELECT ?prefix ?exact ?postfix WHERE { ?subject rdfs:seeAlso gcds:Warfarin. ?subject rdfs:seeAlso gcds:CYP2C9. ?subject sio:SIO_000563 splPoc:PharmacokineticImpact. ?annot oa:hasBody ?subject. ?annot oa:hasTarget ?target. ?target splPoc:SPLSection linkedSPLs:clinicalPharmacology. ?target oa:hasSource ?dailyMedPage. ?target oa:hasSelector ?selector. ?selector oa:prefix ?prefix. ?selector oa:exact ?exact. ?selector oa:postfix ?postfix. } ################################################################################ # GRAPH: http://purl.org/net/nlprepository/dynamic-spl-enhancement-poc# # # DATE CREATED: 2012 # # PURPOSE: For 29 psychotropic drugs, We created an RDF graph with # mappings between three product label sections (Clinical # Pharmacology, Drug Interactions, and Clinical Studies) and claims # present in the three drug information sources (Published results # from studies registered in ClinicalTrials.gov, drug interactions in # the NDF-RT, and metabolic pathways from the DIKB). The graph has a # total of 209,698 triples and maps 409 efficacy/effectiveness study # results, 784 NDF-RT drug-drug interactions, and 112 DIKB pathway # claims to the sections of 1,102 product labels.\footnote{The graph # has 161 metabolic pathway mappings but 49 are to the same claims # with different evidence items. Thus, there are 112 unique metabolic # pathway claims.} Considering mappings on a label-by-label basis # graph has an average of 50 mappings per product label (mean:50, # median:50). Twenty-four labels had the fewest number of mappings # (2), and two had greatest number of mappings (135). Table 1 shows # the counts for all mappings grouped by each drug in the study. The # next three sections provide more detail on the specific mappings # created for each product label section. # REFERENCES: We have a manuscript currently under review # The total number of claim mappings present in the proof-of-concept RDF graph by drug product label PREFIX poc: SELECT ?spl COUNT(DISTINCT ?mapping) WHERE { { ## mappings for the Clinical Studies section ## poc:linkedct-result-map ?spl ?mapping. ?mapping poc:linkedct-result-drug ?drug. } UNION { ## mappings for the Drug Interactions section ## poc:ndfrt-ddi-map ?spl ?mapping. ?mapping poc:ndfrt-ddi-drug ?drug. } UNION { ## mappings for the Clinical Pharmacology section ## poc:dikb-pk-map ?spl ?mapping. ?mapping poc:dikb-pk-drug ?drug. }} GROUP BY ?spl ORDER BY ?spl # A query for all NDF-RT drug interactions that are potentially novel to the Drug Interactions section of bupropion product labels PREFIX poc: SELECT ?label COUNT(DISTINCT ?spl) WHERE { poc:ndfrt-ddi-map ?spl ?ddiMap. ?ddiMap poc:ndfrt-ddi-drug "bupropion". ?ddiMap poc:ndfrt-ddi-label ?label. ?ddiMap poc:ndfrt-ddi-severity ?severe. OPTIONAL{?ddiMap poc:ndfrt-ddi-potentially-novel ?novel.} FILTER (BOUND(?novel)) } GROUP BY ?label ORDER BY ?label # A query for all NDF-RT drug interactions that are potentially novel to the Drug Interactions section of bupropion product labels PREFIX poc: SELECT ?label COUNT(DISTINCT ?spl) WHERE { poc:ndfrt-ddi-map ?spl ?ddiMap. ?ddiMap poc:ndfrt-ddi-drug "bupropion". ?ddiMap poc:ndfrt-ddi-label ?label. ?ddiMap poc:ndfrt-ddi-severity ?severe. OPTIONAL{?ddiMap poc:ndfrt-ddi-potentially-novel ?novel.} FILTER (BOUND(?novel)) } GROUP BY ?label ORDER BY ?label ################################################################################ # GRAPH: http://purl.org/net/nlprepository/test# # # DATE CREATED: 2011 # # PURPOSE: To demonstrate a novel approach to indexing a clinical # notes repository using a Linked Data approach. indices that # can be used to identify specific reports within the repository # (see Marshall et al. 2012). Though identified, the clinical # notes indexed in this example are protected under HIPAA. The # indices can be resolved to actual reports getting permission # to access the reports (see # http://www.dbmi.pitt.edu/nlp/report-repository) and then # requesting the real report IDs from the LDSI developer # (Richard Boyce, rdb20@pitt.edu) # REFERENCES: Marshall MS, Boyce R, Deus HF, et al. Emerging practices for mapping and linking life sciences data using RDF — A case series. Web Semantics Science Services and Agents on the World Wide Web. 2012;14(null):1–12. # get the index of clinical notes that mention a drug associated with hyperkalemia in SIDER PREFIX dc: PREFIX rdfs: PREFIX bl: PREFIX owl: PREFIX rdf: PREFIX sider: SELECT DISTINCT ?r ?rxnlbl WHERE { ?effect rdfs:label "Hyperkalemia". ?sdrDrug sider:sideEffect ?effect. ?rxnDrug owl:sameAs ?sdrDrug. ?rxnDrug rdfs:label ?rxnlbl. ?r bl:ncboAnnotion ?rxnDrug. } ORDER BY DESC(?r) # get the index of clinical reports the mention any drug in SIDER PREFIX dc: PREFIX rdfs: PREFIX bl: PREFIX owl: PREFIX rdf: SELECT DISTINCT * WHERE { ?s owl:sameAs ?sider. ?s rdfs:label ?lbl. ?r bl:ncboAnnotion ?s. } # show NCBO annotations for drug entities in the LDSI PREFIX dc: PREFIX rdfs: PREFIX bl: PREFIX owl: PREFIX rdf: SELECT DISTINCT ?drg WHERE { ?r bl:ncboAnnotion ?drg. } # how many distinct drugs were annotated in the clinical reports by the NCBO annotator SELECT ?lbl ?drg COUNT(?drg) WHERE { ?drg rdfs:label ?lbl. ?rprt bl:ncboAnnotion ?drg. } ################################################################################ ################################################################################ # # Other example queries # get all drugs associated with Hyperkalemia in SIDER PREFIX sider: SELECT DISTINCT ?dName WHERE { ?d sider:sideEffect ?o. ?o sider:sideEffectName "Hyperkalemia". ?d rdfs:label ?dName. } LIMIT 10 #################### # Notice that http://purl.bioontology.org/ontology/RXNORM/3002 is present in LinkedSPLs via dailymed:activeMoietyRxCUI DESCRIBE #################### # Get the RxCUI for each drug associated with Hyperkalemia in SIDER PREFIX sider: PREFIX owl: SELECT DISTINCT * WHERE { ?o sider:sideEffectName "Hyperkalemia". ?d sider:sideEffect ?o. ?d rdfs:label ?dName. ?rxNorm owl:sameAs ?d.FILTER(REGEX(STR(?rxNorm),".*RXNORM.*","i")) } LIMIT 100 #################### # Get the drug product labels for those drugs PREFIX sider: PREFIX owl: PREFIX dailymed: SELECT DISTINCT ?prodName ?spl WHERE { ?o sider:sideEffectName "Hyperkalemia". ?d sider:sideEffect ?o. ?d rdfs:label ?dName. ?rxCui owl:sameAs ?d.FILTER(REGEX(STR(?rxCui),".*RXNORM.*","i")) ?spl a dailymed:structuredProductLabelMetadata; dailymed:activeMoietyRxCUI ?rxCui; dailymed:fullName ?prodName. } LIMIT 100 #################### # get the index of clinical notes that mention a drug associated with hyperkalemia in SIDER PREFIX dc: PREFIX rdfs: PREFIX bl: PREFIX owl: PREFIX rdf: PREFIX sider: SELECT DISTINCT ?r ?rxnlbl WHERE { ?effect rdfs:label "Hyperkalemia". ?sdrDrug sider:sideEffect ?effect. ?rxnDrug owl:sameAs ?sdrDrug. ?rxnDrug rdfs:label ?rxnlbl. ?r bl:ncboAnnotion ?rxnDrug. } ORDER BY DESC(?r) #################### # Is there a pharmacogenomics concern for any of the drugs associated with Hyperkalemia in SIDER? PREFIX sider: PREFIX owl: PREFIX dailymed: PREFIX foaf: SELECT DISTINCT ?prodName ?pharmgxDrug ?genSymb ?biomarkerMapping ?biomarkerHome ?splHomepage ?splSect WHERE { ?o sider:sideEffectName "Hyperkalemia". ?d sider:sideEffect ?o. ?d rdfs:label ?dName. ?rxCui owl:sameAs ?d.FILTER(REGEX(STR(?rxCui),".*RXNORM.*","i")) ?spl a dailymed:structuredProductLabelMetadata; dailymed:activeMoietyRxCUI ?rxCui; dailymed:fullName ?prodName; dailymed:setId ?setId; foaf:homepage ?splHomepage. ?pharmgxData a dailymed:pharmgxData; dailymed:setId ?setId; dailymed:pharmgxDrug ?pharmgxDrug; dailymed:pharmgxSPLSection ?splSect; dailymed:HGNCGeneSymbol ?genSymb; owl:sameAs ?biomarkerMapping; foaf:homepage ?biomarkerHome. } LIMIT 100 # Note that a hypothetical connection between 2C19 status and hyperkalemia is implicit