sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

96_Get_tautomer_of_a_given_chebi_compound

rq turtle/ttl

Get tautomer of a given chebi compound

Use at

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh:<http://rdf.rhea-db.org/>
PREFIX obo:<http://purl.obolibrary.org/obo/>
PREFIX CHEBI:<http://purl.obolibrary.org/obo/CHEBI_>
PREFIX chebihash:<http://purl.obolibrary.org/obo/chebi#>
PREFIX owl:<http://www.w3.org/2002/07/owl#>
select
  ?chebi
  ?chebiName
  ?chebiTautomer
  ?chebiTautomerName
where {
  BIND(CHEBI:57416 AS ?chebi)
  ?chebi rdfs:subClassOf ?chebiRestriction .
  ?chebiRestriction a owl:Restriction .
  ?chebiRestriction owl:onProperty chebihash:is_tautomer_of .
  ?chebiRestriction owl:someValuesFrom ?chebiTautomer .
  ?chebi rdfs:label ?chebiName .
  ?chebiTautomer rdfs:label ?chebiTautomerName .
}
as
rdfs:subClassOf
a
owl:onProperty
owl:someValuesFrom
rdfs:label
rdfs:label
?chebi
?chebiName
?chebiRestriction
?chebiTautomer
?chebiTautomerName
owl:Restriction
obo:chebi#is_tautomer_of
'obo:CHEBI_57416'