HCLSIG BioRDF Subgroup/QueryFederation/useful queries

From W3C Wiki
Jump to: navigation, search

This page can be used to collect queries that might be helpful for understanding the Query Federation scenario.

Querying the HCLS KB to get the SenseLab receptor class corresponding to a NCBI Gene Record entity in Neurocommons:

prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix owl: <http://www.w3.org/2002/07/owl#>

select ?receptor_protein
where 
 { 
  ?receptor_protein rdfs:subClassOf ?res1 .
  ?res1 owl:someValuesFrom ?senselab_gene .
  ?senselab_gene owl:equivalentClass ?res2 .
  ?res2 owl:onProperty <http://purl.org/ycmi/senselab/neuron_ontology.owl#has_nucleotide_sequence_described_by> .
  ?res2 owl:hasValue <http://purl.org/commons/record/ncbi_gene/2550> .
 }


Live Examples

The inverse of the above: Getting NCBI Gene Record etities from Neurocommons for a particular SenseLab receptor class:

prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix owl: <http://www.w3.org/2002/07/owl#>

select ?ncbi_gene
where 
 { 
  <http://purl.org/ycmi/senselab/neuron_ontology.owl#GabaB> rdfs:subClassOf ?res1 .
  ?res1 owl:someValuesFrom ?senselab_gene .
  ?senselab_gene owl:equivalentClass ?res2 .
  ?res2 owl:onProperty <http://purl.org/ycmi/senselab/neuron_ontology.owl#has_nucleotide_sequence_described_by> .
  ?res2 owl:hasValue ?ncbi_gene .
 }


Live Examples