Example queries

  1. What are all of the names for UniProt "P15923"?

    PREFIX sadi: <http://sadiframework.org/ontologies/properties.owl#> PREFIX ss: <http://semanticscience.org/resource/> PREFIX uniprot: <http://lsrn.org/UniProt:> SELECT ?nameString WHERE { uniprot:P15923 sadi:hasName ?name . ?name ss:SIO_000300 ?nameString . }
  2. What proteins is Pubmed article 9207092 written about? What organisms do these proteins belong to?

    PREFIX sadi: <http://sadiframework.org/ontologies/properties.owl#> PREFIX ss: <http://semanticscience.org/resource/> PREFIX pubmed: <http://lsrn.org/PMID:> SELECT ?protein ?organismName WHERE { pubmed:9207092 ss:SIO_000252 ?protein . ?protein sadi:fromOrganism ?organism . ?organism sadi:hasName ?name . ?name ss:SIO_000300 ?organismName . }
  3. What protein(s) does PDB entry "3SAK" provide a structure for? What are the amino acid sequences for these proteins?

    PREFIX sadi: <http://sadiframework.org/ontologies/properties.owl#> PREFIX ss: <http://semanticscience.org/resource/> PREFIX pdb: <http://lsrn.org/PDB:> SELECT ?protein ?seqString WHERE { pdb:3SAK sadi:is3DStructureOf ?protein . ?protein sadi:hasSequence ?sequence . ?sequence ss:SIO_000300 ?seqString . }
  4. What pathways does UniProt protein P47989 belong to?

    PREFIX ss: <http://semanticscience.org/resource/> PREFIX uniprot: <http://lsrn.org/UniProt:> SELECT ?gene ?pathway WHERE { uniprot:P47989 ss:SIO_010079 ?gene . ?gene ss:SIO_000062 ?pathway . }
  5. What genes are involved in the same pathway as KEGG gene hsa:50616?

    PREFIX ss: <http://semanticscience.org/resource/> PREFIX hsa: <http://lsrn.org/KEGG:hsa:> SELECT ?pathway ?relatedGene WHERE { hsa:50616 ss:SIO_000062 ?pathway . ?pathway ss:SIO_000132 ?relatedGene . }
  6. What genes are involved in both KEGG pathway "hsa00030" and KEGG pathway "has00500"?

    PREFIX ss: <http://semanticscience.org/resource/> PREFIX pathway: <http://lsrn.org/KEGG_PATHWAY:> SELECT ?gene WHERE { ?gene ss:SIO_000062 pathway:hsa00030 . ?gene ss:SIO_000062 pathway:hsa00500 . }
  7. What genes are involved in KEGG pathway "hsa00232"? What proteins do those genes code for? What are the sequences of those proteins?

    PREFIX sadi: <http://sadiframework.org/ontologies/properties.owl#> PREFIX ss: <http://semanticscience.org/resource/> PREFIX kegg: <http://lsrn.org/KEGG_PATHWAY:> SELECT ?gene ?protein ?seqString WHERE { kegg:hsa00232 ss:SIO_000132 ?gene . ?gene ss:SIO_010078 ?protein . ?protein sadi:hasSequence ?sequence . ?sequence ss:SIO_000300 ?seqString . }
  8. What genes are instances of the class http://elmonline.ca/dev/simple.owl#simple:CaffeineMetabolismParticipant?

    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX simple: <http://biordf.net/cardioSHARE/simple.owl#> SELECT ?gene WHERE { ?gene rdf:type simple:CaffeineMetabolismParticipant }
  9. Show me images of the cho snapdragon mutant.

    PREFIX pred: <http://sadiframework.org/ontologies/service_objects.owl#> PREFIX dragondb: <http://lsrn.org/DragonDB_Allele:> SELECT ?image ?desc WHERE { dragondb:cho pred:visualizedByImage ?image . ?image pred:hasDescription ?desc }
  10. What are the paralogs of the KEGG CXCL1 gene, and what are their scores

    PREFIX serv: <http://sadiframework.org/ontologies/service_objects.owl#> PREFIX kegg: <http://lsrn.org/KEGG:hsa:> SELECT ?gene ?score ?ssdb WHERE { kegg:2919 serv:isParalogOf ?gene . ?gene serv:participantInSSDBRecord ?ssdb . ?ssdb serv:bitScore ?score }
  11. Show me participants in KEGG pathway "hsa00232". If the participant is a gene, show me the protein it codes for; if the participant is a compound, show me it's PubChem equivalent.

    PREFIX sadi: <http://sadiframework.org/ontologies/properties.owl#> PREFIX ss: <http://semanticscience.org/resource/> PREFIX kegg: <http://lsrn.org/KEGG_PATHWAY:> SELECT ?participant ?protein ?chemical WHERE { kegg:hsa00232 ss:SIO_000132 ?participant . OPTIONAL { ?participant ss:SIO_010078 ?protein . } . OPTIONAL { ?participant sadi:isSubstance ?chemical . } }
  12. Show me patients whose creatinine level is increasing over time, along with their latest BUN and creatinine levels.

    PREFIX patients: <http://sadiframework.org/ontologies/patients.owl#> PREFIX regress: <http://sadiframework.org/examples/regression.owl#> PREFIX sio: <http://semanticscience.org/resource/> SELECT ?patient ?bun ?creat FROM <http://sadiframework.org/ontologies/patients.rdf> FROM <http://sadiframework.org/ontologies/patients.owl> WHERE { ?patient patients:creatinineLevels ?creats . ?creats regress:hasRegressionModel ?model . ?model regress:slope ?slope FILTER ( ?slope > 0 ) . ?creats sio:SIO_000059 ?creatEvent . ?creatEvent sio:SIO_000008 ?creatMeasurementNode . ?creatMeasurementNode a patients:Measurement . ?creatMeasurementNode sio:SIO_000300 ?creat . ?creatEvent sio:SIO_000008 ?creatOffNode . ?creatOffNode a patients:Offset . ?creatOffNode sio:SIO_000300 ?creatOff . OPTIONAL { ?creats sio:SIO_000059 ?creatEvent2 . ?creatEvent2 sio:SIO_000008 ?creatOffNode2 . ?creatOffNode2 a patients:Offset . ?creatOffNode2 sio:SIO_000300 ?creatOff2 . FILTER( ?creatOff2 > ?creatOff ) . } . FILTER ( !bound(?creatOff2) ) . ?patient patients:BUNLevels ?buns . ?buns sio:SIO_000059 ?bunEvent . ?bunEvent sio:SIO_000008 ?bunMeasurementNode . ?bunMeasurementNode a patients:Measurement . ?bunMeasurementNode sio:SIO_000300 ?bun . ?bunEvent sio:SIO_000008 ?bunOffNode . ?bunOffNode a patients:Offset . ?bunOffNode sio:SIO_000300 ?bunOff . OPTIONAL { ?buns sio:SIO_000059 ?bunEvent2 . ?bunEvent2 sio:SIO_000008 ?bunOffNode2 . ?bunOffNode2 a patients:Offset . ?bunOffNode2 sio:SIO_000300 ?bunOff2 . FILTER( ?bunOff2 > ?bunOff ) . } . FILTER ( !bound(?bunOff2) ) . }
  13. Same as the last query, but encapsulated as an OWL class.

    PREFIX patients: <http://sadiframework.org/ontologies/patients.owl#> PREFIX regress: <http://sadiframework.org/examples/regression.owl#> SELECT ?patient ?bun ?creat FROM <http://sadiframework.org/ontologies/patients.rdf> FROM <http://sadiframework.org/ontologies/patients.owl> WHERE { ?patient a patients:LikelyRejector . ?patient patients:creatinineLevels ?creats . ?creats regress:yForLargestX ?creat . ?patient patients:BUNLevels ?buns . ?buns regress:yForLargestX ?bun . }
  14. Convert patient blood chemistry measurements to canonical units.

    PREFIX cardio: <http://es-01.chibi.ubc.ca/~soroush/framingham/cardiorisk.owl#> SELECT ?originalvalue ?originalunit ?convertedvalue ?canonicalunit FROM <http://es-01.chibi.ubc.ca/~soroush/framingham/pressuredata.rdf> WHERE { ?pressure a cardio:SystolicBloodPressure . ?pressure cardio:hasMeasurement ?measurement1 . ?measurement1 a cardio:CanonicalPressureMeasurement . ?measurement1 cardio:hasValue ?convertedvalue . ?measurement1 cardio:hasUnit ?canonicalunit . ?pressure cardio:hasMeasurement ?measurement2 . ?measurement2 cardio:hasValue ?originalvalue . ?measurement2 cardio:hasUnit ?originalunit . FILTER regex(str(?measurement2), "http://es-01.chibi.ubc.ca/~soroush/framingham/") }