sparql-examples

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

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

2

Retrieve the identifiers for N,N-dimethyl-beta-alanine in external databases. This crosslinking of external identifiers is the core of MNXref.

Use at

PREFIX mnx: <https://rdf.metanetx.org/schema/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

# Retrieve the identifiers for *N,N-dimethyl-beta-alanine* in
# external databases. This crosslinking of external
# identifiers is the core of MNXref.

SELECT ?metabolite ?xref
FROM <https://rdf.metanetx.org/> WHERE {
    ?metabolite a mnx:CHEM .
    ?metabolite rdfs:comment 'N-nitrosomethanamine' .
    ?metabolite mnx:chemXref ?xref
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?metabolite"):::projected 
  v2("?xref"):::projected 
  c4(["N-nitrosomethanamine"]):::literal 
  c2(["mnx:CHEM"]):::iri 
  v1 --"a"-->  c2
  v1 --"rdfs:comment"-->  c4
  v1 --"mnx:chemXref"-->  v2