A set of SPARQL examples that are used in different SIB resources
A GEM is primarily a set of reactions: here are all the reaction equations occurring in bigg_e_coli_core. NB: here the reac label is the one produced while compiling MetaNetX
PREFIX mnx: <https://rdf.metanetx.org/schema/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
# A GEM is primarily a set of reactions: here are all the
# reaction equations occurring in *bigg_e_coli_core*. NB: here
# the reac label is the one produced while compiling MetaNetX
SELECT ?reac_label ?chem_name ?comp_name ?coef
FROM <https://rdf.metanetx.org/> WHERE{
?mnet rdfs:label 'bigg_e_coli_core' ;
mnx:gpr/mnx:reac ?reac .
?reac rdfs:label ?reac_label ;
?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 )
}
ORDER BY ?reac_label
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?c")
v6("?chem")
v9("?chem_name"):::projected
v11("?coef"):::projected
v7("?comp")
v10("?comp_name"):::projected
v3("?mnet")
v5("?part")
v4("?reac")
v1("?reac_label"):::projected
v2("?side")
a1((" "))
c4(["bigg_e_coli_core"]):::literal
list0c2(["mnx:right"]):::iri
list0c1(["mnx:left"]):::iri
list0c1 --o f0
list0c2 --o f0
f0[[" in "]]
f0 --> v2
v3 --"rdfs:label"--> c4
v3 --"mnx:gpr"--> a1
a1 --"mnx:reac"--> v4
v4 --"rdfs:label"--> v1
v4 -->v2--> v5
v5 --"mnx:chem"--> v6
v5 --"mnx:comp"--> v7
v5 --"mnx:coef"--> v8
v6 --"rdfs:comment"--> v9
v7 --"rdfs:comment"--> v10
bind1[/"if(?side = 'mnx:left','-1^^xsd:integer' * ?c,?c)"/]
v2 --o bind1
v8 --o bind1
bind1 --as--o v11