diff macros.xml @ 8:347a1f935f4c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hmmer3 commit 061757dd7b3bfe66b7738fd54bd6c5e135d9afe8
author iuc
date Mon, 06 Nov 2023 20:23:10 +0000
parents be072920a53e
children 4a54e4c9188b
line wrap: on
line diff
--- a/macros.xml	Wed Jul 21 14:10:08 2021 +0000
+++ b/macros.xml	Mon Nov 06 20:23:10 2023 +0000
@@ -6,6 +6,11 @@
       <yield/>
     </requirements>
   </xml>
+  <xml name="bio_tools">
+      <xrefs>
+          <xref type="bio.tools">hmmer3</xref>
+      </xrefs>
+  </xml>
   <token name="@TOOL_VERSION@">3.3.2</token>
   <xml name="stdio">
     <stdio>
@@ -17,69 +22,135 @@
       <regex match="Exception:"/>
     </stdio>
   </xml>
+
+  <!-- command line for thresholds_* -->
   <token name="@THRESHOLDS@">
--E $E
---domE $domE
-
-#if str($T):
-    -T $T
-#end if
-
-#if str($domT):
-    --domT $domT
+#if $repopt.repopt_sel == "evalue"
+  -E $repopt.E
+  #if str($repopt.incE) != ""
+    --incE $repopt.incE
+  #end if
+#elif $repopt.repopt_sel == "score"
+  -T $repopt.T
+  #if str($repopt.incT) != ""
+    --incT $repopt.incT
+  #end if
+#else
+  $repopt.repopt_sel
 #end if
-
-#if str($incE):
-    --incE $incE
-#end if
-
-#if str($incdomE):
-    --incdomE $incdomE
-#end if
-
-#if str($incT):
-    --incT $incT
-#end if
-
-#if str($incdomT):
-    --incdomT $incdomT
+  </token>
+  <!-- additional command line thresholds*dom* -->
+  <token name="@THRESHOLDS_DOM@">
+#if $repopt.repopt_sel == "evalue"
+  --domE $repopt.domE
+  #if str($repopt.incdomE) != ""
+    --incdomE $repopt.incdomE
+  #end if
+#elif $repopt.repopt_sel == "score"
+  --domT $repopt.domT
+  #if str($repopt.incdomT) != ""
+    --incdomT $repopt.incdomT
+  #end if
 #end if
   </token>
+
   <xml name="thresholds_xml">
-    <!-- Options controlling reporting thresholds -->
-    <param argument="-E" type="float" min="0" value="10.0" label="report sequences &lt;= this E-Value threshold in output" />
-    <param argument="--domE" type="float" min="0" value="10.0" label="report domains &lt;= this E-Value threshold in output" />
-    <param argument="-T" type="float" optional="true" label="report sequences &gt;= this score threshold in output" />
-    <param argument="--domT" type="float" optional="true" label="report domains &gt;= this score threshold in output" />
     <!-- Options controlling inclusion (significance) thresholds -->
-    <param argument="--incE" type="float" optional="true" label="consider sequences &lt;= this E-Value threshold as significant" />
+    <conditional name="repopt">
+      <param name="repopt_sel" type="select" label="Threshold option">
+        <option value="evalue" selected="true">E-value (reporting threshold)</option>
+        <option value="score">Score (reporting threshold)</option>
+        <yield name="additional_options"/>
+      </param>
+      <when value="evalue">
+        <param argument="-E" type="float" min="0" value="10" label="E-value threshold" help="Report sequences &lt;= this E-Value threshold in output. Default: 10.0" />
+        <param argument="--incE" type="float" optional="true" label="consider sequences &lt;= this E-Value threshold as significant" />
+        <yield name="edom_params"/>
+      </when>
+      <when value="score">
+        <param argument="-T" type="float" value="" label="Score Threshold" help="Report sequences &gt;= this score threshold in output. This option is incompatible with -E, --cut_ga,--cut_nc" />
+        <param argument="--incT" type="float" optional="true" label="consider sequences &gt;= this score threshold as significant" />
+        <yield name="tdom_params"/>
+      </when>
+      <yield name="additional_whens"/>
+    </conditional>
+  </xml>
+
+  <xml name="thresholds_dom_xml">
+    <expand macro="thresholds_xml">
+      <token name="edom_params">
+        <expand macro="dome_thresholds"/>
+      </token>
+      <token name="tdom_params">
+        <expand macro="domt_thresholds"/>
+      </token>
+    </expand>
+  </xml>
+
+  <xml name="thresholds_cut_xml">
+    <expand macro="thresholds_xml">
+      <token name="additional_options">
+        <expand macro="model_specific_options"/>
+      </token>
+      <token name="additional_whens">
+        <expand macro="model_specific_whens"/>
+      </token>
+    </expand>
+  </xml>
+  
+  <xml name="thresholds_cut_dom_xml">
+    <expand macro="thresholds_xml">
+      <token name="edom_params">
+        <expand macro="dome_thresholds"/>
+      </token>
+      <token name="tdom_params">
+        <expand macro="domt_thresholds"/>
+      </token>
+      <token name="additional_options">
+        <expand macro="model_specific_options"/>
+      </token>
+      <token name="additional_whens">
+        <expand macro="model_specific_whens"/>
+      </token>
+    </expand>
+  </xml>
+
+  <xml name="model_specific_options">
+    <option value="--cut_ga">Use profile's GA gathering cutoffs (model specific threshold)</option>
+    <option value="--cut_nc">Use profile's NC gathering cutoffs (model specific threshold)</option>
+    <option value="--cut_tc">Use profile's TC gathering cutoffs (model specific threshold)</option>
+  </xml>
+
+  <xml name="model_specific_whens">
+    <when value="--cut_ga"/>
+    <when value="--cut_nc"/>
+    <when value="--cut_tc"/>
+  </xml>
+
+  <xml name="dome_thresholds">
+    <param argument="--domE" type="float" min="0" value="10" label="Domains E-value threshold" help="Report domains &lt;= this E-Value threshold in output. Default: 10.0. This option is incompatible with --domT, --cut_ga" />
     <param argument="--incdomE" type="float" optional="true" label="consider domains &lt;= this E-Value threshold as significant" />
