diff macros.xml @ 0:ad4b7db26523 draft

"planemo upload commit b68cb41b1884703c4f1574b65a6408d7d0cca321"
author guerler
date Tue, 23 Mar 2021 23:06:45 +0000
parents
children 1d9fcf2157e0
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Tue Mar 23 23:06:45 2021 +0000
@@ -0,0 +1,79 @@
+<macros>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="0.1">ffindex-dbkit</requirement>
+            <yield />
+        </requirements>
+    </xml>
+    <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="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="db_source">
+        <conditional name="db_source">
+            <param name="db_source_selector" type="select" label="Custom or built-in ffindex" help="Built-ins have been indexed using ffindex">
+                <option value="indexed" selected="true">Use a built-in index</option>
+                <option value="history">Use a ffindex from history</option>
+            </param>
+            <when value="indexed">
+                <param name="ffindex" type="select" label="Select ffindex" help="">
+                    <options from_data_table="ffindex_indices">
+                        <filter type="sort_by" column="0" />
+                        <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="db_source2">
+        <conditional name="db_source2">
+            <param name="db_source_selector" type="select" label="Custom or built-in ffindex" help="Built-ins have been indexed using ffindex">
+                <option value="indexed" selected="true">Use a built-in index</option>
+                <option value="history">Use a ffindex from history</option>
+            </param>
+            <when value="indexed">
+                <param name="ffindex" type="select" label="Select ffindex" help="">
+                    <options from_data_table="ffindex_indices">
+                        <filter type="sort_by" column="0" />
+                        <validator type="no_options" message="No indices are available" />
+                    </options>
+                </param>
+            </when>
+            <when value="history">
+                <expand macro="ffindex_single_inputs" />
+            </when>
+        </conditional>
+    </xml>
+
+    <token name="@db_source@">
+        #if $db_source.db_source_selector == 'indexed':
+            -d '${db_source.ffindex.fields.path}.ffdata'
+            -i '${db_source.ffindex.fields.path}.ffindex'
+        #else
+            -d '$db_source.ffdata'
+            -i '$db_source.ffindex'
+        #end if
+    </token>
+    <token name="@db_source2@">
+        #if $db_source.db_source_selector == 'indexed':
+            -sd '${db_source.ffindex.fields.path}.ffdata'
+            -si '${db_source.ffindex.fields.path}.ffindex'
+        #else
+            -sd '$db_source.ffdata'
+            -si '$db_source.ffindex'
+        #end if
+    </token>
+</macros>