Skip to content

Demonstration queries

Jim Balhoff edited this page Sep 1, 2017 · 24 revisions

This resource can be mined for interesting knowledge. Below are some examples, click on a question to run it in YASGUI:

Find disease associations

prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix lymphedema: <http://purl.obolibrary.org/obo/NCIT_C3207>
prefix DiseaseHasAssociatedDisease: <http://purl.obolibrary.org/obo/NCIT_R126>
select distinct ?disease ?disease_label where {
?disease rdfs:subClassOf* /DiseaseHasAssociatedDisease: lymphedema: .
?disease rdfs:label ?disease_label .
}

Find diseases related to a particular anatomic site

prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix repro: <http://purl.obolibrary.org/obo/NCIT_C12841>
prefix HasPrimaryAnatomicSite: <http://purl.obolibrary.org/obo/NCIT_R101>
select distinct ?disease ?disease_label where {
?disease rdfs:subClassOf* /HasPrimaryAnatomicSite: repro: .
?disease rdfs:label ?disease_label .
}
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix lung: <http://purl.obolibrary.org/obo/NCIT_C12468>
prefix HasPrimaryAnatomicSite: <http://purl.obolibrary.org/obo/NCIT_R101>
select distinct ?disease ?disease_label where {
?disease rdfs:subClassOf* /HasPrimaryAnatomicSite: lung: .
?disease rdfs:label ?disease_label .
}

Find procedures that target a particular anatomical site

prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix colon: <http://purl.obolibrary.org/obo/NCIT_C12382>
prefix ProcedureHasTarget: <http://purl.obolibrary.org/obo/NCIT_R163>
select distinct ?procedure ?procedure_label where {
?disease rdfs:subClassOf* /ProcedureHasTarget: colon: .
?disease rdfs:label ?procedure_label .
}
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix lung: <http://purl.obolibrary.org/obo/NCIT_C12468>
prefix ProcedureHasTarget: <http://purl.obolibrary.org/obo/NCIT_R163>
select distinct ?procedure ?procedure_label where {
?disease rdfs:subClassOf* /ProcedureHasTarget: lung: .
?disease rdfs:label ?procedure_label .
}

Find regimens containing specific components

prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix Declopramide: <http://purl.obolibrary.org/obo/NCIT_C1772>
prefix ChemotherapyRegimenHasComponent: <http://purl.obolibrary.org/obo/NCIT_R123>
select distinct ?regimen ?regimen_label where {
?regimen rdfs:subClassOf* /ChemotherapyRegimenHasComponent: Declopramide: .
?regimen rdfs:label ?regimen_label .
}
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix Cisplatin: <http://purl.obolibrary.org/obo/NCIT_C376>
prefix ChemotherapyRegimenHasComponent: <http://purl.obolibrary.org/obo/NCIT_R123>
select distinct ?regimen ?regimen_label where {
?regimen rdfs:subClassOf* /ChemotherapyRegimenHasComponent: Cisplatin: .
?regimen rdfs:label ?regimen_label .
}
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Prefix Doxorubicin: <http://purl.obolibrary.org/obo/NCIT_C456>
prefix ChemotherapyRegimenHasComponent: <http://purl.obolibrary.org/obo/NCIT_R123>
select distinct ?regimen ?regimen_label where {
?regimen rdfs:subClassOf* /ChemotherapyRegimenHasComponent: Doxorubicin: .
?regimen rdfs:label ?regimen_label .
}
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Prefix LeucovorinCalcium: <http://purl.obolibrary.org/obo/NCIT_C607>
prefix ChemotherapyRegimenHasComponent: <http://purl.obolibrary.org/obo/NCIT_R123>
select distinct ?regimen ?regimen_label where {
?regimen rdfs:subClassOf* /ChemotherapyRegimenHasComponent: LeucovorinCalcium: .
?regimen rdfs:label ?regimen_label .
}
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix Dexamethasone: <http://purl.obolibrary.org/obo/NCIT_C422>
prefix ChemotherapyRegimenHasComponent: <http://purl.obolibrary.org/obo/NCIT_R123>
select distinct ?regimen ?regimen_label where {
?regimen rdfs:subClassOf* /ChemotherapyRegimenHasComponent: Dexamethasone: .
?regimen rdfs:label ?regimen_label .
}

Find regimens specific to a particular disease

prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Prefix BreastCancer: <http://purl.obolibrary.org/obo/NCIT_C4872>
prefix RegimenHasAcceptedUseForDisease: <http://purl.obolibrary.org/obo/NCIT_R172>
select distinct ?regimen ?regimen_label where {
?regimen rdfs:subClassOf* /RegimenHasAcceptedUseForDisease: BreastCancer: .
?regimen rdfs:label ?regimen_label .
}

Find a regimen specific to a disease, and that has a particular component

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX Disease_Has_Associated_Anatomic_Site: <http://purl.obolibrary.org/obo/NCIT_R100>
PREFIX BreastCarcinoma: <http://purl.obolibrary.org/obo/NCIT_C4872>
PREFIX Doxorubicin: <http://purl.obolibrary.org/obo/NCIT_C456>
PREFIX RegimenHasAcceptedUseForDisease: <http://purl.obolibrary.org/obo/NCIT_R172>
PREFIX ChemotherapyRegimenHasComponent: <http://purl.obolibrary.org/obo/NCIT_R123>
SELECT DISTINCT ?regimen ?label 
FROM <http://purl.obolibrary.org/obo/ncit.owl>
FROM <http://github.com/NCI-Thesaurus/thesaurus-obo-edition/property-graph-redundant>
WHERE { 
  ?regimen RegimenHasAcceptedUseForDisease: BreastCarcinoma: .
  ?regimen ChemotherapyRegimenHasComponent: Doxorubicin: .
  ?regimen rdfs:label ?label .
}

Genetic-based queries

prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix oncogene: <http://purl.obolibrary.org/obo/NCIT_C19540>
Select distinct ?oncogene ?oncogene_label where {
?oncogene rdfs:subClassOf* oncogene: .
?oncogene rdfs:label ?oncogene_label .
}
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix FusionGene: <http://purl.obolibrary.org/obo/NCIT_C28510>
Select distinct ?fusion ?fusion_label where {
?fusion rdfs:subClassOf* FusionGene: .
?fusion rdfs:label ?fusion_label .
}
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix ETV6: <http://purl.obolibrary.org/obo/NCIT_C18312>
prefix MolecularAbnormalityInvolvesGene: <http://purl.obolibrary.org/obo/NCIT_R177>
select distinct ?abnormality ?abnormality_label where {
?abnormality rdfs:subClassOf* /MolecularAbnormalityInvolvesGene: ETV6: .
?abnormality rdfs:label ?abnormality_label .
}
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix NSCLCPathway: <http://purl.obolibrary.org/obo/NCIT_C91445>
prefix GeneIsElementInPathway: <http://purl.obolibrary.org/obo/NCIT_R130>
select distinct ?gene ?gene_label where {
?gene rdfs:subClassOf* /GeneIsElementInPathway: NSCLCPathway: .
?gene rdfs:label ?gene_label .
}
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix HBBGene: <http://purl.obolibrary.org/obo/NCIT_C84951>
prefix DiseaseMappedToGene: <http://purl.obolibrary.org/obo/NCIT_R176>
select distinct ?disease ?disease_label where {
?disease rdfs:subClassOf* /DiseaseMappedToGene: HBBGene: .
?disease rdfs:label ?disease_label .
}
Clone this wiki locally