changeset 32:4f7a5ccd2ae9 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit fc3616bd1463afef9681cd7c431ac29f79e37e74
author iuc
date Tue, 11 Dec 2018 14:01:26 -0500
parents e19bebe96cd2
children 87ee588b3d45
files annotateBed.xml bamToBed.xml bamToFastq.xml bed12ToBed6.xml bedToBam.xml bedToIgv.xml bedpeToBam.xml closestBed.xml clusterBed.xml complementBed.xml coverageBed.xml expandBed.xml fisherBed.xml flankBed.xml genomeCoverageBed.xml getfastaBed.xml groupbyBed.xml intersectBed.xml jaccardBed.xml linksBed.xml macros.xml makeWindowsBed.xml mapBed.xml maskFastaBed.xml mergeBed.xml multiCov.xml multiIntersectBed.xml nucBed.xml overlapBed.xml randomBed.xml reldist.xml shuffleBed.xml slopBed.xml sortBed.xml spacingBed.xml subtractBed.xml tagBed.xml test-data/bamToFastq_result1.fastq test-data/intersect-A.bed test-data/intersect-A2.bed test-data/intersect-B.bed test-data/intersect-B2.bed test-data/intersect-count.bed test-data/intersect-d1.bed test-data/intersect-d2.bed test-data/intersect-d3.bed test-data/intersect-default.bed test-data/intersect-fracA-rec.bed test-data/intersect-fracA.bed test-data/intersect-invert.bed test-data/intersect-loj.bed test-data/intersect-multiple-fracA.bed test-data/intersect-multiple-invert.bed test-data/intersect-multiple-wa-wb-wnames.bed test-data/intersect-multiple-wa-wb.bed test-data/intersect-multiple.bed test-data/intersect-query.bed test-data/intersect-unique.bed test-data/intersect-uniue.bed test-data/intersect-wa-wb.bed test-data/intersect-wa.bed test-data/intersect-wao.bed test-data/intersect-wb.bed test-data/intersect-wo.bed unionBedGraphs.xml windowBed.xml
diffstat 66 files changed, 486 insertions(+), 77 deletions(-) [+]
line wrap: on
line diff
--- a/annotateBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/annotateBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_annotatebed" name="AnnotateBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_annotatebed" name="bedtools AnnotateBed" version="@WRAPPER_VERSION@">
     <description>annotate coverage of features from multiple files</description>
     <macros>
         <import>macros.xml</import>
--- a/bamToBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/bamToBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_bamtobed" name="BAM to BED" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_bamtobed" name="bedtools BAM to BED" version="@WRAPPER_VERSION@">
     <description>converter</description>
     <macros>
         <import>macros.xml</import>
--- a/bamToFastq.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/bamToFastq.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_bamtofastq" name="Convert from BAM to FastQ" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_bamtofastq" name="bedtools Convert from BAM to FastQ" version="@WRAPPER_VERSION@">
     <description></description>
     <macros>
         <import>macros.xml</import>
@@ -26,6 +26,12 @@
             <filter>fq2 is True</filter>
         </data>
     </outputs>
+    <tests>
+        <test>
+            <param name="input" value="srma_in3.bam" ftype="bam" />
+            <output name="output" file="bamToFastq_result1.fastq" ftype="fastq" />
+        </test>
+    </tests>
 <help>
 
 **What it does**
--- a/bed12ToBed6.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/bed12ToBed6.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_bed12tobed6" name="BED12 to BED6" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_bed12tobed6" name="bedtools BED12 to BED6" version="@WRAPPER_VERSION@">
     <description>converter</description>
     <macros>
         <import>macros.xml</import>
--- a/bedToBam.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/bedToBam.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_bedtobam" name="BED to BAM" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_bedtobam" name="bedtools BED to BAM" version="@WRAPPER_VERSION@">
     <description>converter</description>
     <macros>
         <import>macros.xml</import>
--- a/bedToIgv.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/bedToIgv.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_bedtoigv" name="BED to IGV" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_bedtoigv" name="bedtools BED to IGV" version="@WRAPPER_VERSION@">
     <description>create batch script for taking IGV screenshots</description>
     <macros>
         <import>macros.xml</import>
--- a/bedpeToBam.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/bedpeToBam.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_bedpetobam" name="BEDPE to BAM" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_bedpetobam" name="bedtools BEDPE to BAM" version="@WRAPPER_VERSION@">
     <description>converter</description>
     <macros>
         <import>macros.xml</import>
--- a/closestBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/closestBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_closestbed" name="ClosestBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_closestbed" name="bedtools ClosestBed" version="@WRAPPER_VERSION@">
     <description>find the closest, potentially non-overlapping interval</description>
     <macros>
         <import>macros.xml</import>
