Context:
http://ginsim.org/ginsim-doc/current/format-ginml.html
Chaouiya, C., González, A., & Thieffry, D. (n.d.). GINML: Towards a GXL Based Format for Logical Regulatory Graphs and Dynamical Graphs. Citeseer, (i), 0–1. Retrieved from http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.136.7211&rep=rep1&type=pdf
Functions:
These are functions used in the rules’ semantic actions or the parts’ attributes of an attribute grammar.
Edges
edge(From, To, Sign, Val)
gives:
<edge id="<From>_<To>" from="<From>" to="<To>" sign="<Sign>" minvalue="<Val>"/>
e.g.: edge(‘complex’, ‘ADE2′,’negative’,2)
<edge id=”complex:ADE2:2″ from=”complex” to=”ADE2″ minvalue=”2″ sign=”negative”>
</edge>
Nodes
node(Name, MaxVal)
gives:
<node id="<Name>" maxvalue="<MaxVal>"/>
e.g.: node(‘ADE2’,2)
<node id=’ADE2′ maxvalue=’2’/>
node(Name, MinVal, MaxVal)
gives:
<node id="<Name>" basevalue="<MinVal>" maxvalue="<MaxVal>"/>
e.g.: node(‘ADE2’,1,2)
<node id=’ADE2′ basevalue=’1′ maxvalue=’2’/>
node(Name, MinVal, MaxVal, Param)
gives:
<node id="<Name>" basevalue="<MinVal>" maxvalue="<MaxVal>"> <parameter val="<Param>"/> </node>
e.g.: node(‘GEV’,0,2,1)
<node id=”GEV” basevalue=”0″ maxvalue=”2″>
<parameter val=”1″/>
</node>
node(Name, MinVal, MaxVal, ListParamInteraction)
gives:
<node id="<Node>" basevalue="<MinVal>" maxvalue="<MaxVal>"> <parameter val="<Param>" idActiveInteractions="<Interaction>"/> ... </node>
e.g.: node(complex,0,2,[[1,’dCas9:complex:1′],[1,’gRNA:complex:1′],[2,’gRNA:complex:1 dCas9:complex:1′]])
<node id=”complex” basevalue=”0″ maxvalue=”2″>
<parameter val=”1″ idActiveInteractions=”dCas9:complex:1″/>
<parameter val=”1″ idActiveInteractions=”gRNA:complex:1″/>
<parameter val=”2″ idActiveInteractions=”gRNA:complex:1 dCas9:complex:1″/>
</node>
node(Name, MinVal, MaxVal, Param, ListParamInteraction)
gives:
<node id="<Node>" basevalue="<MinVal>" maxvalue="<MaxVal>"> <parameter val="<Param>"/> <parameter val="<Param>" idActiveInteractions="<Interaction>"/> ... </node>
e.g.: node(complex,0,2,0,[[1,’dCas9:complex:1′],[1,’gRNA:complex:1′],[2,’gRNA:complex:1 dCas9:complex:1′]])
<node id=”complex” basevalue=”0″ maxvalue=”2″>
<parameter val=”0″/>
<parameter val=”1″ idActiveInteractions=”dCas9:complex:1″/>
<parameter val=”1″ idActiveInteractions=”gRNA:complex:1″/>
<parameter val=”2″ idActiveInteractions=”gRNA:complex:1 dCas9:complex:1″/>
</node>
Utilities:
Typically, a call of the compiler (SWI-Prolog) to analyze the synthetic design ‘Tokens’ (a list of parts) is:
check_grammar(Tokens) :- init_ginml, c_start(S1, S2, S3, Tokens, []) , write_graph(S1),process_list(S1),analyze_trans(S2,S1),end_ginml .
where the c_start attributes are:
- S1 is the list of nodes,
- S2 is the list of ressources (i.e. edges declarations, possibly trans).
init_ginml
will open a file, design.ginml and start writing:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE gxl SYSTEM "http://gin.univ-mrs.fr/GINsim/GINML_2_1.dtd"><gxl xmlns:xlink="http://www.w3.org/1999/xlink">
end_ginml
</graph> </gxl>
and will close the design.ginml file.
write_graph(S1)
<graph id="defaultID" class="regulatory" nodeorder="<list_of_nodes_S1>"
process_list(S1)
is just going to execute all the declarations in S1 that is, it will write down all the nodes and edges found in S1 in the ginML file.
NOTE: the implementation of this function has been moved to Utilities_compiler.pl. add the consult(‘AG_API/Utilities_compiler.pl’) in your code!
analyze_trans(S2,S1)
see trans API.