diff macros.xml @ 0:0fdd5f2a7a53 draft

"planemo upload commit 6158473dbced09024b0a805a7df2c93d47705d87"
author guerler
date Tue, 23 Mar 2021 13:56:20 +0000
parents
children b2d4238b09d1
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Tue Mar 23 13:56:20 2021 +0000
@@ -0,0 +1,89 @@
+<macros>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@TOOL_VERSION@">springsuite</requirement>
+            <yield />
+        </requirements>
+    </xml>
+    <token name="@TOOL_VERSION@">0.1</token>
+    <token name="@VERSION_SUFFIX@">0</token>
+
+    <xml name="ffindex_single_inputs">
+        <param name="ffdata" type="data" format="ffdata" label="PDB Database" help="Database Data file." />
+        <param name="ffindex" type="data" format="ffindex" label="PDB Database Index" help="Database Index file." />
+    </xml>
+
+    <xml name="ffindex_single_inputs_hhr">
+        <param name="ffdata" type="data" format="ffdata" label="HHR Database" help="Database Data file." />
+        <param name="ffindex" type="data" format="ffindex" label="HHR Database Index" help="Database Index file." />
+    </xml>
+
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.1021/ci300579r</citation>
+        </citations>
+    </xml>
+    <xml name="logfile">
+        <param name="logfile" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Output log file" />
+    </xml>
+
+    <xml name="pdb_source">
+        <conditional name="pdb_source">
+            <param name="pdb_source_selector" type="select" label="Custom or built-in PDB" help="Built-ins have been indexed using ffindex">
+                <option value="indexed" selected="true">Use a built-in index</option>
+                <option value="history">Use a PDB index from history</option>
+            </param>
+            <when value="indexed">
+                <param name="pdb" type="select" label="Select PDB database" help="">
+                    <options from_data_table="ffindex_indices">
+                        <filter type="sort_by" column="0" />
+                        <filter type="static_value" column="3" value="pdb" />
+                        <validator type="no_options" message="No indices are available" />
+                    </options>
+                </param>
+            </when>
+            <when value="history">
+                <expand macro="ffindex_single_inputs" />
+            </when>
+        </conditional>
+    </xml>
+    <xml name="hhr_source">
+        <conditional name="hhr_source">
+            <param name="hhr_source_selector" type="select" label="Custom or built-in HHR index" help="Built-ins have been indexed using ffindex">
+                <option value="indexed" selected="true">Use a built-in index</option>
+                <option value="history">Use a HHR index from history</option>
+            </param>
+            <when value="indexed">
+                <param name="hhr" type="select" label="Select HHR database" help="">
+                    <options from_data_table="ffindex_indices">
+                        <filter type="sort_by" column="0" />
+                        <filter type="static_value" column="3" value="hhr" />
+                        <validator type="no_options" message="No indices are available" />
+                    </options>
+                </param>
+            </when>
+            <when value="history">
+                <expand macro="ffindex_single_inputs_hhr" />
+            </when>
+        </conditional>
+    </xml>
+
+    <token name="@pdb_source@">
+        #if $pdb_source.pdb_source_selector == 'indexed':
+            -d '${pdb_source.pdb.fields.path}.ffdata'
+            -i '${pdb_source.pdb.fields.path}.ffindex'
+        #else
+            -d '$pdb_source.ffdata'
+            -i '$pdb_source.ffindex'
+        #end if
+    </token>
+    <token name="@hhr_source@">
+        #if $hhr_source.hhr_source_selector == 'indexed':
+            -dh '${hhr_source.hhr.fields.path}.ffdata'
+            -ih '${hhr_source.hhr.fields.path}.ffindex'
+        #else
+            -dh '$hhr_source.ffdata'
+            -ih '$hhr_source.ffindex'
+        #end if
+    </token>
+</macros>