--- a/clusterBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/clusterBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_clusterbed" name="ClusterBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_clusterbed" name="bedtools ClusterBed" version="@WRAPPER_VERSION@">
     <description>cluster overlapping/nearby intervals</description>
     <macros>
         <import>macros.xml</import>
--- a/complementBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/complementBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_complementbed" name="ComplementBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_complementbed" name="bedtools ComplementBed" version="@WRAPPER_VERSION@">
     <description>Extract intervals not represented by an interval file</description>
     <macros>
         <import>macros.xml</import>
--- a/coverageBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/coverageBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_coveragebed" name="Compute both the depth and breadth of coverage" version="@WRAPPER_VERSION@.3">
+<tool id="bedtools_coveragebed" name="bedtools Compute both the depth and breadth of coverage" version="@WRAPPER_VERSION@">
     <description>of features in file B on the features in file A (bedtools coverage)</description>
     <macros>
         <import>macros.xml</import>
--- a/expandBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/expandBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_expandbed" name="ExpandBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_expandbed" name="bedtools ExpandBed" version="@WRAPPER_VERSION@">
     <description>replicate lines based on lists of values in columns</description>
     <macros>
         <import>macros.xml</import>
--- a/fisherBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/fisherBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_fisher" name="FisherBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_fisher" name="bedtools FisherBed" version="@WRAPPER_VERSION@">
     <description>calculate Fisher statistic between two feature files</description>
     <macros>
         <import>macros.xml</import>
--- a/flankBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/flankBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_flankbed" name="FlankBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_flankbed" name="bedtools FlankBed" version="@WRAPPER_VERSION@">
     <description>create new intervals from the flanks of existing intervals</description>
     <macros>
         <import>macros.xml</import>
--- a/genomeCoverageBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/genomeCoverageBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_genomecoveragebed" name="Genome Coverage" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_genomecoveragebed" name="bedtools Genome Coverage" version="@WRAPPER_VERSION@">
     <description>compute the coverage over an entire genome</description>
     <macros>
         <import>macros.xml</import>
--- a/getfastaBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/getfastaBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_getfastabed" name="GetFastaBed" version="@WRAPPER_VERSION@.1">
+<tool id="bedtools_getfastabed" name="bedtools GetFastaBed" version="@WRAPPER_VERSION@">
     <description>use intervals to extract sequences from a FASTA file</description>
     <macros>
         <import>macros.xml</import>
--- a/groupbyBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/groupbyBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_groupbybed" name="GroupByBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_groupbybed" name="bedtools GroupByBed" version="@WRAPPER_VERSION@">
     <description>group by common cols and summarize other cols</description>
     <macros>
         <import>macros.xml</import>
--- a/intersectBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/intersectBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,12 +1,14 @@
-<tool id="bedtools_intersectbed" name="Intersect intervals" version="@WRAPPER_VERSION@.2">
+<tool id="bedtools_intersectbed" name="bedtools Intersect intervals" version="@WRAPPER_VERSION@">
     <description>find overlapping intervals in various ways</description>
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro="requirements" />
+    <expand macro="requirements">
+        <requirement type="package" version="@SAMTOOLS_VERSION@">samtools</requirement>
+    </expand>
     <expand macro="stdio" />