-    <param argument="--incT" type="float" optional="true" label="consider sequences &gt;= this score threshold as significant" />
+  </xml>
+
+  <xml name="domt_thresholds">
+    <param argument="--domT" type="float" value="" label="Domains Score Threshold" help="Report domains &gt;= this score threshold in output. This option is incompatible with --domE, --cut_ga" />
     <param argument="--incdomT" type="float" optional="true" label="consider domains &gt;= this score threshold as significant" />
   </xml>
-  <token name="@THRESHOLDS_NODOM@">
--E $E
 
-#if str($T):
-    -T $T
-#end if
-
-#if str($incE):
-    --incE $incE
-#end if
-
-#if str($incT):
-    --incT $incT
-#end if
-  </token>
   <xml name="thresholds_nodom">
     <!-- Options controlling reporting thresholds -->
-    <param argument="-E" type="float" min="0" value="10.0" label="report sequences &lt;= this E-Value threshold in output" />
-    <param argument="-T" type="float" optional="true" label="report sequences &gt;= this score threshold in output" />
+    <param argument="-E" type="float" min="0" optional="true" label="E-Value Threshold" help="Report sequences &lt;= this E-Value threshold in output. Default: 10.0. This option is incompatible with option -T,--cut_ga, --cut_nc"  />
+    <param argument="-T" type="float" optional="true" label="Score Threshold" help="Report sequences &gt;= this score threshold in output. This option is incompatible with -E, --cut_ga,--cut_nc"  />
     <!-- Options controlling inclusion (significance) thresholds -->
     <param argument="--incE" type="float" optional="true" label="consider sequences &lt;= this E-Value threshold as significant" />
     <param argument="--incT" type="float" optional="true" label="consider sequences &gt;= this score threshold as significant" />
   </xml>
+  <xml name="cut">
+    <param argument="--cut_ga" type="boolean" truevalue="--cut_ga" falsevalue="" label="use profile's GA gathering cutoffs to set all thresholding" help="This option is incompatible with options -E,-T,--domE,--domT" />
+    <param argument="--cut_nc" type="boolean" truevalue="--cut_nc" falsevalue="" label="use profile's NC gathering cutoffs to set all thresholding" help="This option is incompatible with options -E,-T,--domE,--domT"  />
+    <param argument="--cut_tc" type="boolean" truevalue="--cut_tc" falsevalue="" label="use profile's TC gathering cutoffs to set all thresholding" />
+  </xml>
+
   <token name="@ACCEL_HEUR@">
 $max
 --F1 $F1
@@ -115,7 +186,7 @@
     <param argument="--Eft" type="float" min="0" max="1" value="0.04" label="tail mass for Forward exponential tail tau fit" />
   </xml>
   <token name="@OFORMAT_WITH_OPTS@">
-#if $oformat:      
+#if $oformat:
     #for o in str($oformat).split(','):
         --$o '$getVar($o, 'MISSING_OUTPUT'+$o)'
     #end for
@@ -144,7 +215,7 @@
     <expand macro="oformat_with_opts_dom">
       <option value="pfamtblout" selected="true">Table of hits and domains in Pfam format (--pfamtblout)</option>
     </expand>
-  </xml>  
+  </xml>
 
   <xml name="oformat_with_opts_dfam_alisc">
     <!-- Options directing output -->
@@ -192,14 +263,14 @@
       <has_line_matching expression="# @TOOL@.*"/>
       <has_line_matching expression="\[ok\]"/>
     </assert_contents>
-  </xml> 
+  </xml>
 
   <xml name="assert_tblout" token_tool="">
     <assert_contents>
       <has_line_matching expression="# Program:         @TOOL@"/>
       <has_line_matching expression="# \[ok\]"/>
     </assert_contents>
-  </xml> 
+  </xml>
 
   <xml name="oformat_test">
       <param name="notextw" value="true" />
@@ -342,16 +413,6 @@
       </when>
     </conditional>
   </xml>
-  <token name="@CUT@">
-$cut_ga
-$cut_nc
-$cut_tc
-  </token>
-  <xml name="cut">
-    <param argument="--cut_ga" type="boolean" truevalue="--cut_ga" falsevalue="" label="use profile's GA gathering cutoffs to set all thresholding" />
-    <param argument="--cut_nc" type="boolean" truevalue="--cut_nc" falsevalue="" label="use profile's NC gathering cutoffs to set all thresholding" />
-    <param argument="--cut_tc" type="boolean" truevalue="--cut_tc" falsevalue="" label="use profile's TC gathering cutoffs to set all thresholding" />
-  </xml>
   <token name="@MCSS@">
 --$mcs.model_construction_strategy_select