changeset 8:91523c7ab46a draft

planemo upload commit c59e296a2bf974bbea9c5a30b940e7ca3b68ff3e
author tduigou
date Mon, 17 Apr 2023 07:54:11 +0000
parents c31a74a5595c
children 23d2987132ab
files retropath2_wrapper.xml test-data/rules_d12_7325.csv.gz
diffstat 2 files changed, 47 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/retropath2_wrapper.xml	Tue Apr 11 12:01:39 2023 +0000
+++ b/retropath2_wrapper.xml	Mon Apr 17 07:54:11 2023 +0000
@@ -1,8 +1,8 @@
-<tool id="retropath2_wrapper" name="RetroPath2.0" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" license="MIT">
+<tool id="retropath2_wrapper" name="RetroPath2.0" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.09">
     <description>Build a reaction network from a set of source compounds to a set of sink compounds</description>
     <macros>
         <token name="@VERSION_SUFFIX@">0</token>
-        <token name="@TOOL_VERSION@">2.6.0</token>
+        <token name="@TOOL_VERSION@">3.0.0</token>
     </macros>
     <requirements>
         <requirement type="package" version="@TOOL_VERSION@">retropath2_wrapper</requirement>
@@ -11,11 +11,15 @@
         <exit_code range="1" level="fatal" description="Cannot find source-in-sink file" />
         <exit_code range="2" level="fatal" description="Running the RetroPath2.0 Knime program produced an OSError" />
         <exit_code range="3" level="fatal" description="The InChI string is malformed" />
