diff closestBed.xml @ 4:607c0576c6ab draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
author iuc
date Wed, 27 Jan 2016 15:15:59 -0500
parents 82aac94b06c3
children f8b7dc21b4ee
line wrap: on
line diff
--- a/closestBed.xml	Wed May 27 12:54:35 2015 -0400
+++ b/closestBed.xml	Wed Jan 27 15:15:59 2016 -0500
@@ -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
@@ -52,35 +55,21 @@
                 <option value="a">Report distance with respect to A. When A is on the - strand, "upstream" means B has a higher (start,stop). (-a)</option>
                 <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="" />
             <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 +115,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[