Repository 'rrparser'
hg clone https://toolshed.g2.bx.psu.edu/repos/tduigou/rrparser

Changeset 1:ea590c609fec (2022-02-02)
Previous changeset 0:024dcd6421db (2021-11-18) Next changeset 2:092545561208 (2022-06-21)
Commit message:
"planemo upload commit 2f1af427fa4c4f2aad53ab94c4cdb51456c66019-dirty"
added:
rrparser.xml
test-data/rules_in.csv
test-data/rules_out.csv
removed:
rrparser/rrparser.xml
rrparser/test-data/rules.csv.gz
b
diff -r 024dcd6421db -r ea590c609fec rrparser.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/rrparser.xml Wed Feb 02 14:29:14 2022 +0000
[
@@ -0,0 +1,132 @@
+<tool id="rrparser" name="RRules Parser" version="@TOOL_VERSION@" profile="19.09">
+    <description>Retrieve the reaction rules from RetroRules</description>
+    <macros>
+        <token name="@TOOL_VERSION@">2.4.6</token>
+    </macros>
+    <requirements>
+        <requirement type="package" version="@TOOL_VERSION@">rrparser</requirement>
+    </requirements>
+    <stdio>
+        <regex match="WARNING:" level="warning" />
+        <regex match="ERROR:" level="fatal" />
+    </stdio>
+    <command detect_errors="exit_code"><![CDATA[
+        python -m rrparser
+        #if str($rules.type) != "other":
+            retrorules
+            --rule-type '$rules.type'
+        #else:
+            '$rules.file'
+            --input-format '$rules.format'
+        #end if
+        --diameters '$diameters'
+        --output-format csv
+        #if str($compress) == "true":
+            --outfile '$out_rules'.csv.gz
+            && mv '$out_rules'.csv.gz '$out_rules'
+        #else:
+            --outfile '$out_rules'
+        #end if
+    ]]></command>
+    <inputs>
+        <conditional name="rules">
+            <param name="type" type="select" label="Rule Type" help="">
+                <option value="retro" selected="True">RetroRules (retro)</option>
+                <option value="forward">RetroRules (forward)</option>
+                <option value="all">RetroRules (all)</option>
+                <option value="other">Other reaction rules...</option>
+            </param>
+            <when value="other">
+                <param name="file" type="data" format="csv" optional="False" label="Rules File"/>
+                <param name="format" type="select" optional="False" label="File format">
+                    <option value="csv" selected="True">csv</option>
+                    <option value="tsv">tsv</option>
+                </param>
+            </when>
+        </conditional>
+        <param name="diameters" type="select" display="checkboxes" multiple="True" label="Select the diameters of the reactions rules">
+            <option selected="true" value="2">2</option>
+            <option selected="true" value="4">4</option>
+            <option selected="true" value="6">6</option>
+            <option selected="true" value="8">8</option>
+            <option selected="true" value="10">10</option>
+            <option selected="true" value="12">12</option>
+            <option selected="true" value="14">14</option>
+            <option selected="true" value="16">16</option>
+        </param>
+        <param name="compress" type="boolean" display="checkboxes" label="Compress output" />
+    </inputs>
+    <outputs>
+        <data name="out_rules" format="csv" label="${tool.name}(${rules.type}, d=$diameters)" >
+            <change_format>
+                <when input="compress" format="tar" value="true"/>
+            </change_format>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+        <!-- test 1: check if identical outputs are produced with default parameters-->
+            <output name="out_rules" md5="54806bd44f7a8414e78439e3bb99e6d8"/>
+        </test>
+        <test>
+        <!-- test 2: check if identical outputs are produced with diameters=2,4,6-->
+            <param name="diameters" value="2,4,6"/>
+            <output name="out_rules" md5="12a55e1a3c7822a35ed799afa59b2aa2"/>
+        </test>
+        <test>
+        <!-- test 3: check if identical outputs are produced with csv input rules file-->
+            <conditional name="rules">
+                <param name="type" value="other"/>
+                <param name="file" value="rules_in.csv" />
+            </conditional>
+            <output name="out_rules" file="rules_out.csv" ftype="csv" compare="diff"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+RRulesParser
+============
+
+Retrieve the reaction rules from `RetroRules <https://retrorules.org/>`_
+
+Input
+-----
+
+* **rules-file**: (string) Filename of reaction rules
+* **input-format**: (string) input file format (default: csv)
+* **rule-type**: (string) {all,retro,forward} rule usage to filter from rules file
+* **diameters**: (integer list) diameter of the sphere including the atoms around the reacting center (default is including all values: 2,4,6,8,10,12,14,16). The higher is the diameter, the more specific are the rules
+* **output-format**: (string) {csv,tsv} output file format (default: csv)
+
+Ouput
+-----
+
+* **outfile**: (string): file where results are written. If file ends with '.gz', it will be gzipped.
+
+
+Version
+-------
+
+v2.4.6
+
+Authors
+-------
+
+* **Thomas Duigou**
+* Melchior du Lac
+* Joan Hérisson
+
+License
+-------
+
+This project is licensed under the MIT License - see the `LICENSE <https://github.com/brsynth/RRParser/blob/master/LICENSE>`_ file for details
+
+Acknowledgments
+---------------
+
+* Joan Hérisson
+
+    ]]></help>
+    <citations>
+        <citation type="doi">10.1093/nar/gky940 </citation>
+    </citations>
+</tool>
\ No newline at end of file
b
diff -r 024dcd6421db -r ea590c609fec rrparser/rrparser.xml
--- a/rrparser/rrparser.xml Thu Nov 18 11:11:45 2021 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,137 +0,0 @@
-<tool id="rrparser" name="RRules Parser" version="2.4.5">
-    <description>Reaction Rules Parser</description>
-    <requirements>
-        <requirement type="package" version="2.4.5">rrparser</requirement>
-    </requirements>
-    <stdio>
-        <regex match="WARNING:" level="warning" />
-     <regex match="ERROR:" level="fatal" />
-    </stdio>
-    <command detect_errors="exit_code"><![CDATA[
-        python -m rrparser
-        #if str($rules.type) != "other":
-            retrorules
-            --rule-type '$rules.type'
-        #else:
-            '$rules.file'
-            --input-format '$rules.format'
-        #end if
-        --diameters '$diameters'
-        --output-format csv
-        #if str($compress) == "true":
-            --outfile '$out_rules'.csv.gz ;
-            mv '$out_rules'.csv.gz '$out_rules'
-        #else:
-            --outfile '$out_rules'
-        #end if
-    ]]></command>
-    <inputs>
-        <conditional name="rules">
-            <param name="type" optional="True" type="select" label="Rule Type" help="">
-                <option value="retro" selected="True">RetroRules (retro)</option>
-                <option value="forward">RetroRules (forward)</option>
-                <option value="all">RetroRules (all)</option>
-                <option value="other">Other reaction rules...</option>
-            </param>
-            <when value="other">
-                <param name="file" optional="False" type="data" format="csv" label="Rules File"/>
-                <param name="format" optional="False" type="select" label="File format">
-                    <option value="csv" selected="True">csv</option>
-                    <option value="tsv">tsv</option>
-                </param>
-            </when>
-            <when value="retro|forward|all">
-                <param name="file" optional="True" type="data" format="csv" label="Rules File"/>
-            </when>
-        </conditional>
-        <param name="diameters" type="select" display="checkboxes" multiple="True" label="Select the diameters of the reactions rules">
-            <option selected="true" value="2">2</option>
-            <option selected="true" value="4">4</option>
-            <option selected="true" value="6">6</option>
-            <option selected="true" value="8">8</option>
-            <option selected="true" value="10">10</option>
-            <option selected="true" value="12">12</option>
-            <option selected="true" value="14">14</option>
-            <option selected="true" value="16">16</option>
-        </param>
-        <param name="compress" type="boolean" display="checkboxes" label="Compress output" />
-    </inputs>
-    <outputs>
-        <data name="out_rules" format="csv" label="${tool.name}(${rules.type}, d=$diameters)" >
-            <change_format>
-                <when input="compress" value="true" format="csv.gz"/>
-            </change_format>
-        </data>
-    </outputs>
-    <tests>
-        <test>
-        <!-- test 1: check if identical outputs are produced with compress option -->
-            <param name="compress" value="True" />
-            <output name="out_rules" file="rules.csv.gz" compare="diff" decompress="True"/>
-        </test>
-    </tests>
-    <help><![CDATA[
-RRulesParser
-============
-
-Retrieve the reaction rules from `RetroRules <https://retrorules.org/>`_
-
-Input
------
-
-* **rules-file**: (string) Filename of reaction rules
-* **input-format**: (string) Valid options: csv, tsv. Format of the input file
-* **rule-type**: (string) Valid options: retro, forward, all. Return the rules that are in reverse, forward or both direction
-* **diameters**: (integer list) Valid options: 2, 4, 6, 8, 10, 12, 14, 16. The diameter of the rules to return
-* **outdir**: (string) Path where output files will be written
-* **outfile**: (string) Path where output files will be written
-* **output-format**: (string) Valid options: csv, tar.gz. Format of the returned file
-
-Ouput
------
-
-* **output**: (string): Path of the output file. Either a compressed tar.gz (containing a csv) or csv list of reaction rules that are in a RetroPath2.0 friendly format
-
-
-Version
--------
-
-v2.4.1
-
-Authors
--------
-
-* **Thomas Duigou**
-* Melchior du Lac
-* Joan Hérisson
-
-License
--------
-
-This project is licensed under the MIT License - see the `LICENSE <LICENSE>`_ file for details
-
-Acknowledgments
----------------
-
-* Joan Hérisson
-
-    ]]></help>
-    <citations>
-        <citation type="bibtex">@article{10.1093/nar/gky940,
-        author = {Duigou, Thomas and du Lac, Melchior and Carbonell, Pablo and Faulon, Jean-Loup},
-        title = "{RetroRules: a database of reaction rules for engineering biology}",
-        journal = {Nucleic Acids Research},
-        volume = {47},
-        number = {D1},
-        pages = {D1229-D1235},
-        year = {2018},
-        month = {10},
-        abstract = "{RetroRules is a database of reaction rules for metabolic engineering (https://retrorules.org). Reaction rules are generic descriptions of chemical reactions that can be used in retrosynthesis workflows in order to enumerate all possible biosynthetic routes connecting a target molecule to its precursors. The use of such rules is becoming increasingly important in the context of synthetic biology applied to de novo pathway discovery and in systems biology to discover underground metabolism due to enzyme promiscuity. Here, we provide for the first time a complete set containing \\&gt;400 000 stereochemistry-aware reaction rules extracted from public databases and expressed in the community-standard SMARTS (SMIRKS) format, augmented by a rule representation at different levels of specificity (the atomic environment around the reaction center). Such numerous representations of reactions expand natural chemical diversity by predicting de novo reactions of promiscuous enzymes.}",
-        issn = {0305-1048},
-        doi = {10.1093/nar/gky940},
-        url = {https://doi.org/10.1093/nar/gky940},
-        eprint = {https://academic.oup.com/nar/article-pdf/47/D1/D1229/27436292/gky940.pdf},
-        }
-        </citation>
-    </citations>
-</tool>
\ No newline at end of file
b
diff -r 024dcd6421db -r ea590c609fec rrparser/test-data/rules.csv.gz
b
Binary file rrparser/test-data/rules.csv.gz has changed
b
diff -r 024dcd6421db -r ea590c609fec test-data/rules_in.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rules_in.csv Wed Feb 02 14:29:14 2022 +0000
[
b'@@ -0,0 +1,100 @@\n+Rule ID,Rule,EC number,Reaction order,Diameter,Score,Legacy ID,Reaction direction,Rule relative direction,Rule usage,Score normalized\r\n+RR-02-fbdda75e23f518b6-02-F,([#6&v4:1](=[#8&v2:2])(-[#6&v4:3](-[#6&v4:4])(-[#1&v1:5])-[#1&v1:6])-[#1&v1:7])>>([#6&v4:1](-[#8&v2:2]-[#1&v1:6])(-[#6&v4:3](-[#6&v4:4])(-[#8&v2]-[#1&v1])-[#1&v1:5])(-[#1&v1:7])-[#1&v1]),NOEC,1,2,4.295611076923876,MNXR94682_MNXM821,0,0,both,0.10469674387190456\r\n+RR-02-0250d458c4991a7d-02-F,([#6&v4:1](-[#8&v2:2]-[#1&v1:3])(-[#6&v4:4](-[#6&v4:5])(-[#8&v2:6]-[#1&v1:7])-[#1&v1:8])(-[#1&v1:9])-[#1&v1:10])>>([#6&v4:1](=[#8&v2:2])(-[#6&v4:4](-[#6&v4:5])(-[#1&v1:8])-[#1&v1:3])-[#1&v1:9].[#8&v2:6](-[#1&v1:7])-[#1&v1:10]),NOEC,1,2,4.295611076923876,MNXR94682_MNXM90191,0,0,both,0.10469674387190456\r\n+RR-02-c3681aa8011dc014-02-F,([#6&v4:1]-[#6&v4:2](=[#8&v2:3])-[#6&v4:4])>>([#6&v4:1]-[#6&v4:2](-[#8&v2:3]-[#1&v1])(-[#6&v4:4])-[#1&v1]),1.1.1.-,1,2,3.068556895072363,MNXR94689_MNXM101404,0,0,both,0.14067341551302287\r\n+RR-02-1364a3f2a297c78c-02-F,([#6&v4:1]-[#6&v4:2](-[#8&v2:3]-[#1&v1:4])(-[#6&v4:5])-[#1&v1:6])>>([#1&+&v0:4].[#6&v4:1]-[#6&v4:2](=[#8&v2:3])-[#6&v4:5].[#6&v4]1(-[#1&v1]):[#7&v3]:[#6&v4]2:[#6&v4](-[#7&v3](-[#1&v1])-[#1&v1]):[#7&v3]:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]:2:[#7&v3]:1-[#6&v4]1(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4](-[#6&v4](-[#8&v2]-[#15&v5](-[#8&v2]-[#15&v5](-[#8&v2]-[#6&v4](-[#6&v4]2(-[#1&v1])-[#8&v2]-[#6&v4](-[#7&v3]3-[#6&v4](-[#1&v1])=[#6&v4](-[#6&v4](=[#7&v3]-[#1&v1])-[#8&v2]-[#1&v1])-[#6&v4](-[#1&v1])(-[#1&v1:6])-[#6&v4](-[#1&v1])=[#6&v4]-3-[#1&v1])(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4]-2(-[#8&v2]-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#8&v2]-1),1.1.1.-,1,2,2.8750612633917005,MNXR94689_MNXM9689,0,0,both,0.14873280218232202\r\n+RR-02-2860703b5bba4808-02-F,([#8&v2:1](-[#8&v2:2]-[#6&v4:3])-[#1&v1:4])>>([#8&v2:1](-[#1&v1:4])-[#1&v1].[#8&v2:2](-[#6&v4:3])-[#1&v1]),NOEC,1,2,0.0,MNXR94690_MNXM2313,0,0,both,1.0\r\n+RR-02-5594c358cc56f547-02-F,([#8&v2:1](-[#6&v4:2])-[#1&v1:3])>>([#1&+&v0:3].[#8&v2](-[#8&v2:1]-[#6&v4:2])-[#1&v1]),NOEC,1,2,0.0,MNXR94690_MNXM9689,0,0,both,1.0\r\n+RR-02-40c5de14c04712c6-02-F,([#6&v4:1]-[#6&v4:2](=[#8&v2:3])-[#1&v1:4])>>([#6&v4:1]-[#6&v4:2](-[#8&v2:3]-[#1&v1])(-[#1&v1])-[#1&v1:4]),1.1.1.202,1,2,2.4517864355242898,MNXR94691_MNXM1526,0,0,both,0.17004370207003422\r\n+RR-02-fcc8935f8e5c652c-02-F,([#6&v4:1]-[#6&v4:2](-[#8&v2:3]-[#1&v1:4])(-[#1&v1:5])-[#1&v1:6])>>([#1&+&v0:4].[#6&v4:1]-[#6&v4:2](=[#8&v2:3])-[#1&v1:6].[#6&v4]1(-[#1&v1]):[#7&v3]:[#6&v4]2:[#6&v4](-[#7&v3](-[#1&v1])-[#1&v1]):[#7&v3]:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]:2:[#7&v3]:1-[#6&v4]1(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4](-[#6&v4](-[#8&v2]-[#15&v5](-[#8&v2]-[#15&v5](-[#8&v2]-[#6&v4](-[#6&v4]2(-[#1&v1])-[#8&v2]-[#6&v4](-[#7&v3]3-[#6&v4](-[#1&v1])=[#6&v4](-[#6&v4](=[#7&v3]-[#1&v1])-[#8&v2]-[#1&v1])-[#6&v4](-[#1&v1])(-[#1&v1:5])-[#6&v4](-[#1&v1])=[#6&v4]-3-[#1&v1])(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4]-2(-[#8&v2]-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#8&v2]-1),1.1.1.202,1,2,2.133538908370217,MNXR94691_MNXM2861,0,0,both,0.19057431907203484\r\n+RR-02-2961e0cd92ffd16f-02-F,([#6&v4:1]-[#6&v4:2](-[#1&v1:3])(-[#7&v3:4](-[#1&v1:5])-[#6&v4:6])-[#6&v4:7])>>([#1&+&v0:5].[#6&v4:1]-[#6&v4:2](=[#7&v3:4]-[#6&v4:6])-[#6&v4:7].[#6&v4]1(-[#7&v3](-[#1&v1])-[#1&v1]):[#7&v3]:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]2:[#7&v3](-[#6&v4]3(-[#1&v1])-[#6&v4](-[#8&v2]-[#15&v5](=[#8&v2])(-[#8&v2]-[#1&v1])-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4](-[#6&v4](-[#8&v2]-[#15&v5](-[#8&v2]-[#15&v5](-[#8&v2]-[#6&v4](-[#6&v4]4(-[#1&v1])-[#8&v2]-[#6&v4](-[#7&v3]5-[#6&v4](-[#1&v1])=[#6&v4](-[#6&v4](=[#7&v3]-[#1&v1])-[#8&v2]-[#1&v1])-[#6&v4](-[#1&v1])(-[#1&v1:3])-[#6&v4](-[#1&v1])=[#6&v4]-5-[#1&v'..b'1])-[#6&v4](-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1].[#8&v2](-[#6&v4](=[#8&v2])-[#6&v4](-[#6&v4:1](=[#8&v2:2])-[#6&v4:5])(-[#1&v1])-[#1&v1])-[#1&v1]),2.8.3.6,1,2,0.6989700043360189,MNXR94940_MNXM25,-1,-1,retro,0.41815468538290146\r\n+RR-02-6d2fe140bdd4bb66-02-F,([#6&v4:1]:[#6&v4:2](-[#8&v2:3]-[#1&v1:4]):[#6&v4:5])>>([#6&v4:1]:[#6&v4:2](-[#1&v1:4]):[#6&v4:5].[#8&v2:3]=[#8&v2]),NOEC,1,2,2.24551266781415,MNXR94965_MNXM2783,0,0,both,0.18280846932054326\r\n+RR-02-0e609023fbda6ee1-02-F,([#6&v4:1]:[#6&v4:2](-[#1&v1:3]):[#6&v4:4])>>([#6&v4:1]:[#6&v4:2](-[#8&v2]-[#1&v1:3]):[#6&v4:4]),NOEC,1,2,2.24551266781415,MNXR94965_MNXM3167,0,0,both,0.18280846932054326\r\n+RR-02-358afa1261aac3de-02-F,([#6&v4:1](-[#6&v4:2])(-[#1&v1:3])(-[#1&v1:4])-[#1&v1:5])>>([#8&v2](-[#6&v4](-[#6&v4]1(-[#1&v1])-[#8&v2]-[#6&v4](-[#7&v3]2:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]3:[#6&v4](-[#7&v3](-[#1&v1])-[#1&v1]):[#7&v3]:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]:2:3)(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4]-1(-[#8&v2]-[#15&v5](=[#8&v2])(-[#8&v2]-[#1&v1])-[#8&v2]-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#15&v5](-[#8&v2]-[#15&v5](-[#8&v2]-[#6&v4](-[#6&v4](-[#6&v4](-[#6&v4](=[#7&v3]-[#6&v4](-[#6&v4](-[#6&v4](-[#8&v2]-[#1&v1])=[#7&v3]-[#6&v4](-[#6&v4](-[#16&v2]-[#1&v1:5])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#8&v2]-[#1&v1])(-[#8&v2]-[#1&v1])-[#1&v1])(-[#6&v4](-[#1&v1])(-[#1&v1])-[#1&v1])-[#6&v4](-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1].[#8&v2](-[#6&v4](=[#8&v2])-[#6&v4](-[#6&v4](-[#6&v4](=[#8&v2])-[#6&v4:1](-[#6&v4:2])(-[#1&v1:3])-[#1&v1:4])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#1&v1]),2.3.1.16;2.3.1.174,1,2,0.6020599913279624,MNXR94967_MNXM21,1,1,retro,0.45484772422706443\r\n+RR-02-1794eeb97a0ab9c0-02-F,([#6&v4:1]-[#6&v4:2](=[#8&v2:3])-[#16&v2:4]-[#6&v4:5])>>([#6&v4:5]-[#16&v2:4]-[#1&v1].[#8&v2](-[#15&v5](=[#8&v2])(-[#8&v2]-[#1&v1])-[#8&v2]-[#6&v4](-[#6&v4]1(-[#1&v1])-[#8&v2]-[#6&v4](-[#7&v3]2:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]3:[#6&v4](-[#7&v3](-[#1&v1])-[#1&v1]):[#7&v3]:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]:2:3)(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4]-1(-[#8&v2]-[#15&v5](=[#8&v2])(-[#8&v2]-[#1&v1])-[#8&v2]-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#15&v5](-[#8&v2]-[#6&v4](-[#6&v4](-[#6&v4](-[#6&v4](=[#7&v3]-[#6&v4](-[#6&v4](-[#6&v4](=[#7&v3]-[#6&v4](-[#6&v4](-[#16&v2]-[#6&v4](-[#6&v4](-[#6&v4:2](-[#6&v4:1])=[#8&v2:3])(-[#1&v1])-[#1&v1])=[#8&v2])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#8&v2]-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#8&v2]-[#1&v1])(-[#8&v2]-[#1&v1])-[#1&v1])(-[#6&v4](-[#1&v1])(-[#1&v1])-[#1&v1])-[#6&v4](-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1]),2.3.1.16;2.3.1.174,1,2,0.0,MNXR94967_MNXM92,1,1,retro,1.0\r\n+RR-02-0c2385ca3117a379-02-F,([#6&v4:1]-[#6&v4:2](=[#8&v2:3])-[#8&v2:4]-[#1&v1:5])>>([#8&v2:4](-[#1&v1])-[#1&v1:5].[#8&v2](-[#6&v4](-[#6&v4]1(-[#1&v1])-[#8&v2]-[#6&v4](-[#7&v3]2:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]3:[#6&v4](-[#7&v3](-[#1&v1])-[#1&v1]):[#7&v3]:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]:2:3)(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4]-1(-[#8&v2]-[#15&v5](=[#8&v2])(-[#8&v2]-[#1&v1])-[#8&v2]-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#15&v5](-[#8&v2]-[#15&v5](-[#8&v2]-[#6&v4](-[#6&v4](-[#6&v4](-[#6&v4](=[#7&v3]-[#6&v4](-[#6&v4](-[#6&v4](-[#8&v2]-[#1&v1])=[#7&v3]-[#6&v4](-[#6&v4](-[#16&v2]-[#6&v4:2](-[#6&v4:1])=[#8&v2:3])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#8&v2]-[#1&v1])(-[#8&v2]-[#1&v1])-[#1&v1])(-[#6&v4](-[#1&v1])(-[#1&v1])-[#1&v1])-[#6&v4](-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1]),3.1.2;3.1.2.20;3.1.2.23,1,2,0.4771212547196624,MNXR94976_MNXM1639,-1,-1,retro,0.5128681484037748\r\n+RR-02-18c81873156024c3-02-F,([#6&v4:1]-[#16&v4:2](=[#8&v2:3])-[#8&v2:4])>>([#6&v4:1]-[#16&v6:2](=[#8&v2:3])(-[#8&v2:4])=[#8&v2]),NOEC,1,2,4.295611076923876,MNXR94979_MNXM498,0,0,both,0.10469674387190456\r\n'
b
diff -r 024dcd6421db -r ea590c609fec test-data/rules_out.csv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rules_out.csv Wed Feb 02 14:29:14 2022 +0000
[
b'@@ -0,0 +1,100 @@\n+Rule ID,Rule,EC number,Reaction order,Diameter,Score,Legacy ID,Reaction direction,Rule relative direction,Rule usage,Score normalized\n+RR-02-fbdda75e23f518b6-02-F,([#6&v4:1](=[#8&v2:2])(-[#6&v4:3](-[#6&v4:4])(-[#1&v1:5])-[#1&v1:6])-[#1&v1:7])>>([#6&v4:1](-[#8&v2:2]-[#1&v1:6])(-[#6&v4:3](-[#6&v4:4])(-[#8&v2]-[#1&v1])-[#1&v1:5])(-[#1&v1:7])-[#1&v1]),NOEC,1,2,4.295611076923876,MNXR94682_MNXM821,0,0,both,0.10469674387190456\n+RR-02-0250d458c4991a7d-02-F,([#6&v4:1](-[#8&v2:2]-[#1&v1:3])(-[#6&v4:4](-[#6&v4:5])(-[#8&v2:6]-[#1&v1:7])-[#1&v1:8])(-[#1&v1:9])-[#1&v1:10])>>([#6&v4:1](=[#8&v2:2])(-[#6&v4:4](-[#6&v4:5])(-[#1&v1:8])-[#1&v1:3])-[#1&v1:9].[#8&v2:6](-[#1&v1:7])-[#1&v1:10]),NOEC,1,2,4.295611076923876,MNXR94682_MNXM90191,0,0,both,0.10469674387190456\n+RR-02-c3681aa8011dc014-02-F,([#6&v4:1]-[#6&v4:2](=[#8&v2:3])-[#6&v4:4])>>([#6&v4:1]-[#6&v4:2](-[#8&v2:3]-[#1&v1])(-[#6&v4:4])-[#1&v1]),1.1.1.-,1,2,3.068556895072363,MNXR94689_MNXM101404,0,0,both,0.14067341551302287\n+RR-02-1364a3f2a297c78c-02-F,([#6&v4:1]-[#6&v4:2](-[#8&v2:3]-[#1&v1:4])(-[#6&v4:5])-[#1&v1:6])>>([#1&+&v0:4].[#6&v4:1]-[#6&v4:2](=[#8&v2:3])-[#6&v4:5].[#6&v4]1(-[#1&v1]):[#7&v3]:[#6&v4]2:[#6&v4](-[#7&v3](-[#1&v1])-[#1&v1]):[#7&v3]:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]:2:[#7&v3]:1-[#6&v4]1(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4](-[#6&v4](-[#8&v2]-[#15&v5](-[#8&v2]-[#15&v5](-[#8&v2]-[#6&v4](-[#6&v4]2(-[#1&v1])-[#8&v2]-[#6&v4](-[#7&v3]3-[#6&v4](-[#1&v1])=[#6&v4](-[#6&v4](=[#7&v3]-[#1&v1])-[#8&v2]-[#1&v1])-[#6&v4](-[#1&v1])(-[#1&v1:6])-[#6&v4](-[#1&v1])=[#6&v4]-3-[#1&v1])(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4]-2(-[#8&v2]-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#8&v2]-1),1.1.1.-,1,2,2.8750612633917005,MNXR94689_MNXM9689,0,0,both,0.14873280218232202\n+RR-02-2860703b5bba4808-02-F,([#8&v2:1](-[#8&v2:2]-[#6&v4:3])-[#1&v1:4])>>([#8&v2:1](-[#1&v1:4])-[#1&v1].[#8&v2:2](-[#6&v4:3])-[#1&v1]),NOEC,1,2,0.0,MNXR94690_MNXM2313,0,0,both,1.0\n+RR-02-5594c358cc56f547-02-F,([#8&v2:1](-[#6&v4:2])-[#1&v1:3])>>([#1&+&v0:3].[#8&v2](-[#8&v2:1]-[#6&v4:2])-[#1&v1]),NOEC,1,2,0.0,MNXR94690_MNXM9689,0,0,both,1.0\n+RR-02-40c5de14c04712c6-02-F,([#6&v4:1]-[#6&v4:2](=[#8&v2:3])-[#1&v1:4])>>([#6&v4:1]-[#6&v4:2](-[#8&v2:3]-[#1&v1])(-[#1&v1])-[#1&v1:4]),1.1.1.202,1,2,2.4517864355242898,MNXR94691_MNXM1526,0,0,both,0.17004370207003422\n+RR-02-fcc8935f8e5c652c-02-F,([#6&v4:1]-[#6&v4:2](-[#8&v2:3]-[#1&v1:4])(-[#1&v1:5])-[#1&v1:6])>>([#1&+&v0:4].[#6&v4:1]-[#6&v4:2](=[#8&v2:3])-[#1&v1:6].[#6&v4]1(-[#1&v1]):[#7&v3]:[#6&v4]2:[#6&v4](-[#7&v3](-[#1&v1])-[#1&v1]):[#7&v3]:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]:2:[#7&v3]:1-[#6&v4]1(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4](-[#6&v4](-[#8&v2]-[#15&v5](-[#8&v2]-[#15&v5](-[#8&v2]-[#6&v4](-[#6&v4]2(-[#1&v1])-[#8&v2]-[#6&v4](-[#7&v3]3-[#6&v4](-[#1&v1])=[#6&v4](-[#6&v4](=[#7&v3]-[#1&v1])-[#8&v2]-[#1&v1])-[#6&v4](-[#1&v1])(-[#1&v1:5])-[#6&v4](-[#1&v1])=[#6&v4]-3-[#1&v1])(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4]-2(-[#8&v2]-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#8&v2]-1),1.1.1.202,1,2,2.133538908370217,MNXR94691_MNXM2861,0,0,both,0.19057431907203484\n+RR-02-2961e0cd92ffd16f-02-F,([#6&v4:1]-[#6&v4:2](-[#1&v1:3])(-[#7&v3:4](-[#1&v1:5])-[#6&v4:6])-[#6&v4:7])>>([#1&+&v0:5].[#6&v4:1]-[#6&v4:2](=[#7&v3:4]-[#6&v4:6])-[#6&v4:7].[#6&v4]1(-[#7&v3](-[#1&v1])-[#1&v1]):[#7&v3]:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]2:[#7&v3](-[#6&v4]3(-[#1&v1])-[#6&v4](-[#8&v2]-[#15&v5](=[#8&v2])(-[#8&v2]-[#1&v1])-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4](-[#6&v4](-[#8&v2]-[#15&v5](-[#8&v2]-[#15&v5](-[#8&v2]-[#6&v4](-[#6&v4]4(-[#1&v1])-[#8&v2]-[#6&v4](-[#7&v3]5-[#6&v4](-[#1&v1])=[#6&v4](-[#6&v4](=[#7&v3]-[#1&v1])-[#8&v2]-[#1&v1])-[#6&v4](-[#1&v1])(-[#1&v1:3])-[#6&v4](-[#1&v1])=[#6&v4]-5-[#1&v1])(-[#1&'..b')-[#1&v1])-[#6&v4](-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1].[#8&v2](-[#6&v4](=[#8&v2])-[#6&v4](-[#6&v4:1](=[#8&v2:2])-[#6&v4:5])(-[#1&v1])-[#1&v1])-[#1&v1]),2.8.3.6,1,2,0.6989700043360189,MNXR94940_MNXM25,-1,-1,retro,0.41815468538290146\n+RR-02-6d2fe140bdd4bb66-02-F,([#6&v4:1]:[#6&v4:2](-[#8&v2:3]-[#1&v1:4]):[#6&v4:5])>>([#6&v4:1]:[#6&v4:2](-[#1&v1:4]):[#6&v4:5].[#8&v2:3]=[#8&v2]),NOEC,1,2,2.24551266781415,MNXR94965_MNXM2783,0,0,both,0.18280846932054326\n+RR-02-0e609023fbda6ee1-02-F,([#6&v4:1]:[#6&v4:2](-[#1&v1:3]):[#6&v4:4])>>([#6&v4:1]:[#6&v4:2](-[#8&v2]-[#1&v1:3]):[#6&v4:4]),NOEC,1,2,2.24551266781415,MNXR94965_MNXM3167,0,0,both,0.18280846932054326\n+RR-02-358afa1261aac3de-02-F,([#6&v4:1](-[#6&v4:2])(-[#1&v1:3])(-[#1&v1:4])-[#1&v1:5])>>([#8&v2](-[#6&v4](-[#6&v4]1(-[#1&v1])-[#8&v2]-[#6&v4](-[#7&v3]2:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]3:[#6&v4](-[#7&v3](-[#1&v1])-[#1&v1]):[#7&v3]:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]:2:3)(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4]-1(-[#8&v2]-[#15&v5](=[#8&v2])(-[#8&v2]-[#1&v1])-[#8&v2]-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#15&v5](-[#8&v2]-[#15&v5](-[#8&v2]-[#6&v4](-[#6&v4](-[#6&v4](-[#6&v4](=[#7&v3]-[#6&v4](-[#6&v4](-[#6&v4](-[#8&v2]-[#1&v1])=[#7&v3]-[#6&v4](-[#6&v4](-[#16&v2]-[#1&v1:5])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#8&v2]-[#1&v1])(-[#8&v2]-[#1&v1])-[#1&v1])(-[#6&v4](-[#1&v1])(-[#1&v1])-[#1&v1])-[#6&v4](-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1].[#8&v2](-[#6&v4](=[#8&v2])-[#6&v4](-[#6&v4](-[#6&v4](=[#8&v2])-[#6&v4:1](-[#6&v4:2])(-[#1&v1:3])-[#1&v1:4])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#1&v1]),2.3.1.16;2.3.1.174,1,2,0.6020599913279624,MNXR94967_MNXM21,1,1,retro,0.45484772422706443\n+RR-02-1794eeb97a0ab9c0-02-F,([#6&v4:1]-[#6&v4:2](=[#8&v2:3])-[#16&v2:4]-[#6&v4:5])>>([#6&v4:5]-[#16&v2:4]-[#1&v1].[#8&v2](-[#15&v5](=[#8&v2])(-[#8&v2]-[#1&v1])-[#8&v2]-[#6&v4](-[#6&v4]1(-[#1&v1])-[#8&v2]-[#6&v4](-[#7&v3]2:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]3:[#6&v4](-[#7&v3](-[#1&v1])-[#1&v1]):[#7&v3]:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]:2:3)(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4]-1(-[#8&v2]-[#15&v5](=[#8&v2])(-[#8&v2]-[#1&v1])-[#8&v2]-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#15&v5](-[#8&v2]-[#6&v4](-[#6&v4](-[#6&v4](-[#6&v4](=[#7&v3]-[#6&v4](-[#6&v4](-[#6&v4](=[#7&v3]-[#6&v4](-[#6&v4](-[#16&v2]-[#6&v4](-[#6&v4](-[#6&v4:2](-[#6&v4:1])=[#8&v2:3])(-[#1&v1])-[#1&v1])=[#8&v2])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#8&v2]-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#8&v2]-[#1&v1])(-[#8&v2]-[#1&v1])-[#1&v1])(-[#6&v4](-[#1&v1])(-[#1&v1])-[#1&v1])-[#6&v4](-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1]),2.3.1.16;2.3.1.174,1,2,0.0,MNXR94967_MNXM92,1,1,retro,1.0\n+RR-02-0c2385ca3117a379-02-F,([#6&v4:1]-[#6&v4:2](=[#8&v2:3])-[#8&v2:4]-[#1&v1:5])>>([#8&v2:4](-[#1&v1])-[#1&v1:5].[#8&v2](-[#6&v4](-[#6&v4]1(-[#1&v1])-[#8&v2]-[#6&v4](-[#7&v3]2:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]3:[#6&v4](-[#7&v3](-[#1&v1])-[#1&v1]):[#7&v3]:[#6&v4](-[#1&v1]):[#7&v3]:[#6&v4]:2:3)(-[#1&v1])-[#6&v4](-[#8&v2]-[#1&v1])(-[#1&v1])-[#6&v4]-1(-[#8&v2]-[#15&v5](=[#8&v2])(-[#8&v2]-[#1&v1])-[#8&v2]-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#15&v5](-[#8&v2]-[#15&v5](-[#8&v2]-[#6&v4](-[#6&v4](-[#6&v4](-[#6&v4](=[#7&v3]-[#6&v4](-[#6&v4](-[#6&v4](-[#8&v2]-[#1&v1])=[#7&v3]-[#6&v4](-[#6&v4](-[#16&v2]-[#6&v4:2](-[#6&v4:1])=[#8&v2:3])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])-[#8&v2]-[#1&v1])(-[#8&v2]-[#1&v1])-[#1&v1])(-[#6&v4](-[#1&v1])(-[#1&v1])-[#1&v1])-[#6&v4](-[#1&v1])(-[#1&v1])-[#1&v1])(-[#1&v1])-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1])(=[#8&v2])-[#8&v2]-[#1&v1]),3.1.2;3.1.2.20;3.1.2.23,1,2,0.4771212547196624,MNXR94976_MNXM1639,-1,-1,retro,0.5128681484037748\n+RR-02-18c81873156024c3-02-F,([#6&v4:1]-[#16&v4:2](=[#8&v2:3])-[#8&v2:4])>>([#6&v4:1]-[#16&v6:2](=[#8&v2:3])(-[#8&v2:4])=[#8&v2]),NOEC,1,2,4.295611076923876,MNXR94979_MNXM498,0,0,both,0.10469674387190456\n'