{"id":1291,"date":"2015-03-02T23:26:02","date_gmt":"2015-03-02T23:26:02","guid":{"rendered":"http:\/\/ladam.info\/?page_id=1291"},"modified":"2019-01-18T21:47:27","modified_gmt":"2019-01-18T21:47:27","slug":"ag2ginml-api","status":"publish","type":"page","link":"https:\/\/ladam.info\/index.php\/design-of-languages-for-systems-and-synthetic-biology\/ag2ginml-api\/","title":{"rendered":"AG2GinML API"},"content":{"rendered":"<h2>Context:<\/h2>\n<p>http:\/\/ginsim.org\/ginsim-doc\/current\/format-ginml.html<\/p>\n<p style=\"margin-left: 24pt; text-indent: -24.0pt;\">Chaouiya, C., Gonz\u00e1lez, A., &amp; Thieffry, D. (n.d.). GINML: Towards a GXL Based Format for Logical Regulatory Graphs and Dynamical Graphs. <i>Citeseer<\/i>, (i), 0\u20131. Retrieved from http:\/\/citeseerx.ist.psu.edu\/viewdoc\/download?doi=10.1.1.136.7211&amp;rep=rep1&amp;type=pdf<\/p>\n<h2>Functions:<\/h2>\n<p>These are functions used in the rules&#8217; semantic actions or the parts&#8217; attributes of an attribute grammar.<\/p>\n<h3>Edges<\/h3>\n<p><strong>edge(From, To, Sign, Val)<\/strong><br \/>\ngives:<\/p>\n<pre>&lt;edge id=\"<span style=\"color: #808080;\">&lt;From&gt;<\/span>_<span style=\"color: #808080;\">&lt;To&gt;<\/span>\" from=\"<span style=\"color: #808080;\">&lt;From&gt;<\/span>\" to=\"<span style=\"color: #808080;\">&lt;To&gt;<\/span>\" sign=\"<span style=\"color: #808080;\">&lt;Sign&gt;<\/span>\" minvalue=\"<span style=\"color: #808080;\">&lt;Val&gt;<\/span>\"\/&gt;<\/pre>\n<p><em>e.g.:\u00a0<\/em>edge(&#8216;complex&#8217;, &#8216;ADE2&#8242;,&#8217;negative&#8217;,2)<br \/>\n<em>&lt;edge id=&#8221;complex:ADE2:2&#8243; from=&#8221;complex&#8221; to=&#8221;ADE2&#8243; minvalue=&#8221;2&#8243; sign=&#8221;negative&#8221;&gt;<\/em><br \/>\n<em>&lt;\/edge&gt;<\/em><\/p>\n<h3>Nodes<\/h3>\n<p><strong>node(Name, MaxVal)<\/strong><br \/>\ngives:<\/p>\n<pre>&lt;node id=\"<span style=\"color: #808080;\">&lt;Name&gt;<\/span>\" maxvalue=\"<span style=\"color: #808080;\">&lt;MaxVal&gt;<\/span>\"\/&gt;<\/pre>\n<p><em>e.g.:\u00a0<\/em>node(&#8216;ADE2&#8217;,2)<br \/>\n<em>&lt;node id=&#8217;ADE2&#8242; maxvalue=&#8217;2&#8217;\/&gt;<\/em><br \/>\n<strong>node(Name, MinVal, MaxVal)<\/strong><br \/>\ngives:<\/p>\n<pre>&lt;node id=\"<span style=\"color: #808080;\">&lt;Name&gt;<\/span>\" basevalue=\"<span style=\"color: #808080;\">&lt;MinVal&gt;<\/span>\" maxvalue=\"<span style=\"color: #808080;\">&lt;MaxVal&gt;<\/span>\"\/&gt;<\/pre>\n<p><em>e.g.:\u00a0<\/em>node(&#8216;ADE2&#8217;,1,2)<br \/>\n<em>&lt;node id=&#8217;ADE2&#8242; basevalue=&#8217;1&#8242; maxvalue=&#8217;2&#8217;\/&gt;<\/em><br \/>\n<strong>node(Name, MinVal, MaxVal, Param)<\/strong><br \/>\ngives:<\/p>\n<pre>&lt;node id=\"<span style=\"color: #808080;\">&lt;Name&gt;<\/span>\" basevalue=\"<span style=\"color: #808080;\">&lt;MinVal&gt;<\/span>\" maxvalue=\"<span style=\"color: #808080;\">&lt;MaxVal&gt;<\/span>\"&gt;\n&lt;parameter val=\"<span style=\"color: #808080;\">&lt;Param&gt;<\/span>\"\/&gt;\n&lt;\/node&gt;<\/pre>\n<p><em>e.g.:\u00a0<\/em>node(&#8216;GEV&#8217;,0,2,1)<br \/>\n<em>&lt;node id=&#8221;GEV&#8221; basevalue=&#8221;0&#8243; maxvalue=&#8221;2&#8243;&gt;<br \/>\n&lt;parameter val=&#8221;1&#8243;\/&gt;<br \/>\n&lt;\/node&gt;<\/em><br \/>\n<strong>node(Name, MinVal, MaxVal, ListParamInteraction)<\/strong><br \/>\ngives:<\/p>\n<pre>&lt;node id=\"&lt;Node&gt;\" basevalue=\"&lt;MinVal&gt;\" maxvalue=\"&lt;MaxVal&gt;\"&gt;\n&lt;parameter val=\"&lt;Param&gt;\" idActiveInteractions=\"&lt;Interaction&gt;\"\/&gt;\n...\n&lt;\/node&gt;<\/pre>\n<p><em>e.g.:\u00a0<\/em>node(complex,0,2,[[1,&#8217;dCas9:complex:1&#8242;],[1,&#8217;gRNA:complex:1&#8242;],[2,&#8217;gRNA:complex:1 dCas9:complex:1&#8242;]])<br \/>\n<em>&lt;node id=&#8221;complex&#8221; basevalue=&#8221;0&#8243; maxvalue=&#8221;2&#8243;&gt;<\/em><br \/>\n<em>&lt;parameter val=&#8221;1&#8243; idActiveInteractions=&#8221;dCas9:complex:1&#8243;\/&gt;<\/em><br \/>\n<em>&lt;parameter val=&#8221;1&#8243; idActiveInteractions=&#8221;gRNA:complex:1&#8243;\/&gt;<\/em><br \/>\n<em>&lt;parameter val=&#8221;2&#8243; idActiveInteractions=&#8221;gRNA:complex:1 dCas9:complex:1&#8243;\/&gt;<\/em><br \/>\n<em>&lt;\/node&gt;<\/em><br \/>\n<strong>node(Name, MinVal, MaxVal, Param, ListParamInteraction)<\/strong><br \/>\ngives:<\/p>\n<pre>&lt;node id=\"&lt;Node&gt;\" basevalue=\"&lt;MinVal&gt;\" maxvalue=\"&lt;MaxVal&gt;\"&gt;\n&lt;parameter val=\"&lt;Param&gt;\"\/&gt;\n&lt;parameter val=\"&lt;Param&gt;\" idActiveInteractions=\"&lt;Interaction&gt;\"\/&gt;\n...\n&lt;\/node&gt;<\/pre>\n<p><em>e.g.:\u00a0<\/em>node(complex,0,2,0,[[1,&#8217;dCas9:complex:1&#8242;],[1,&#8217;gRNA:complex:1&#8242;],[2,&#8217;gRNA:complex:1 dCas9:complex:1&#8242;]])<br \/>\n<em>&lt;node id=&#8221;complex&#8221; basevalue=&#8221;0&#8243; maxvalue=&#8221;2&#8243;&gt;<\/em><br \/>\n<em>&lt;parameter val=&#8221;0&#8243;\/&gt;<\/em><br \/>\n<em>&lt;parameter val=&#8221;1&#8243; idActiveInteractions=&#8221;dCas9:complex:1&#8243;\/&gt;<\/em><br \/>\n<em>&lt;parameter val=&#8221;1&#8243; idActiveInteractions=&#8221;gRNA:complex:1&#8243;\/&gt;<\/em><br \/>\n<em>&lt;parameter val=&#8221;2&#8243; idActiveInteractions=&#8221;gRNA:complex:1 dCas9:complex:1&#8243;\/&gt;<\/em><br \/>\n<em>&lt;\/node&gt;<\/em><\/p>\n<h2>Utilities:<\/h2>\n<p>Typically, a call of the compiler (SWI-Prolog) to analyze the synthetic design &#8216;Tokens&#8217; (a list of parts) is:<\/p>\n<pre>check_grammar(Tokens) :- <strong>init_ginml,<\/strong> c_start(S1, S2, S3, Tokens, []) , <strong>write_graph(S1),process_list(S1),analyze_trans(S2,S1),end_ginml .<\/strong><\/pre>\n<p>where the c_start attributes are:<\/p>\n<ul>\n<li>S1 is the list of nodes,<\/li>\n<li>S2 is the list of ressources (i.e. edges declarations, possibly trans).<\/li>\n<\/ul>\n<p><strong>init_ginml<\/strong><br \/>\nwill open a file, design.ginml and start writing:<\/p>\n<pre>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;!DOCTYPE gxl SYSTEM \"<a href=\"http:\/\/gin.univ-mrs.fr\/GINsim\/GINML_2_1.dtd\">http:\/\/gin.univ-mrs.fr\/GINsim\/GINML_2_1.dtd<\/a>\"&gt;&lt;gxl xmlns:xlink=\"<a href=\"http:\/\/www.w3.org\/1999\/xlink\">http:\/\/www.w3.org\/1999\/xlink<\/a>\"&gt;<\/pre>\n<p><strong>end_ginml<\/strong><\/p>\n<pre>\u00a0\u00a0&lt;\/graph&gt;\n&lt;\/gxl&gt;<\/pre>\n<p>and will close the design.ginml file.<br \/>\n<strong>write_graph(S1)<\/strong><\/p>\n<pre>&lt;graph id=\"defaultID\" class=\"regulatory\" nodeorder=\"<span style=\"color: #808080;\">&lt;list_of_nodes_S1&gt;<\/span>\"<\/pre>\n<p><strong>process_list(S1)<\/strong><br \/>\nis just going to execute all the declarations in S1 that is, it will write down all the nodes and edges found in\u00a0S1 in the ginML file.<br \/>\nNOTE: the implementation of this function has been moved to Utilities_compiler.pl. add the\u00a0consult(&#8216;AG_API\/Utilities_compiler.pl&#8217;) in your code!<br \/>\n<strong>analyze_trans(S2,S1)<\/strong><br \/>\nsee<a title=\"TransAPI\" href=\"https:\/\/ladam.info\/index.php\/design-of-languages-for-systems-and-synthetic-biology\/transapi\/\"> trans API.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Context: http:\/\/ginsim.org\/ginsim-doc\/current\/format-ginml.html Chaouiya, C., Gonz\u00e1lez, A., &amp; Thieffry, D. (n.d.). GINML: Towards a GXL Based Format for Logical Regulatory Graphs and Dynamical Graphs. Citeseer, (i), 0\u20131. Retrieved from http:\/\/citeseerx.ist.psu.edu\/viewdoc\/download?doi=10.1.1.136.7211&amp;rep=rep1&amp;type=pdf Functions: These are functions used in the rules&#8217; semantic actions or the parts&#8217; attributes of an attribute grammar. Edges edge(From, To, Sign, Val) gives: &lt;edge id=&#8221;&lt;From&gt;_&lt;To&gt;&#8221;&nbsp;&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":845,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"nf_dc_page":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"class_list":["post-1291","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ladam.info\/index.php\/wp-json\/wp\/v2\/pages\/1291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ladam.info\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ladam.info\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ladam.info\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ladam.info\/index.php\/wp-json\/wp\/v2\/comments?post=1291"}],"version-history":[{"count":1,"href":"https:\/\/ladam.info\/index.php\/wp-json\/wp\/v2\/pages\/1291\/revisions"}],"predecessor-version":[{"id":1671,"href":"https:\/\/ladam.info\/index.php\/wp-json\/wp\/v2\/pages\/1291\/revisions\/1671"}],"up":[{"embeddable":true,"href":"https:\/\/ladam.info\/index.php\/wp-json\/wp\/v2\/pages\/845"}],"wp:attachment":[{"href":"https:\/\/ladam.info\/index.php\/wp-json\/wp\/v2\/media?parent=1291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}