sparql-examples

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

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

97_Get_structural_data_of_a_given_ChEBI_compound

rq turtle/ttl

Get structural data of a given ChEBI compound (CHEBI:29985 L-glutamate)

Use at



#
# get structural data of a given ChEBI compound
#
PREFIX rh:<http://rdf.rhea-db.org/>
PREFIX CHEBI:<http://purl.obolibrary.org/obo/CHEBI_>
PREFIX chebihash:<http://purl.obolibrary.org/obo/chebi/>
SELECT
  ?chebi
  ?formula
  ?charge
  ?mass
  ?monoisotopicmass
  ?inchikey
  ?smiles
  ?inchi
WHERE {
  BIND (CHEBI:29985 AS ?chebi)
  ?chebi chebihash:inchi ?inchi ;
    chebihash:smiles ?smiles ;
    chebihash:formula ?formula ;
    chebihash:mass ?mass ;
    chebihash:charge ?charge ;
    chebihash:inchikey ?inchikey ;
    chebihash:monoisotopicmass ?monoisotopicmass .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v6("?charge"):::projected 
  v1("?chebi"):::projected 
  v4("?formula"):::projected 
  v2("?inchi"):::projected 
  v7("?inchikey"):::projected 
  v5("?mass"):::projected 
  v8("?monoisotopicmass"):::projected 
  v3("?smiles"):::projected 
  bind0[/"'CHEBI:29985'"/]
  bind0 --as--o v1
  v1 --http://purl.obolibrary.org/obo/chebi/inchi-->  v2
  v1 --http://purl.obolibrary.org/obo/chebi/smiles-->  v3
  v1 --http://purl.obolibrary.org/obo/chebi/formula-->  v4
  v1 --http://purl.obolibrary.org/obo/chebi/mass-->  v5
  v1 --http://purl.obolibrary.org/obo/chebi/charge-->  v6
  v1 --http://purl.obolibrary.org/obo/chebi/inchikey-->  v7
  v1 --http://purl.obolibrary.org/obo/chebi/monoisotopicmass-->  v8