A set of SPARQL examples that are used in different SIB resources
Get structural data of a given ChEBI compound (CHEBI:29985 L-glutamate)
#
# 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