diff rrparser.xml @ 1:ea590c609fec draft

"planemo upload commit 2f1af427fa4c4f2aad53ab94c4cdb51456c66019-dirty"
author tduigou
date Wed, 02 Feb 2022 14:29:14 +0000
parents
children 092545561208
line wrap: on
line diff
--- /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