diff closestBed.xml @ 17:a2d4c30ba2f9 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
author iuc
date Sun, 21 Jun 2015 22:49:46 -0400
parents 0d3aa592ce27
children 102424c60727
line wrap: on
line diff
--- a/closestBed.xml	Mon May 25 22:48:52 2015 -0400
+++ b/closestBed.xml	Sun Jun 21 22:49:46 2015 -0400
@@ -1,5 +1,5 @@
 <tool id="bedtools_closestbed" name="ClosestBed" version="@WRAPPER_VERSION@.0">
-    <description></description>
+    <description>find the closest, potentially non-overlapping interval</description>
     <macros>
         <import>macros.xml</import>
     </macros>
@@ -20,6 +20,9 @@
         $io
         -mdb $mdb
         -t $ties
+        #if $k:
+            -k $k
+        #end if
         -a $inputA
         -b $inputBs
         > $output
@@ -53,34 +56,19 @@
                 <option value="b">Report distance with respect to B. When B is on the - strand, "upstream" means A has a higher (start,stop). (-b)</option>
             </param>
             <when value="ref">
-                <param name="iu" type="boolean" checked="false" truevalue="-iu" falsevalue=""
-                    label="Ignore features in B that are upstream of features in A" 
-                    help="This option requires -D and follows its orientation rules for determining what is 'upstream'. (-iu)" />
-
-                <param name="id" type="boolean" checked="false" truevalue="-id" falsevalue=""
-                    label="Ignore features in B that are downstream of features in A" 
-                    help="This option requires -D and follows its orientation rules for determining what is 'downstream'. (-id)" />
+                <expand macro="closest_D_option" />
             </when>
             <when value="a">
-                <param name="iu" type="boolean" checked="false" truevalue="-iu" falsevalue=""
-                    label="Ignore features in B that are upstream of features in A" 
-                    help="This option requires -D and follows its orientation rules for determining what is 'upstream'. (-iu)" />
-
-                <param name="id" type="boolean" checked="false" truevalue="-id" falsevalue=""
-                    label="Ignore features in B that are downstream of features in A" 
-                    help="This option requires -D and follows its orientation rules for determining what is 'downstream'. (-id)" />
+                <expand macro="closest_D_option" />
             </when>
             <when value="b">
-                <param name="iu" type="boolean" checked="false" truevalue="-iu" falsevalue=""
-                    label="Ignore features in B that are upstream of features in A" 
-                    help="This option requires -D and follows its orientation rules for determining what is 'upstream'. (-iu)" />
-
-                <param name="id" type="boolean" checked="false" truevalue="-id" falsevalue=""
-                    label="Ignore features in B that are downstream of features in A" 
-                    help="This option requires -D and follows its orientation rules for determining what is 'downstream'. (-id)" />
+                <expand macro="closest_D_option" />
             </when>
         </conditional>
 
+        <param name="k" type="integer" value="1" optional="True" min="1"
+            label="Report the k closest hits" help="(-k)"/>
+
         <param name="io" type="boolean" checked="false" truevalue="-io" falsevalue=""
             label="Ignore features in B that overlap A" 
             help="That is, we want close, yet not touching features only. (-io)" />
@@ -126,6 +114,12 @@
             <param name="addition2_select" value="a" />
             <output name="output" file="closestBed_result5.bed" ftype="bed" />
         </test>
+        <test>
+            <param name="inputA" value="closestBedA.bed" ftype="bed" />
+            <param name="inputB" value="a.bed" ftype="bed" />
+            <param name="k" value="3" />
+            <output name="output" file="closestBed_result6.bed" ftype="bed" />
+        </test>
     </tests>
     <help>
 <![CDATA[