-        <exit_code range="10" level="warning" description="Source has been found in the sink" />
-        <exit_code range="11" level="warning" description="RetroPath2.0 has found no solution" />
+        <exit_code range="-1" level="warning" description="Source has been found in the sink" />
+        <exit_code range="-2" level="warning" description="RetroPath2.0 has found no solution" />
+        <exit_code range="-3" level="warning" description="Time limit reached" />
     </stdio>
     <command detect_errors="exit_code"><![CDATA[
         python -m retropath2_wrapper
+            '$sinkfile'
+            '$rulesfile'
+            out
             --source_inchi '$source_inchi'
             --source_name '$source_name'
             --rp2_version '$adv.version'
@@ -25,17 +29,12 @@
             --dmax '$adv.dmax'
             --mwmax_source '$adv.mwmax_source'
             --kinstall "\${TMPDIR:-.}"
-            --kver '4.7.0'
-            --log 'debug'
-            --msc_timeout '$adv.timeout'
-            '$sinkfile'
-            '$rulesfile'
-            "./out" &&
-            if compgen -G './out/*_scope.csv' > /dev/null; then
-                cp ./out/*_scope.csv '$Reaction_Network';
-            else
-                cp ./out/results.csv '$Reaction_Network';
-            fi
+            --timeout '$adv.timeout' &&
+        if compgen -G 'out/*_scope.csv' > /dev/null; then
+            cp out/*_scope.csv '$Reaction_Network';
+        else
+            cp out/results.csv '$Reaction_Network';
+        fi
     ]]></command>
     <inputs>
         <param name="rulesfile" type="data" format="csv,tar" label="Rules File" help="File containing reaction rules which reflect the enzymatic potential of the chassis organism."/>
@@ -57,7 +56,7 @@
             <param name="dmin" type="integer" value="0" min="0" max="1000" label="Minimum rule diameter" help="Minimum rule diameter of the sphere including the atoms around the reacting center. The higher is the diameter, the more specific are the rules." />
             <param name="dmax" type="integer" value="1000" min="0" max="1000" label="Maximum rule diameter" help="Maximum rule diameter of the sphere including the atoms around the reacting center. The higher is the diameter, the more specific are the rules."/>
             <param name="mwmax_source" type="integer" value="1000" min="0" max="2000" label="Molecular weight of source (Da)" help="The molecular weight cutoff (in Da), above which initial source (ie target) and intermediate compounds will be filtered out." />
-            <param name="timeout" type="integer" value="10" min="5" max="120" label="Timeout (min)" help="Maximal time of RetroPath2.0 execution (20 minutes by default)." />
+            <param name="timeout" type="integer" value="60" min="30" max="600" label="Timeout (min)" help="Maximal time of RetroPath2.0 execution (60 minutes by default)." />
         </section>
     </inputs>
     <outputs>
@@ -68,18 +67,14 @@
         </data>
     </outputs>
     <tests>
-        <test expect_failure="true" expect_exit_code="11">
-            <param name="rulesfile" value="rules_d12_7325.csv.gz" />
-            <param name="sinkfile" value="sink.csv" />
-            <param name="source_inchi" value="InChI=1S/C40H56/c1-33(2)19-13-23-37(7)27-17-31-39(9)29-15-25-35(5)21-11-12-22-36(6)26-16-30-40(10)32-18-28-38(8)24-14-20-34(3)4/h11-12,15-22,25-32H,13-14,23-24H2,1-10H3/b12-11+,25-15+,26-16+,31-17+,32-18+,35-21+,36-22+,37-27+,38-28+,39-29+,40-30+" />
-        </test>
         <test>
+        <!-- test 1: check if identical outputs are produced with default parameters  -->
             <param name="rulesfile" value="rules.csv" />
             <param name="sinkfile" value="sink.csv" />
             <param name="source_inchi" value="InChI=1S/C40H56/c1-33(2)19-13-23-37(7)27-17-31-39(9)29-15-25-35(5)21-11-12-22-36(6)26-16-30-40(10)32-18-28-38(8)24-14-20-34(3)4/h11-12,15-22,25-32H,13-14,23-24H2,1-10H3/b12-11+,25-15+,26-16+,31-17+,32-18+,35-21+,36-22+,37-27+,38-28+,39-29+,40-30+" />
-            <output name="Reaction_Network" file="results.csv" ftype="csv" compare="diff"/>
+            <output name="Reaction_Network" file="results_retropath2.csv" ftype="csv" compare="diff"/>
         </test>
-    </tests>
+    </tests> 
     <help><![CDATA[
 Retropath2.0 wrapper
 ====================
@@ -105,18 +100,42 @@
 * **Minimum rule diameter**\ : (integer, default: 0) Minimum rule diameter of the sphere including the atoms around the reacting center. The higher is the diameter, the more specific are the rules.
 * **Maximum rule diameter**\ : (integer, default: 1000) Maximum rule diameter of the sphere including the atoms around the reacting center. The higher is the diameter, the more specific are the rules.
 * **Molecular weight of source (Da)**\ : (integer, default: 1000) The molecular weight cutoff (in Da), above which initial source (ie target) and intermediate compounds will be filtered out.
-* **Timeout (min)**\ : (integer, default: 20) Maximal time of RetroPath2.0 execution (20 minutes by default)
+* **Timeout (min)**\ : (integer, default: 60) Maximal time of RetroPath2.0 execution (60 minutes by default)
 * **Workflow version**\ : Retropath2.0 Workflow versions, formatted as r{year}{month}{day} (the latest version r20220104 is used by default)
 
 Output
 ------
 
 * **Reaction Network**\ : CSV file containing retrosynthesis network which provides reactions in the reaction SMILES format and chemicals in both SMILES and InChI formats along with other information like the score for each reaction.
+
+Project Links
+---------------------
+
+* `GitHub <https://github.com/brsynth/RetroPath2-wrapper>`_
+
+Version
+----------
+
+2.3.1
+
+Authors
+-------
+
+* **Joan Hérisson**
+* Melchior du Lac
+
+License
+-------
+
+This project is licensed under the `MIT <https://github.com/brsynth/RetroPath2-wrapper/blob/master/LICENSE>`_ License.
+
+Acknowledgments
+---------------
+
+* Thomas Duigou
+
     ]]></help>
-    <creator>
-        <organization name="BioRetroSynth" url="https://github.com/brsynth"/>
-    </creator>
     <citations>
-        <citation type="doi">10.1016/j.ymben.2017.12.002</citation>
+        <citation type="doi">10.1016/j.ymben.2017.12.002 </citation>
     </citations>
 </tool>
Binary file test-data/rules_d12_7325.csv.gz has changed