Skip to content

Demonstration queries

krobasky edited this page Sep 8, 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 
FROM <http://purl.obolibrary.org/obo/ncit.owl>
FROM <http://purl.obolibrary.org/obo/ncit/ncit-property-graph-redundant.ttl>
WHERE {
?disease 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://purl.obolibrary.org/obo/ncit/ncit-property-graph-redundant.ttl>
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