diff rpviz.xml @ 0:ea2ca40a24c5 draft

"planemo upload commit 2f1af427fa4c4f2aad53ab94c4cdb51456c66019-dirty"
author tduigou
date Mon, 13 Dec 2021 17:40:42 +0000
parents
children 8057fdd27860
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpviz.xml	Mon Dec 13 17:40:42 2021 +0000
@@ -0,0 +1,101 @@
+<tool id="rpviz" name="Visualize pathways" version="5.10.0">
+    <description>Visualize pathways from the RetroPath Suite</description>
+    <requirements>
+        <requirement type="package" version="5.10.0">rptools</requirement>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+        #set input_folder="input_folder"
+        mkdir -p '$input_folder';
+        #if str($input_type_conditional.input_type) == "sbml":
+            #for $input in $input_type_conditional.input_sbml.keys():
+                ln -sf $input_type_conditional.input_sbml[$input] '$input_folder/${input}.xml';
+            #end for
+            python -m rptools.rpviz '$input_folder'
+        #elif str($input_type_conditional.input_type) == "tar":
+            python -m rptools.rpviz '${input_type_conditional.input_tar}'
+        #elif str($input_type_conditional.input_type) == "single_sbml":
+            ln -sf '$input_type_conditional.input_single_sbml' '$input_folder/${input_type_conditional.input_single_sbml.name}';
+            python -m rptools.rpviz '$input_folder'
+        #end if
+        'out'
+        #if $adv.cofactor_file
+            --cofactor '$adv.cofactor_file'
+        #end if
+        --autonomous_html '$html_file';
+        rm -fr '$input_folder';
+    ]]></command>
+    <inputs>
+        <conditional name="input_type_conditional">
+            <param name="input_type" type="select" label="Source SBML format">
+                <option value="tar" selected="True">TAR</option>
+                <option value="sbml">Collection</option>
+                <option value="single_sbml">single SBML</option>
+            </param>
+            <when value="tar">
+                <param name="input_tar" type="data" format="tar" label="Source SBML" />
+            </when>
+            <when value="sbml">
+                <param name="input_sbml" type="data_collection" format="xml" collection_type="list" label="Source SBML" />
+            </when>
+            <when value="single_sbml">
+                <param name="input_single_sbml" type="data" format="xml" label="Source SBML" />
+            </when>
+        </conditional>
+        <section name="adv" title="Advanced Options" expanded="false">
+            <param name="cofactor_file" type="data" format="tsv" optional="true" label="cofactor file" />
+        </section>
+    </inputs>
+    <outputs>
+        <data name="html_file" format="html" label="Rpviz: Pathways Visualization"/>
+    </outputs>
+    <tests>
+        <test>
+        <!-- test 1: check if identical html output is produced (single sbml input) --> 
+            <conditional name="input_type_conditional">
+                <param name="input_type" value="single_sbml"/>
+                <param name="input_single_sbml" value="lycopene_CrtEBI_from_selenzy.xml" />
+            </conditional>
+            <output name="html_file" file="rpviz_single_output.html" compare="sim_size"/>
+        </test>
+        <test>
+        <!-- test 2: check if identical html output is produced (tar input) --> 
+            <conditional name="input_type_conditional">
+                <param name="input_type" value="tar"/>
+                <param name="input_tar" value="as_tar_inputs.tgz" />
+            </conditional>
+            <output name="html_file" file="rpviz_tar_output.html" compare="sim_size"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+RPVIZ
+================
+Visualize pathways from the RetroPath Suite
+
+Input
+-----
+
+* **input_rpSBMLs**\ : (string) Input file containing rpSBML files in a tar archive or a folder.
+                             
+Output
+------
+
+* **output_folder**\ : (string) Output folder to be used. If it does not exist, an attempt will be made to create it.It the creation of the folder fails, IOError will be raised.
+* **autonomous_html**\ : (string) Optional file path, if provided will output an autonomous HTML containing all dependancies.
+
+Project Links
+------------------
+
+* `GitHub <https://github.com/brsynth/rptools/tree/master/rptools/rpviz>`_
+
+Version
+----------
+
+5.10.0
+
+License
+-------
+
+* `MIT <https://github.com/brsynth/rptools/blob/master/LICENSE>`_
+
+    ]]></help>
+</tool>
\ No newline at end of file