-    <command>
-<![CDATA[
+    <command><![CDATA[
+        #import re
         #set modes = ' '.join( str($overlap_mode).split(',') )
 
         #if $modes == "None":
@@ -14,30 +16,47 @@
         #end if
 
         bedtools intersect
-            #if $inputA.is_of_type('bam'):
-                -abam '${inputA}'
-            #else:
-                -a '${inputA}'
-            #end if
+        #if $inputA.is_of_type('bam'):
+            -abam '${inputA}'
+        #else:
+            -a '${inputA}'
+        #end if
 
-            #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate':
-                -b '$reduce_or_iterate.inputB'
-            #else:
-                #set inputBs = "' '".join([str($file) for $file in $reduce_or_iterate.inputB])
-                -b '$inputBs'
+        #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate':
+            -b '$reduce_or_iterate.inputB'
+        #else:
+            #set inputBs = "' '".join([str($file) for $file in $reduce_or_iterate.inputB])
+            -b '$inputBs'
+            #if $reduce_or_iterate.names:
+                #set namesB = "' '".join([re.sub('[^\s\w\-]', '_', str($file.element_identifier)) for $file in $reduce_or_iterate.inputB])
+                -names '$namesB'
             #end if
-            $split
-            $strand
-            #if str($fraction) != "None" and str($fraction):
-              -f '${fraction}'
+        #end if
+        $split
+        $strand
+        #if $fraction_cond.fraction_select == "specify":
+            -f '${fraction_cond.overlap}'
+            $fraction_cond.reciprocal_cond.reciprocal 
+            #if str($fraction_cond.reciprocal_cond.reciprocal) == '':
+                -F '${fraction_cond.reciprocal_cond.overlapB}'
+                $fraction_cond.reciprocal_cond.disjoint
             #end if
-            $reciprocal
-            $invert
-            $once
-            $header
-            $modes
-            $count
-            > '${output}'
+        #end if
+        $invert
+        $once
+        $header
+        $modes
+        $sorted
+        #if str($sorted) != '':
+            #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate' and $reduce_or_iterate.inputB.is_of_type('bam'):
+                -g <(samtools view -H $reduce_or_iterate.inputB | tr ':' '\t' | grep SN | cut -f 3,5)
+            #else if str($reduce_or_iterate.reduce_or_iterate_selector) == 'reduce' and str($reduce_or_iterate.inputB) != 'None' and $reduce_or_iterate.inputB[0].is_of_type('bam'):
+                -g <(samtools view -H $reduce_or_iterate.inputB[0] | tr ':' '\t' | grep SN | cut -f 3,5)
+            #end if
+        #end if
+        $bed
+        $count
+        > '${output}'
 ]]>
     </command>
     <inputs>
@@ -54,11 +73,12 @@
             <when value='reduce'>
                 <param format="bam,@STD_BEDTOOLS_INPUTS@" name="inputB" type="data" multiple="true"
                        label="File(s) B to intersect with A" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format"/>
+                <param argument="names" type="boolean" truevalue="yes" falsevalue="no" label="add data set names instead of indices" help=""/>
             </when>
         </conditional>
         <expand macro="strand2" />
         <param name="overlap_mode" type="select" multiple="True" label="What should be written to the output file?">
-            <option value="-wa" selected="True">Write the original entry in A for each overlap (-wa)</option>
+            <option value="-wa">Write the original entry in A for each overlap (-wa)</option>
             <option value="-wb">Write the original entry in B for each overlap. Useful for knowing what A overlaps. Restricted by the fraction- and reciprocal option (-wb)</option>
             <option value="-wo">Write the original A and B entries plus the number of base pairs of overlap between the two features. Only A features with overlap are reported. Restricted by the fraction- and reciprocal option (-wo)</option>
             <option value="-wao">Write the original A and B entries plus the number of base pairs of overlap between the two features. However, A features w/o overlap are also reported with a NULL B feature and overlap = 0. Restricted by the fraction- and reciprocal option (-wao)</option>
@@ -66,12 +86,25 @@
         </param>
 
         <expand macro="split" />
-        <!-- -f -->
-        <param name="fraction" type="text"
-            label="Minimum overlap required as a fraction of the BAM alignment"
-            help="Alignments are only retained if the overlap with the an interval in the BED file comprises at least this fraction of the BAM alignment's length.  For example, to require that the overlap affects 50% of the BAM alignment, use 0.50. (-f)"/>
-        <!-- -r -->
-        <expand macro="reciprocal" />
+        <conditional name="fraction_cond">
+            <param name='fraction_select' type='select' label='Required overlap'>
+                <option value='default' selected='true'>Default: 1bp</option>
+                <option value='specify'>Specify minimum overlap(s)</option>
+            </param>
+            <when value="default"/>
+            <when value='specify'>
+                <expand macro="overlap" />
+                <conditional name="reciprocal_cond">
+                    <expand macro="reciprocal" />
+                <when value="-r"/>
+                <when value="">
+                    <expand macro="overlapB" />
+                    <param name="disjoint" argument="-e" type="boolean" checked="false" truevalue="-e"  falsevalue=""
+                        label="Require that the fraction of overlap is fulfilled for A OR B." help="If enabled, then for -f 0.90 and -F 0.10 this requires that either 90% of A is covered OR 10% of B is covered, otherwise, both fractions would have to be satisfied."/>
+                </when>
+            </conditional>
+            </when>
+        </conditional>
         <!-- -v -->
         <param name="invert" type="boolean" checked="false" truevalue="-v" falsevalue=""
             label="Report only those alignments that **do not** overlap with file(s) B"
@@ -84,12 +117,229 @@
         <param name="count" type="boolean" checked="false" truevalue="-c" falsevalue=""
             label="For each entry in A, report the number of overlaps with B."
             help="Reports 0 for A entries that have no overlap with B. (-c)" />
+        <!-- -bed -->
+        <param argument="-bed" type="boolean" checked="false" truevalue="-bed" falsevalue=""
+            label="When using BAM input (-abam), write output as BED instead of BAM." />
+        <!-- -sorted -g  -->
+        <param argument="-sorted" type="boolean" checked="false" truevalue="-sorted" falsevalue=""
+            label="For coordinate sorted input file the more efficient sweeping algorithm is enabled." />
         <expand macro="print_header" />
     </inputs>
     <outputs>
-        <data format_source="inputA" name="output" metadata_source="inputA"/>
+        <data format_source="inputA" name="output" metadata_source="inputA">
+            <change_format>
+                <when input="bed" value="-bed" format="bed" />
+            </change_format>
+        </data>
     </outputs>
     <tests>
+        <!-- test adapted from the tutorial https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html -->
+        <test>
+            <param name="inputA" value="intersect-A.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="iterate" />
+                <param name="inputB" value="intersect-B.bed" ftype="bed" />
+            </conditional>
+            <output name="output" file="intersect-default.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-query.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="reduce" />
+                <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" />
+            </conditional>
+            <output name="output" file="intersect-multiple.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-query.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="reduce" />
+                <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" />
+            </conditional>
+            <param name="overlap_mode" value="-wa,-wb" />
+            <param name="sorted" value="-sorted" />
+            <output name="output" file="intersect-multiple-wa-wb.bed" ftype="bed" />
+        </test>
+        <test>
+                <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" />
+            <param name="inputA" value="intersect-query.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="reduce" />
+                <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" />
+                <param name="names" value="yes" />
+            </conditional>
+            <param name="overlap_mode" value="-wa,-wb" />
+            <param name="sorted" value="-sorted" />
+            <output name="output" file="intersect-multiple-wa-wb-wnames.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-query.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="reduce" />
+                <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" />
+            </conditional>
+            <param name="invert" value="-v" />
+            <param name="sorted" value="-sorted" />
+            <output name="output" file="intersect-multiple-invert.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-query.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="reduce" />
+                <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" />
+            </conditional>
+            <param name="overlap_mode" value="-wa,-wb" />
+            <conditional name="fraction_cond">
+                <param name='fraction_select' value='specify'/>
+                <param name="overlap" value="1.0" />
+            </conditional>
+            <param name="sorted" value="-sorted" />
+            <output name="output" file="intersect-multiple-fracA.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-A.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="iterate" />
+                <param name="inputB" value="intersect-B.bed" ftype="bed" />
+            </conditional>
+            <param name="overlap_mode" value="-wa" />
+            <output name="output" file="intersect-wa.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-A.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="iterate" />
+                <param name="inputB" value="intersect-B.bed" ftype="bed" />
+            </conditional>
+            <param name="overlap_mode" value="-wb" />
+            <output name="output" file="intersect-wb.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-A.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="iterate" />
+                <param name="inputB" value="intersect-B.bed" ftype="bed" />
+            </conditional>
+            <param name="overlap_mode" value="-wa,-wb" />
+            <output name="output" file="intersect-wa-wb.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-A.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="iterate" />
+                <param name="inputB" value="intersect-B.bed" ftype="bed" />
+            </conditional>
+            <param name="overlap_mode" value="-loj" />
+            <output name="output" file="intersect-loj.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-A.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="iterate" />
+                <param name="inputB" value="intersect-B.bed" ftype="bed" />
+            </conditional>
+            <param name="overlap_mode" value="-wo" />
+            <output name="output" file="intersect-wo.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-A.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="iterate" />
+                <param name="inputB" value="intersect-B.bed" ftype="bed" />
+            </conditional>
+            <param name="overlap_mode" value="-wao" />
+            <output name="output" file="intersect-wao.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-A.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="iterate" />
+                <param name="inputB" value="intersect-B.bed" ftype="bed" />
+            </conditional>
+            <param name="once" value="-u" />
+            <output name="output" file="intersect-unique.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-A.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="iterate" />
+                <param name="inputB" value="intersect-B.bed" ftype="bed" />
+            </conditional>
+            <param name="count" value="-c"/>
+            <output name="output" file="intersect-count.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-A.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="iterate" />
+                <param name="inputB" value="intersect-B.bed" ftype="bed" />
+            </conditional>
+            <param name="invert" value="-v"/>
+            <output name="output" file="intersect-invert.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-A2.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="iterate" />
+                <param name="inputB" value="intersect-B2.bed" ftype="bed" />
+            </conditional>
+            <param name="overlap_mode" value="-wa,-wb" />
+            <conditional name="fraction_cond">
+                <param name='fraction_select' value='specify'/>
+                <param name="overlap" value="0.5" />
+            </conditional>
+            <output name="output" file="intersect-fracA.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-A2.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="iterate" />
+                <param name="inputB" value="intersect-B2.bed" ftype="bed" />
+            </conditional>
+            <param name="overlap_mode" value="-wa,-wb" />
+            <conditional name="fraction_cond">
+                <param name='fraction_select' value='specify'/>
+                <param name="overlap" value="0.5" />
+                <conditional name="reciprocal_cond">
+                    <param name="reciprocal" value="-r" />
+                </conditional>
+            </conditional>
+            <output name="output" file="intersect-fracA-rec.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-A2.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="iterate" />
+                <param name="inputB" value="intersect-B2.bed" ftype="bed" />
+            </conditional>
+            <param name="overlap_mode" value="-wa,-wb" />
+            <conditional name="fraction_cond">
+                <param name='fraction_select' value='specify'/>
+                <param name="overlap" value="0.5" />
+                <conditional name="reciprocal_cond">
+                    <param name="overlapB" value="0.5" />
+                </conditional>
+            </conditional>
+            <output name="output" file="intersect-fracA-rec.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="intersect-A2.bed" ftype="bed" />
+            <conditional name="reduce_or_iterate">
+                <param name='reduce_or_iterate_selector' value="iterate" />
+                <param name="inputB" value="intersect-B2.bed" ftype="bed" />
+            </conditional>
+            <param name="overlap_mode" value="-wa,-wb" />
+            <conditional name="fraction_cond">
+                <param name='fraction_select' value='specify'/>
+                <param name="overlap" value="0.5" />
+                <conditional name="reciprocal_cond">
+                    <param name="overlapB" value="0.5" />
+                    <param name="disjoint" value="-e" />
+                </conditional>
+            </conditional>
+            <output name="output" file="intersect-fracA.bed" ftype="bed" />
+        </test>
+        <!-- old tests -->
         <test>
             <param name="inputA" value="intersectBed1.bed" ftype="bed" />
             <param name="inputB" value="intersectBed2.bed" ftype="bed" />
--- a/jaccardBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/jaccardBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_jaccard" name="JaccardBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_jaccard" name="bedtools JaccardBed" version="@WRAPPER_VERSION@">
     <description>calculate the distribution of relative distances between two files</description>
     <macros>
         <import>macros.xml</import>
--- a/linksBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/linksBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_links" name="LinksBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_links" name="bedtools LinksBed" version="@WRAPPER_VERSION@">
     <description>create a HTML page of links to UCSC locations</description>
     <macros>
         <import>macros.xml</import>
--- a/macros.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/macros.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,12 +1,12 @@
 <macros>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="2.27.0">bedtools</requirement>
+            <requirement type="package" version="@WRAPPER_VERSION@">bedtools</requirement>
             <yield/>
         </requirements>
     </xml>
-    <token name="@WRAPPER_VERSION@">2.27.0</token>
-    <token name="@SAMTOOLS_VERSION@">1.2</token>
+    <token name="@WRAPPER_VERSION@">2.27.1</token>
+    <token name="@SAMTOOLS_VERSION@">1.9</token>
     <token name="@STD_BEDTOOLS_INPUTS@">bed,bedgraph,gff,vcf</token>
     <token name="@STD_BEDTOOLS_INPUT_LABEL@">bed,bedgraph,gff,vcf</token>
     <xml name="stdio">
@@ -21,12 +21,16 @@
         <version_command>bedtools --version</version_command>
     </xml>
     <xml name="reciprocal">
-        <param name="reciprocal" type="boolean" checked="false" truevalue="-r" falsevalue=""
-            label="Require that the fraction of overlap be reciprocal for A and B"
-            help="In other words, if -f is 0.90 and -r is used, this requires that B overlap at least 90% of A and that A also overlaps at least 90% of B. (-r)" />
+        <param name="reciprocal" argument="-r" type="select" label="Require that the fraction of overlap be reciprocal for A and B" help="In other words, if -f is 0.90 and -r is used, this requires that B overlap at least 90% of A and that A also overlaps at least 90% of B.">
+            <option value="" selected="True">No</option>
+            <option value="-r">Yes</option>
+        </param>
     </xml>
     <xml name="overlap">
-        <param name="overlap" type="float" value="0.000000001" label="Minimum overlap required as a fraction of A" help="Default is 1E-9, i.e. 1bp. (-f)"/>
+        <param name="overlap" argument="-f" type="float" value="0.000000001" label="Minimum overlap required as a fraction of A" help="Default is 1E-9, i.e. 1bp."/>
+    </xml>
+    <xml name="overlapB">
+        <param name="overlapB" argument="-F" type="float" value="0.000000001" label="Minimum overlap required as a fraction of A" help="Default is 1E-9, i.e. 1bp."/>
     </xml>
     <xml name="strand2">
         <param name="strand" type="select" label="Calculation based on strandedness?">
--- a/makeWindowsBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/makeWindowsBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_makewindowsbed" name="MakeWindowsBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_makewindowsbed" name="bedtools MakeWindowsBed" version="@WRAPPER_VERSION@">
     <description>make interval windows across a genome</description>
     <macros>
         <import>macros.xml</import>
--- a/mapBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/mapBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_map" name="MapBed" version="@WRAPPER_VERSION@.1">
+<tool id="bedtools_map" name="bedtools MapBed" version="@WRAPPER_VERSION@.2">
     <description>apply a function to a column for each overlapping interval</description>
     <macros>
         <import>macros.xml</import>
--- a/maskFastaBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/maskFastaBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_maskfastabed" name="MaskFastaBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_maskfastabed" name="bedtools MaskFastaBed" version="@WRAPPER_VERSION@">
     <description>use intervals to mask sequences from a FASTA file</description>
     <macros>
         <import>macros.xml</import>
--- a/mergeBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/mergeBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_mergebed" name="MergeBED" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_mergebed" name="bedtools MergeBED" version="@WRAPPER_VERSION@">
     <description>combine overlapping/nearby intervals into a single interval</description>
     <macros>
         <import>macros.xml</import>
--- a/multiCov.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/multiCov.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_multicovtbed" name="MultiCovBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_multicovtbed" name="bedtools MultiCovBed" version="@WRAPPER_VERSION@">
     <description>counts coverage from multiple BAMs at specific intervals</description>
     <macros>
         <import>macros.xml</import>
--- a/multiIntersectBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/multiIntersectBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_multiintersectbed" name="Multiple Intersect" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_multiintersectbed" name="bedtools Multiple Intersect" version="@WRAPPER_VERSION@">
     <description>identifies common intervals among multiple interval files</description>
     <macros>
         <import>macros.xml</import>
--- a/nucBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/nucBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_nucbed" name="NucBed" version="@WRAPPER_VERSION@.1">
+<tool id="bedtools_nucbed" name="bedtools NucBed" version="@WRAPPER_VERSION@">
     <description>profile the nucleotide content of intervals in a FASTA file</description>
     <macros>
         <import>macros.xml</import>
--- a/overlapBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/overlapBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_overlapbed" name="OverlapBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_overlapbed" name="bedtools OverlapBed" version="@WRAPPER_VERSION@">
     <description>computes the amount of overlap from two intervals</description>
     <macros>
         <import>macros.xml</import>
--- a/randomBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/randomBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_randombed" name="RandomBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_randombed" name="bedtools RandomBed" version="@WRAPPER_VERSION@">
     <description>generate random intervals in a genome</description>
     <macros>
         <import>macros.xml</import>
--- a/reldist.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/reldist.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_reldistbed" name="ReldistBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_reldistbed" name="bedtools ReldistBed" version="@WRAPPER_VERSION@">
     <description>calculate the distribution of relative distances</description>
     <macros>
         <import>macros.xml</import>
--- a/shuffleBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/shuffleBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_shufflebed" name="ShuffleBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_shufflebed" name="bedtools ShuffleBed" version="@WRAPPER_VERSION@">
     <description>randomly redistrubute intervals in a genome</description>
     <macros>
         <import>macros.xml</import>
--- a/slopBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/slopBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_slopbed" name="SlopBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_slopbed" name="bedtools SlopBed" version="@WRAPPER_VERSION@">
     <description>adjust the size of intervals</description>
     <macros>
         <import>macros.xml</import>
--- a/sortBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/sortBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_sortbed" name="SortBED" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_sortbed" name="bedtools SortBED" version="@WRAPPER_VERSION@">
     <description>order the intervals</description>
     <macros>
         <import>macros.xml</import>
--- a/spacingBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/spacingBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_spacingbed" name="SpacingBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_spacingbed" name="bedtools SpacingBed" version="@WRAPPER_VERSION@">
     <description>reports the distances between features</description>
     <macros>
         <import>macros.xml</import>
--- a/subtractBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/subtractBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_subtractbed" name="SubtractBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_subtractbed" name="bedtools SubtractBed" version="@WRAPPER_VERSION@">
     <description>remove intervals based on overlaps</description>
     <macros>
         <import>macros.xml</import>
--- a/tagBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/tagBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_tagbed" name="TagBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_tagbed" name="bedtools TagBed" version="@WRAPPER_VERSION@">
     <description>tag BAM alignments based on overlaps with interval files</description>
     <macros>
         <import>macros.xml</import>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bamToFastq_result1.fastq	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,32 @@
+@GA5:3:2:1710:1301#0
+GAACTCCTGACCTCAGGTGATCTGCCCGCCTTGGCCTCCCAAAGTGCTGGAATTACAGGCATGAGCCACCGTGCCC
++
+6->;B==?B?AAA??9B<AA?@A==AA9A?<A?<&:A?=<9<?>19;?A=9:?999;=4=6A9/8;4==;1';;3=
+@GA5:3:24:462:583#0
+TAAAAAAAGGACAGTGACGCACCTTGTATAGCGATGTGTCATCTAAAACATCTATTCAAAGAACAGAAGACTCACC
++
+BBABBBB@BBBBBA?BBBBBBAA@AB?BBBA@B=>@?@;@?@?A>=1=?>??><???;;>?;;;?>8999;;9;;<
+@GA5:3:29:1241:1653#0
+TCATGCACACACAGACAGCTGTCGGGGGATGCATGCCAACCAGAGGGGCCACACATATACCGTGTTGATGGGACAG
++
+BBBBBBACBCBBBBBBBBBBBABBABBB@AA>@?@?@>=????<???:?915399<=5=<==5=559545432353
+@GA5:3:33:1591:303#0
+CTCGCCTGGGCCCGGTAAAGCCCCCACGTAGCCCCAGCCAGCCTGGAACATGCTTCCTGAGCTCCCAGCTCTTGGT
++
+BBBBBBBBBBB@BBB?BBBA@A>B@B?AABB?@>?BA?>AB;??A?6;=AAAAA=>3=9;@;===6,=?;;5==;6
+@GA5:3:31:677:1537#0
+CTTCCGCCACTGGCCGGTGTCGGGGTCTGGGACACCCTGAGACCCTAAGCTCTCCTGGCTGCTCTCTCAAACCCTC
++
+BBBBBBBBBBBBBBBBA=B?AA?AA4A>??A>?AA??>>8>?>>????>?9=9==9>###################
+@GA5:3:49:1480:1116#0
+TTTCCAGAGAGTTGGTGTGTAGGGGGCAGGGGAGGGAGGTGATGGCTGTGGGTCCCTGAAGTCCTGGCCTCCTCCC
++
+BBBAAABAA?A?ABA;A=A=??==>?=>???=;==449=4:44#################################
+@GA5:3:61:213:1812#0
+TCCTGGCTTCAGTTTTTCAATTCGTAAAAAGAGCAAACAAAGCCCAACAGCTGGTCCAGTCCGACCCCGCCGGACC
++
+BCBBBBBBBB;B4B@ABA9AAABB>BBBB>5>=BAB@@A8C=BA@@;;=6:78:7;;1,),4=584=8495,18=/
+@GA5:3:116:1581:552#0
+AAGGCTCTGCCTTAGAAGCAGAGATGGGTACCTCACCAGACACCAAACCTGCTGGCACCCTGACCTTAGGCTTTCT
++
+B?BBCBBABBBBB@B???BBBAB@=@AB6AB@@A?B?@@>AA=<@@@89??@8?=<;@8<8<89;=3,92478884
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-A.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,3 @@
+chr1	10	20
+chr1	30	40
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-A2.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,2 @@
+chr1	1	140
+chr1	100	200
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-B.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,1 @@
+chr1	15	20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-B2.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,2 @@
+chr1	130	201
+chr1	130	200000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-count.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,2 @@
+chr1	10	20	1
+chr1	30	40	0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-d1.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,10 @@
+chr1	5	25
+chr1	65	75
+chr1	95	100
+chr2	5	25
+chr2	65	75
+chr2	95	100
+chr3	5	25
+chr3	65	75
+chr3	95	100
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-d2.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,6 @@
+chr1	40	50
+chr1	110	125
+chr2	40	50
+chr2	110	125
+chr3	40	50
+chr3	110	125
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-d3.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,3 @@
+chr1	85	115
+chr2	85	115
+chr3	85	115
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-default.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,1 @@
+chr1	15	20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-fracA-rec.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,1 @@
+chr1	100	200	chr1	130	201
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-fracA.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,2 @@
+chr1	100	200	chr1	130	201
+chr1	100	200	chr1	130	200000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-invert.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,1 @@
+chr1	30	40
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-loj.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,2 @@
+chr1	10	20	chr1	15	20
+chr1	30	40	.	-1	-1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-multiple-fracA.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,3 @@
+chr1	40	45	2	chr1	40	50
+chr2	40	45	2	chr2	40	50
+chr3	40	45	2	chr3	40	50
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-multiple-invert.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,2 @@
+chr3	150	200
+chr4	10	20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-multiple-wa-wb-wnames.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,18 @@
+chr1	1	20	intersect-d1_bed	chr1	5	25
+chr1	40	45	intersect-d2_bed	chr1	40	50
+chr1	70	90	intersect-d1_bed	chr1	65	75
+chr1	70	90	intersect-d3_bed	chr1	85	115
+chr1	105	120	intersect-d2_bed	chr1	110	125
+chr1	105	120	intersect-d3_bed	chr1	85	115
+chr2	1	20	intersect-d1_bed	chr2	5	25
+chr2	40	45	intersect-d2_bed	chr2	40	50
+chr2	70	90	intersect-d1_bed	chr2	65	75
+chr2	70	90	intersect-d3_bed	chr2	85	115
+chr2	105	120	intersect-d2_bed	chr2	110	125
+chr2	105	120	intersect-d3_bed	chr2	85	115
+chr3	1	20	intersect-d1_bed	chr3	5	25
+chr3	40	45	intersect-d2_bed	chr3	40	50
+chr3	70	90	intersect-d1_bed	chr3	65	75
+chr3	70	90	intersect-d3_bed	chr3	85	115
+chr3	105	120	intersect-d2_bed	chr3	110	125
+chr3	105	120	intersect-d3_bed	chr3	85	115
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-multiple-wa-wb.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,18 @@
+chr1	1	20	1	chr1	5	25
+chr1	40	45	2	chr1	40	50
+chr1	70	90	1	chr1	65	75
+chr1	70	90	3	chr1	85	115
+chr1	105	120	2	chr1	110	125
+chr1	105	120	3	chr1	85	115
+chr2	1	20	1	chr2	5	25
+chr2	40	45	2	chr2	40	50
+chr2	70	90	1	chr2	65	75
+chr2	70	90	3	chr2	85	115
+chr2	105	120	2	chr2	110	125
+chr2	105	120	3	chr2	85	115
+chr3	1	20	1	chr3	5	25
+chr3	40	45	2	chr3	40	50
+chr3	70	90	1	chr3	65	75
+chr3	70	90	3	chr3	85	115
+chr3	105	120	2	chr3	110	125
+chr3	105	120	3	chr3	85	115
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-multiple.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,18 @@
+chr1	5	20
+chr1	40	45
+chr1	70	75
+chr1	85	90
+chr1	110	120
+chr1	105	115
+chr2	5	20
+chr2	40	45
+chr2	70	75
+chr2	85	90
+chr2	110	120
+chr2	105	115
+chr3	5	20
+chr3	40	45
+chr3	70	75
+chr3	85	90
+chr3	110	120
+chr3	105	115
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-query.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,14 @@
+chr1	1	20
+chr1	40	45
+chr1	70	90
+chr1	105	120
+chr2	1	20
+chr2	40	45
+chr2	70	90
+chr2	105	120
+chr3	1	20
+chr3	40	45
+chr3	70	90
+chr3	105	120
+chr3	150	200
+chr4	10	20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-unique.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,1 @@
+chr1	10	20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-uniue.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,1 @@
+chr1	10	20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-wa-wb.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,1 @@
+chr1	10	20	chr1	15	20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-wa.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,1 @@
+chr1	10	20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-wao.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,2 @@
+chr1	10	20	chr1	15	20	5
+chr1	30	40	.	-1	-1	0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-wb.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,1 @@
+chr1	15	20	chr1	15	20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersect-wo.bed	Tue Dec 11 14:01:26 2018 -0500
@@ -0,0 +1,1 @@
+chr1	10	20	chr1	15	20	5
--- a/unionBedGraphs.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/unionBedGraphs.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_unionbedgraph" name="Merge BedGraph files" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_unionbedgraph" name="bedtools Merge BedGraph files" version="@WRAPPER_VERSION@">
     <description>combines coverage intervals from multiple BEDGRAPH files</description>
     <macros>
         <import>macros.xml</import>
--- a/windowBed.xml	Tue Nov 20 10:34:42 2018 -0500
+++ b/windowBed.xml	Tue Dec 11 14:01:26 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="bedtools_windowbed" name="WindowBed" version="@WRAPPER_VERSION@.0">
+<tool id="bedtools_windowbed" name="bedtools WindowBed" version="@WRAPPER_VERSION@">
     <description>find overlapping intervals within a window around an interval</description>
     <macros>
         <import>macros.xml</import>