A set of SPARQL examples that are used in different SIB resources
Show the reaction equation for ATP synthase (reaction ATPS4m from BiGG). NB: there are two types of protons here, as MetaNetX distinguishes protons used for balancing (MNXM1) from those that are translocated (MNXM01).
PREFIX biggR: <https://identifiers.org/bigg.reaction:>
PREFIX mnx: <https://rdf.metanetx.org/schema/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
# Show the reaction equation for ATP synthase (reaction
# *ATPS4m* from BiGG). NB: there are two types of protons
# here, as MetaNetX distinguishes protons used for balancing
# (MNXM1) from those that are translocated (MNXM01).
SELECT ?chem ?chem_name ?comp ?comp_name $coef
FROM <https://rdf.metanetx.org/> WHERE{
?reaction mnx:reacXref biggR:ATPS4m .
?reaction ?side ?part .
?part mnx:chem ?chem ;
mnx:comp ?comp ;
mnx:coef ?c .
?chem rdfs:comment ?chem_name .
?comp rdfs:comment ?comp_name .
FILTER( ?side IN ( mnx:left , mnx:right ))
BIND( IF( ?side = mnx:left, - ?c, ?c ) AS ?coef )
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?c")
v4("?chem"):::projected
v7("?chem_name"):::projected
v9("?coef"):::projected
v5("?comp"):::projected
v8("?comp_name"):::projected
v3("?part")
v2("?reaction")
v1("?side")
c4(["bigg.reaction:ATPS4m"]):::iri
list0c2(["mnx:right"]):::iri
list0c1(["mnx:left"]):::iri
list0c1 --o f0
list0c2 --o f0
f0[[" in "]]
f0 --> v1
v2 --"mnx:reacXref"--> c4
v2 -->v1--> v3
v3 --"mnx:chem"--> v4
v3 --"mnx:comp"--> v5
v3 --"mnx:coef"--> v6
v4 --"rdfs:comment"--> v7
v5 --"rdfs:comment"--> v8
bind1[/"if(?side = 'mnx:left','-1^^xsd:integer' * ?c,?c)"/]
v1 --o bind1
v6 --o bind1
bind1 --as--o v9