Repository 'bedtools'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/bedtools

Changeset 1:82aac94b06c3 (2015-01-08)
Previous changeset 0:b8348686a0b9 (2014-11-04) Next changeset 2:457b09031d57 (2015-05-19)
Commit message:
Uploaded
modified:
annotateBed.xml
bamToBed.xml
bedpeToBam.xml
closestBed.xml
clusterBed.xml
complementBed.xml
coverageBed.xml
expandBed.xml
getfastaBed.xml
groupbyBed.xml
intersectBed.xml
jaccardBed.xml
linksBed.xml
macros.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
subtractBed.xml
tagBed.xml
tool_dependencies.xml
unionBedGraphs.xml
windowBed.xml
added:
bed12ToBed6.xml
bedToBam.xml
fisherBed.xml
flankBed.xml
genomeCoverageBed.xml
makeWindowsBed.xml
static/images/closest-glyph.png
test-data/a.bed
test-data/annotateBed_result.bed
test-data/bamToBed_result1.bed
test-data/bamToBed_result2.bed
test-data/bed12.bed
test-data/bed12ToBed6_result1.bed
test-data/bedToBam1.bed
test-data/bedToBam_result.bam
test-data/bedpeToBamBed1.bed
test-data/bedpeToBam_result1.bam
test-data/closestBed_a.bed
test-data/closestBed_b1.bed
test-data/closestBed_b2.bed
test-data/closestBed_c.bed
test-data/closestBed_d.bed
test-data/closestBed_result1.bed
test-data/closestBed_result2.bed
test-data/closestBed_result3.bed
test-data/closestBed_result4.bed
test-data/closestBed_result5.bed
test-data/clusterBed_result.bed
test-data/complementBed_result1.bed
test-data/coverageBedA.bed
test-data/coverageBedB.bed
test-data/coverageBed_result1.bed
test-data/expandBed1.bed
test-data/expandBed_result1.bed
test-data/expandBed_result2.bed
test-data/fisherBed.len
test-data/fisherBed1.bed
test-data/fisherBed2.bed
test-data/fisherBed_result1.bed
test-data/flankBed_result1.bed
test-data/flankBed_result2.bed
test-data/genomeCoverageBed1.bed
test-data/genomeCoverageBed1.len
test-data/genomeCoverageBed_result1.bed
test-data/getfastaBed_result1.bed
test-data/getfastaBed_result2.tabular
test-data/groupbyBed1.bed
test-data/groupbyBed_result1.bed
test-data/groupbyBed_result2.bed
test-data/groupbyBed_result3.bed
test-data/intersectBed1.bed
test-data/intersectBed2.bed
test-data/intersectBed_result1.bed
test-data/intersectBed_result2.bed
test-data/intersectBed_result3.bed
test-data/jaccardBed1.bed
test-data/jaccardBed2.bed
test-data/jaccardBed_result1.bed
test-data/jaccardBed_result2.bed
test-data/linksBed1.bed
test-data/linksBed_result1.html
test-data/linksBed_result2.html
test-data/makeWindowBed1.bed
test-data/makeWindowBed_result1.bed
test-data/makeWindowBed_result2.bed
test-data/makeWindowBed_result3.bed
test-data/makeWindowBed_result4.bed
test-data/mapBed1.bed
test-data/mapBed2.bed
test-data/mapBed_result1.bed
test-data/mapBed_result2.bed
test-data/mapBed_result3.bed
test-data/mapBed_result4.bed
test-data/maskFastaBed_result1.bed
test-data/maskFastaBed_result2.bed
test-data/mergedBed1.bed
test-data/mergedBed2.bed
test-data/mergedBed3.bed
test-data/mergedBed4.bed
test-data/mergedBed_result.bed
test-data/mergedBed_result1.bed
test-data/mergedBed_result2.bed
test-data/mergedBed_result3.bed
test-data/mergedBed_result4.bed
test-data/mm9.len
test-data/mm9_chr1.len
test-data/multiCov1.bed
test-data/multiCovBed_result1.bed
test-data/multiIntersectBed1.bed
test-data/multiIntersectBed1.len
test-data/multiIntersectBed2.bed
test-data/multiIntersectBed3.bed
test-data/multiIntersectBed_result1.bed
test-data/multiIntersectBed_result2.bed
test-data/multiIntersectBed_result3.bed
test-data/nucBed1.bed
test-data/nucBed1.fasta
test-data/nucBed_result1.bed
test-data/nucBed_result2.bed
test-data/overlapBed_result1.bed
test-data/randomBed_result1.bed
test-data/reldistBed_result1.bed
test-data/shuffleBed.len
test-data/shuffleBed1.bed
test-data/shuffleBed2.bed
test-data/shuffleBed_result1.bed
test-data/shuffleBed_result2.bed
test-data/shuffleBed_result3.bed
test-data/shuffleBed_result4.bed
test-data/slopBed_result1.bed
test-data/slopBed_result2.bed
test-data/sortBed1.bed
test-data/sortBed_result1.bed
test-data/srma_in3.bam
test-data/subtractBed1.bed
test-data/subtractBed2.bed
test-data/subtractBed_result1.bed
test-data/subtractBed_result2.bed
test-data/subtractBed_result3.bed
test-data/tagBed1.bed
test-data/tagBed_result1.bam
test-data/unionBedGraphs1.bg
test-data/unionBedGraphs1.len
test-data/unionBedGraphs2.bg
test-data/unionBedGraphs3.bg
test-data/unionBedGraphs_result1.bg
test-data/unionBedGraphs_result2.bg
test-data/unionBedGraphs_result3.bg
test-data/unionBedGraphs_result4.bg
test-data/windowBed_result1.bed
test-data/windowBed_result2.bed
removed:
Bed12ToBed6.xml
BedToBam.xml
bamToFastq.xml
flankbed.xml
genomeCoverageBed_bedgraph.xml
genomeCoverageBed_histogram.xml
makewindowsBed.xml
test-data/0.bed
test-data/0_result.bed
test-data/1.bed
test-data/1_result.bed
test-data/2.bed
test-data/2_result.bed
test-data/3.bed
test-data/3_result_1000.bed
test-data/A.bed
test-data/groupbyBed.bed
test-data/groupbyinput.bed
test-data/mygenome.bed
test-data/t
b
diff -r b8348686a0b9 -r 82aac94b06c3 Bed12ToBed6.xml
--- a/Bed12ToBed6.xml Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,28 +0,0 @@
-<tool id="bedtools_bed12tobed6" name="Convert from BED12 to BED6" version="@WRAPPER_VERSION@.0">
-    <description></description>
-    <macros>
-        <import>macros.xml</import>
-    </macros>
-    <expand macro="requirements" />
-    <expand macro="stdio" />
-    <command>
-        bed12ToBed16
-        -i '$input'
-        &gt; '$output'
-    </command>
-    <inputs>
-        <param format="bed" name="input" type="data" label="Convert the following BED12 file to BED6"/>
-    </inputs>
-    <outputs>
-        <data format="bed" name="output" metadata_source="input" label="${input.name} (as BED6)"/>
-    </outputs>
-    <help>
-
-**What it does**
-
-bed12ToBed6 is a convenience tool that converts BED features in BED12 (a.k.a. “blocked” BED features such as genes) to discrete BED6 features. For example, in the case of a gene with six exons, bed12ToBed6 would create six separate BED6 features (i.e., one for each exon).
-
-@REFERENCES@
-    </help>
-    <expand macro="citations" />
-</tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 BedToBam.xml
--- a/BedToBam.xml Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,34 +0,0 @@
-<tool id="bedtools_bedtobam" name="Convert from BED to BAM" version="@WRAPPER_VERSION@.0">
-    <description></description>
-    <macros>
-        <import>macros.xml</import>
-    </macros>
-    <expand macro="requirements" />
-    <expand macro="stdio" />
-    <command>
-        bedtools bedtobam
-        $ubam
-        $bed12
-        -mapq $mapq
-        -i '$input'
-        &gt; '$output'
-    </command>
-    <inputs>
-        <param format="bed" name="input" type="data" label="Convert the following BED file to BAM"/>
-        <param name="bed12" type="boolean" label="Indicate that the input BED file is in BED12 (a.k.a “blocked” BED) format" truevalue="-bed12" falsevalue="" checked="false" help="If Selected, bedToBam will convert blocked BED features (e.g., gene annotaions) into “spliced” BAM alignments by creating an appropriate CIGAR string.."/>
-        <param name="mapq" type="integer" label="Set a mapping quality (SAM MAPQ field) value for all BED entries" value="255" />
-        <param name="ubam" type="boolean" label="Write uncompressed BAM output." truevalue="-ubam" falsevalue="" checked="false"/>
-    </inputs>
-    <outputs>
-        <data format="bam" name="output" metadata_source="input" label="${input.name} (as BAM)"/>
-    </outputs>
-    <help>
-
-**What it does**
-
-bedToBam converts features in a feature file to BAM format. This is useful as an efficient means of storing large genome annotations in a compact, indexed format for visualization purposes.
-
-@REFERENCES@
-    </help>
-    <expand macro="citations" />
-</tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 annotateBed.xml
--- a/annotateBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/annotateBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,23 +6,28 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools annotate
-        -i $inputA
-        -files 
-        #for $bed in $names.beds:
-            $bed.input
-        #end for
+        -i "${inputA}"
+        #if $names.names_select == 'yes':
+            -files
+            #for $bed in $names.beds:
+                "${bed.input}"
+            #end for
 
-        #if $names.names_select == 'yes':
             -names
             #for $bed in $names.beds:
-                $bed.inputName
+                "${bed.inputName}"
             #end for
+        #else:
+            #set files = '" "'.join( [ str( $file ) for $file in $names.beds ] )
+            -files "${files}"
         #end if
         $strand
         $counts
         $both
-        &gt; $output
+        > "${output}"
+]]>
     </command>
     <inputs>
         <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file" />
@@ -39,28 +44,36 @@
                 </repeat>
             </when>
             <when value="no">
-                <repeat name="beds" title="Add BED files" >
-                    <param name="input" format="bed" type="data" label="BED file" />
-                </repeat>
+                <param name="beds" format="bed" multiple="True" type="data" label="BED file" />
             </when>
         </conditional>
-        
         <expand macro="strand2" />
-        <param name="counts" type="boolean" checked="false" truevalue="-counts" falsevalue="" label="Report the count of features followed by the % coverage for each annotation file. Default is to report solely the fraction of -i covered by each file." />
-        <param name="both" type="boolean" checked="false" truevalue="-both" falsevalue="" label="Report the count of features followed by the % coverage for each annotation file. Default is to report solely the fraction of the input file covered by each file." />
+        <param name="counts" type="boolean" checked="false" truevalue="-counts" falsevalue=""
+            label="Report the count of features followed by the % coverage for each annotation file" 
+            help="Default is to report solely the fraction of -i covered by each file." />
+        <param name="both" type="boolean" checked="false" truevalue="-both" falsevalue=""
+            label="Report the count of features followed by the % coverage for each annotation file" 
+            help="Default is to report solely the fraction of the input file covered by each file." />
     </inputs>
-
     <outputs>
-        <data format="bed" name="output" label="" />
+        <data format="bed" name="output" />
     </outputs>
+    <tests>
+        <test>
+            <param name="inputA" value="annotateBed1.bed" ftype="bed" />
+            <param name="names_select" value="no" />
+            <param name="beds" value="annotateBed2.bed,annotateBed3.bed,annotateBed4.bed" />
+            <output name="output" file="annotateBed_result.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-    
+<![CDATA[
 **What it does**
 
 bedtools annotate, well, annotates one BED/VCF/GFF file with the coverage and number of overlaps observed from multiple other BED/VCF/GFF files. In this way, it allows one to ask to what degree one feature coincides with multiple other feature types with a single command.
 
 @REFERENCES@
-
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 bamToBed.xml
--- a/bamToBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/bamToBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,14 +6,17 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
-        bedtools bamtobed 
-        $option 
+<![CDATA[
+        bedtools bamtobed
+        $option
         $ed_score
-        -i '$input'
-        &gt; '$output'
-        #if str($tag):
-          -tag $tag
+        $split
+        #if $tag and str($tag).strip():
+          -tag "${tag}"
         #end if
+        -i "${input}"
+        > "${output}"
+]]>
     </command>
     <inputs>
         <param format="bam" name="input" type="data" label="Convert the following BAM file to BED"/>
@@ -22,15 +25,31 @@
             <option value="-bed12">Create a full, 12-column "blocked" BED file.</option>
             <option value="-bedpe">Create a paired-end, BEDPE format.</option>
         </param>
-        <param name="split" type="boolean" label="Report each portion of a split BAM alignment" truevalue="-split" falsevalue="" checked="false" help="(i.e., having an 'N' CIGAR operation) as a distinct BED intervals."/>
-        <param name="ed_score" type="boolean" label="Use alignment's edit-distance for BED score" truevalue="-ed" falsevalue="" checked="false"/>
-        <param name="tag" type="text" optional="true" label="Use other NUMERIC BAM alignment tag as the BED score"/>
+        <expand macro="split" />
+        <param name="ed_score" type="boolean" truevalue="-ed" falsevalue="" checked="false"
+            label="Use alignment's edit-distance for BED score" />
+        <param name="tag" type="text" optional="true" label="Use other NUMERIC BAM alignment tag as the BED score"
+            help="(-tag)"/>
     </inputs>
     <outputs>
         <data format="bed" name="output" metadata_source="input" label="${input.name} (as BED)"/>
     </outputs>
-<help>
-
+    <tests>
+        <test>
+            <param name="input" value="srma_in3.bam" ftype="bam" />
+            <param name="option" value="" />
+            <param name="tag" value="" />
+            <output name="output" file="bamToBed_result1.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="input" value="srma_in3.bam" ftype="bam" />
+            <param name="option" value="" />
+            <param name="tag" value="NM" />
+            <output name="output" file="bamToBed_result2.bed" ftype="bed" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
 **What it does**
 
 bedtools bamtobed is a conversion utility that converts sequence alignments in BAM format into BED, BED12, and/or BEDPE records.
@@ -49,7 +68,7 @@
 If creating a BEDPE output (see output formatting options), the BAM file should be sorted by query name.
 
 @REFERENCES@
-
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 bamToFastq.xml
--- a/bamToFastq.xml Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,33 +0,0 @@
-<tool id="bedtools_bamtofastq" name="Convert from BAM to FastQ" version="@WRAPPER_VERSION@.0">
-    <description></description>
-    <macros>
-        <import>macros.xml</import>
-    </macros>
-    <expand macro="requirements" />
-    <expand macro="stdio" />
-    <command>
-        bedtools bamtofastq 
-        $tags
-        $fq2
-        -i '$input'
-        -fq '$output'
-    </command>
-    <inputs>
-        <param format="bam" name="input" type="data" label="Convert the following BAM file to FASTQ"/>
-        <param name="tags" type="boolean" truevalue="-tags" falsevalue="" selected="False" label="Create FASTQ based on the mate info in the BAM R2 and Q2 tags."/>
-        <param name="fq2" type="boolean" truevalue="-fq2" falsevalue="" selected="False" label="ASTQ for second end. Used if BAM contains paired-end data. BAM should be sorted by query name if creating paired FASTQ with this option."/>
-    </inputs>
-    <outputs>
-        <data format="fastq" name="output" metadata_source="input" label="${input.name} (as FASTQ)"/>
-    </outputs>
-<help>
-
-**What it does**
-
-bedtools bamtofastq is a conversion utility for extracting FASTQ records from sequence alignments in BAM format.
-
-@REFERENCES@
-
-    </help>
-    <expand macro="citations" />
-</tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 bed12ToBed6.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bed12ToBed6.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -0,0 +1,37 @@
+<tool id="bedtools_bed12tobed6" name="BED12 to BED6" version="@WRAPPER_VERSION@.0">
+    <description>converter</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <command>
+<![CDATA[
+        bed12ToBed6
+        -i '$input'
+        > '$output'
+]]>
+    </command>
+    <inputs>
+        <param format="bed" name="input" type="data" label="Convert the following BED12 file to BED6"/>
+    </inputs>
+    <outputs>
+        <data format="bed" name="output" metadata_source="input" label="${input.name} (as BED6)"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="bed12.bed" ftype="bed" />
+            <output name="output" file="bed12ToBed6_result1.bed" ftype="bed" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+bed12ToBed6 is a convenience tool that converts BED features in BED12 (a.k.a. “blocked” BED features such as genes) to discrete BED6 features. For example, in the case of a gene with six exons, bed12ToBed6 would create six separate BED6 features (i.e., one for each exon).
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 bedToBam.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bedToBam.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -0,0 +1,47 @@
+<tool id="bedtools_bedtobam" name="Convert from BED to BAM" version="@WRAPPER_VERSION@.0">
+    <description></description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <command>
+<![CDATA[
+        bedtools bedtobam
+        $bed12
+        -mapq $mapq
+        -g $genome
+        -i '$input'
+        > '$output'
+]]>
+    </command>
+    <inputs>
+        <param format="bed" name="input" type="data" label="Convert the following BED file to BAM"/>
+        <param name="bed12" type="boolean" truevalue="-bed12" falsevalue="" checked="false"
+            label="Indicate that the input BED file is in BED12 (a.k.a 'blocked' BED) format"
+            help="If Selected, bedToBam will convert blocked BED features (e.g., gene annotaions) into 'spliced' BAM alignments by creating an appropriate CIGAR string. (-bed12)"/>
+        <expand macro="genome" />
+        <param name="mapq" type="integer" value="255"
+            label="Set a mapping quality (SAM MAPQ field) value for all BED entries" help="(-mapq)"/>
+    </inputs>
+    <outputs>
+        <data format="bam" name="output" metadata_source="input" label="${input.name} (as BAM)"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="bedToBam1.bed" ftype="bed" />
+            <param name="genome" value="mm9_chr1.len" ftype="tabular" />
+            <output name="output" file="bedToBam_result.bam" lines_diff="2" ftype="bam" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+bedToBam converts features in a feature file to BAM format. This is useful as an efficient means of storing large genome annotations in a compact, indexed format for visualization purposes.
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 bedpeToBam.xml
--- a/bedpeToBam.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/bedpeToBam.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,24 +6,33 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools bedpetobam
-        $ubam
-        -mapq $mapq
-        -i '$input'
-        -g $genome
-        &gt; '$output'
+            -mapq $mapq
+            -i '$input'
+            -g $genome
+            > '$output'
+]]>
     </command>
     <inputs>
-        <param format="bed,gff,vcf" name="input" type="data" label="BED/VCF/GFF file"/>
+        <param name="input" format="bed,gff,vcf" type="data" label="BED/VCF/GFF file"/>
         <expand macro="genome" />
-        <param name="mapq" type="integer" label="Set a mapping quality (SAM MAPQ field) value for all BED entries" value="255" />
-        <param name="ubam" type="boolean" label="Write uncompressed BAM output." truevalue="-ubam" falsevalue="" checked="false"/>
+        <param name="mapq" type="integer" value="255"
+            label="Set a mapping quality (SAM MAPQ field) value for all BED entries"
+            help="(-mapq)" />
     </inputs>
     <outputs>
-        <data format="bam" name="output" metadata_source="input" label="${input.name} (as BAM)"/>
+        <data format="bam" name="output" metadata_source="input"/>
     </outputs>
+    <tests>
+        <test>
+            <param name="input" value="bedpeToBamBed1.bed" ftype="bed" />
+            <param name="genome" value="mm9.len"/>
+            <output name="output" file="bedpeToBam_result1.bam" lines_diff="72" ftype="bam" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 Converts feature records to BAM format.
@@ -33,6 +42,7 @@
 BED files must be at least BED4 to create BAM (needs name field).
 
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 closestBed.xml
--- a/closestBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/closestBed.xml Thu Jan 08 14:25:51 2015 -0500
[
b'@@ -6,37 +6,138 @@\n     <expand macro="requirements" />\n     <expand macro="stdio" />\n     <command>\n+<![CDATA[\n+        #set inputBs = \' \'.join( [ str( $file ) for $file in $inputB ] )\n+\n         closestBed\n         $strand\n         $addition\n+        #if $addition2.addition2_select:\n+            -D $addition2.addition2_select\n+            $addition2.iu\n+            $addition2.id\n+        #end if\n+        $io\n+        -mdb $mdb\n         -t $ties\n         -a $inputA\n-        -b $inputB\n-        &gt; $output\n+        -b $inputBs\n+        > $output\n+]]>\n     </command>\n     <inputs>\n         <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>\n-        <param format="bed,gff,vcf,gff3" name="inputB" type="data" label="overlap intervals in this BED/VCF/GFF file?"/>\n+        <param format="bed,gff,vcf,gff3" name="inputB" type="data" multiple="True" label="overlap intervals in this BED/VCF/GFF file?"/>\n \n-        <param name="ties" type="select" label="How ties for closest feature should be handled" help="This occurs when two features in B have exactly the same overlap with a feature in A.">\n+        <param name="ties" type="select"\n+            label="How ties for closest feature should be handled"\n+            help="This occurs when two features in B have exactly the same overlap with a feature in A.">\n             <option value="all" selected="True">all - Report all ties (default)</option>\n             <option value="first">first - Report the first tie that occurred in the B file</option>\n             <option value="last">last - Report the last tie that occurred in the B file</option>\n         </param>\n \n-        <param name="strand" type="boolean" checked="false" truevalue="-s" falsevalue="" label="Force strandedness" help="That is, find the closest feature in B overlaps A on the same strand. By default, this is disabled" />\n-        <param name="addition" type="boolean" checked="false" truevalue="-d" falsevalue="" label="In addition to the closest feature in B, report its distance to A as an extra column. The reported distance for overlapping features will be 0" />\n+        <expand macro="strand2" />\n+\n+        <param name="addition" type="boolean" checked="false" truevalue="-d" falsevalue=""\n+            label="In addition to the closest feature in B, report its distance to A as an extra column" \n+            help="The reported distance for overlapping features will be 0. (-d)" />\n+\n+        <conditional name="addition2">\n+            <param name="addition2_select" type="select" optional="True"\n+                label="Add additional columns to report distance to upstream feature. Distance defintion" \n+                help="Like -d, report the closest feature in B, and its distance to A as an extra column. However unlike -d, use negative distances to report upstream features. (-D)">\n+                <option value="" selected="True">Do not report the distance et all.</option>\n+                <option value="ref">Report distance with respect to the reference genome. B features with a lower (start, stop) are upstream. (-ref)</option>\n+                <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>\n+                <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>\n+            </param>\n+            <when value="ref">\n+                <param name="iu" type="boolean" checked="false" truevalue="-iu" falsevalue=""\n+                    label="Ignore features in B that are upstream of features in A" \n+                    help="This option requires -D and follows its orientation rules for determining what is \'upstream\'. (-iu)" />\n+\n+                <param name="id" type="boolean" checked="false" truevalue="-id" falsevalue=""\n+                    label="Ignore features in B that are downstream of features in A" \n+              '..b'tion rules for determining what is \'downstream\'. (-id)" />\n+            </when>\n+            <when value="b">\n+                <param name="iu" type="boolean" checked="false" truevalue="-iu" falsevalue=""\n+                    label="Ignore features in B that are upstream of features in A" \n+                    help="This option requires -D and follows its orientation rules for determining what is \'upstream\'. (-iu)" />\n+\n+                <param name="id" type="boolean" checked="false" truevalue="-id" falsevalue=""\n+                    label="Ignore features in B that are downstream of features in A" \n+                    help="This option requires -D and follows its orientation rules for determining what is \'downstream\'. (-id)" />\n+            </when>\n+        </conditional>\n+\n+        <param name="io" type="boolean" checked="false" truevalue="-io" falsevalue=""\n+            label="Ignore features in B that overlap A" \n+            help="That is, we want close, yet not touching features only. (-io)" />\n+\n+        <param name="mdb" type="select" optional="True"\n+            label="How multiple databases are resolved" \n+            help="(-mdb)">\n+            <option value="each" selected="True">Report closest records for each database. (-each)</option>\n+            <option value="all">Report closest records among all databases. (-all)</option>\n+        </param>\n     </inputs>\n     <outputs>\n-        <data format_source="inputA" name="output" metadata_source="inputA" label="Intersection of ${inputA.name} and ${inputB.name}"/>\n+        <data format_source="inputA" name="output" metadata_source="inputA" label="Clostest region of ${inputA} in ${inputB}"/>\n     </outputs>\n+    <tests>\n+        <test>\n+            <param name="inputA" value="closestBedA.bed" ftype="bed" />\n+            <param name="inputB" value="closestBedB.bed" ftype="bed" />\n+            <output name="output" file="closestBed_result1.bed" ftype="bed" />\n+        </test>\n+        <test>\n+            <param name="inputA" value="closestBed_a.bed" ftype="bed" />\n+            <param name="inputB" value="closestBed_b1.bed,closestBed_b2.bed" ftype="bed" />\n+            <param name="addition" value="True" />\n+            <output name="output" file="closestBed_result2.bed" ftype="bed" />\n+        </test>\n+        <test>\n+            <param name="inputA" value="closestBed_a.bed" ftype="bed" />\n+            <param name="inputB" value="closestBed_b1.bed,closestBed_b2.bed" ftype="bed" />\n+            <param name="addition" value="True" />\n+            <param name="mdb" value="all" />\n+            <output name="output" file="closestBed_result3.bed" ftype="bed" />\n+        </test>\n+        <test>\n+            <param name="inputA" value="closestBed_c.bed" ftype="bed" />\n+            <param name="inputB" value="closestBed_d.bed" ftype="bed" />\n+            <param name="addition2_select" value="ref" />\n+            <output name="output" file="closestBed_result4.bed" ftype="bed" />\n+        </test>\n+        <test>\n+            <param name="inputA" value="closestBed_c.bed" ftype="bed" />\n+            <param name="inputB" value="closestBed_d.bed" ftype="bed" />\n+            <param name="addition2_select" value="a" />\n+            <output name="output" file="closestBed_result5.bed" ftype="bed" />\n+        </test>\n+    </tests>\n     <help>\n-\n+<![CDATA[\n **What it does**\n \n Similar to intersectBed, closestBed searches for overlapping features in A and B. In the event that no feature in B overlaps the current feature in A, closestBed will report the closest (that is, least genomic distance from the start or end of A) feature in B. For example, one might want to find which is the closest gene to a significant GWAS polymorphism. Note that closestBed will report an overlapping feature as the closest\xe2\x80\x94that is, it does not restrict to closest non-overlapping feature.\n \n+.. image:: $PATH_TO_IMAGES/closest-glyph.png\n+\n+\n @REFERENCES@\n+]]>\n     </help>\n     <expand macro="citations" />\n </tool>\n'
b
diff -r b8348686a0b9 -r 82aac94b06c3 clusterBed.xml
--- a/clusterBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/clusterBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,11 +6,13 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools cluster
         $strand
         -d $distance
         -i $inputA
-        &gt; $output
+        > $output
+]]>
     </command>
     <inputs>
         <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
@@ -21,10 +23,16 @@
             help="Default is 0. That is, overlapping and/or book-ended features are clustered." />
     </inputs>
     <outputs>
-        <data format_source="inputA" name="output" metadata_source="inputA" label=""/>
+        <data format_source="inputA" name="output" metadata_source="inputA"/>
     </outputs>
+    <tests>
+        <test>
+            <param name="inputA" value="mergedBed1.bed" ftype="bed" />
+            <output name="output" file="clusterBed_result.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 Similar to merge, cluster report each set of overlapping or “book-ended” features in an interval file. In contrast to merge, cluster does not flatten the cluster of intervals into a new meta-interval; instead, it assigns an unique cluster ID to each record in each cluster. This is useful for having fine control over how sets of overlapping intervals in a single interval file are combined.
@@ -36,6 +44,7 @@
 bedtools cluster requires that you presort your data by chromosome and then by start position (e.g., sort -k1,1 -k2,2n in.bed > in.sorted.bed for BED files).
 
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 complementBed.xml
--- a/complementBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/complementBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,20 +6,29 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         complementBed
-        -d $distance
-        -g genome
-        &gt; $output
+        -i "$input"
+        -g "$genome"
+        > "$output"
+]]>
     </command>
     <inputs>
-        <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
+        <param format="bed,vcf,gff,gff3" name="input" type="data" label="BED/VCF/GFF file"/>
         <expand macro="genome" />
     </inputs>
     <outputs>
-        <data format_source="inputA" name="output" metadata_source="inputA" label="Complemen of ${inputA.name}"/>
+        <data format_source="input" name="output" metadata_source="input" label="Complemen of ${input.name}"/>
     </outputs>
+    <tests>
+        <test>
+            <param name="input" value="a.bed" ftype="bed" />
+            <param name="genome" value="mm9_chr1.len" />
+            <output name="output" file="complementBed_result1.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 bedtools complement returns all intervals in a genome that are not covered by at least one interval in the input BED/GFF/VCF file.
@@ -27,6 +36,7 @@
 .. image:: $PATH_TO_IMAGES/complement-glyph.png
 
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 coverageBed.xml
--- a/coverageBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/coverageBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,6 +6,7 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         coverageBed
         #if $inputA.ext == "bam"
             -abam '$inputA'
@@ -18,30 +19,34 @@
         $split
         $strandedness
         | sort -k1,1 -k2,2n
-        &gt; '$output'
+        > '$output'
+]]>
     </command>
     <inputs>
-        <param format="bed,bam,gff,gg3,vcf" name="inputA" type="data" label="Count how many intervals in this BED/VCF/GFF/BAM file (source)">
-            <validator type="unspecified_build" />
-        </param>
-        <param format="bed,gff,gff3,vcf" name="inputB" type="data" label="overlap the intervals in this BED file (target)">
-            <validator type="unspecified_build" />
-        </param>
-        <param name="split" type="boolean" checked="false" truevalue="-split" falsevalue="" label="Treat split/spliced BAM or BED12 entries as distinct BED intervals when computing coverage"
-            help="If set, the coverage will be calculated based the spliced intervals only. For BAM files, this inspects the CIGAR N operation to infer the blocks for computing coverage. For BED12 files, this inspects the BlockCount, BlockStarts, and BlockEnds fields (i.e., columns 10,11,12). If this option is not set, coverage will be calculated based on the interval's START/END coordinates, and would include introns in the case of RNAseq data. (-split)" />
+        <param format="bed,bam,gff,gg3,vcf" name="inputA" type="data" label="Count how many intervals in this BED/VCF/GFF/BAM file (source)" />
+        <param format="bed,gff,gff3,vcf" name="inputB" type="data" label="overlap the intervals in this BED file (target)" />
+        <expand macro="split" />
         <param name="strandedness" type="boolean" label="Force strandedness" truevalue="-s" falsevalue="" checked="false" 
             help="That is, only features in A are only counted towards coverage in B if they are the same strand. (-s)"/>
-        <param name="d" type="boolean" checked="false" truevalue="-d" falsevalue="" label="Report the depth at each position in each B feature"
+        <param name="d" type="boolean" checked="false" truevalue="-d" falsevalue=""
+            label="Report the depth at each position in each B feature"
             help="Positions reported are one based.  Each position and depth follow the complete B feature. (-d)" />
-        <param name="hist" type="boolean" checked="false" truevalue="-hist" falsevalue="" label="Report a histogram of coverage for each feature in B as well as a summary histogram for all features in B"
+        <param name="hist" type="boolean" checked="false" truevalue="-hist" falsevalue=""
+            label="Report a histogram of coverage for each feature in B as well as a summary histogram for all features in B"
             help="Additonal columns after each feature in B: 1) depth 2) # bases at depth 3) size of B 4) % of B at depth. (-hist)" />
     </inputs>
-
     <outputs>
-        <data format="bed" name="output" metadata_source="inputB" label="count of overlaps in ${inputA.name} on ${inputB.name}"/>
+        <data format="bed" name="output" metadata_source="inputB" label="Count of overlaps in ${inputA.name} on ${inputB.name}"/>
     </outputs>
+    <tests>
+        <test>
+            <param name="inputA" value="coverageBedA.bed" ftype="bed" />
+            <param name="genome" value="coverageBedB.bed" ftype="bed" />
+            <output name="output" file="coverageBed_result1.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 coverageBed_ computes both the depth and breadth of coverage of features in 
@@ -58,7 +63,7 @@
 The output file will be comprised of each interval from your original target BED file, plus an additional column indicating the number of intervals in your source file that overlapped that target interval.
 
 @REFERENCES@
-
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 expandBed.xml
--- a/expandBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/expandBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,25 +6,40 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools expand
-        -c $cols
-        -i $inputA
-        &gt; $output
+        -c "${cols}"
+        -i "${input}"
+        > "${output}"
+]]>
     </command>
     <inputs>
-        <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
-        <param name="cols" type="text" value="" label="Specify the column(s) (comma separated) that should be summarized" />
+        <param format="bed,vcf,gff,gff3" name="input" type="data" label="BED/VCF/GFF file"/>
+        <expand macro="choose_columns" />
     </inputs>
     <outputs>
-        <data format_source="inputA" name="output" metadata_source="inputA" label=""/>
+        <data name="output" metadata_source="input" format_source="input" />
     </outputs>
+    <tests>
+        <test>
+            <param name="input" value="expandBed1.bed" ftype="bed" />
+            <param name="cols" value="5"/>
+            <output name="output" file="expandBed_result1.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="input" value="expandBed1.bed" ftype="bed" />
+            <param name="cols" value="4,5"/>
+            <output name="output" file="expandBed_result2.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 Replicate lines in a file based on columns of comma-separated values.
 
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 fisherBed.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fisherBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -0,0 +1,54 @@
+<tool id="bedtools_fisher" name="FisherBed" version="@WRAPPER_VERSION@.0">
+    <description></description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <command>
+<![CDATA[
+        bedtools fisher
+        $strand
+        $split
+        -a $inputA
+        -b $inputB
+        -f $overlap
+        -g $genome
+        $reciprocal
+        $m
+        > $output
+]]>
+    </command>
+    <inputs>
+        <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
+        <param format="bed,gff,vcf,gff3" name="inputB" type="data" label="BED/VCF/GFF file"/>
+        <expand macro="genome" />
+        <expand macro="strand2" />
+        <expand macro="split" />
+        <expand macro="overlap" />
+        <expand macro="reciprocal" />
+        <param name="m" type="boolean" checked="False" truevalue="-m" falsevalue=""
+            label="Merge overlapping intervals before looking at overlap" help="(-m)" />
+    </inputs>
+    <outputs>
+        <data name="output" metadata_source="inputA" format_source="inputA" label="Fisher Test on ${inputA.name} and ${inputB.name}"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="inputA" value="fisherBed1.bed" ftype="bed" />
+            <param name="inputB" value="fisherBed2.bed" ftype="bed" />
+            <param name="genome" value="fisherBed.len" ftype="tabular" />
+            <output name="output" file="fisherBed_result1.bed" ftype="bed" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+Perform fisher’s exact test on the number of overlaps/unique intervals between 2 files.
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 flankBed.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/flankBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -0,0 +1,72 @@
+<tool id="bedtools_flankbed" name="FlankBed" version="@WRAPPER_VERSION@.0">
+    <description></description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <command>
+<![CDATA[
+        flankBed
+        $pct
+        $strand
+        -g $genome
+        -i $input
+
+        #if $addition.addition_select == 'b':
+            -b $addition.b
+        #else:
+            -l $addition.l
+            -r $addition.r
+        #end if
+        > $output
+]]>
+    </command>
+    <inputs>
+        <param format="bed,vcf,gff,gff3" name="input" type="data" label="BED/VCF/GFF file"/>
+        <expand macro="genome" />
+        <param name="pct" type="boolean" checked="false" truevalue="-pct" falsevalue=""
+            label="Define -l and -r as a fraction of the feature’s length"
+            help="E.g. if used on a 1000bp feature, -l 0.50, will add 500 bp “upstream”" />
+        <param name="strand" type="boolean" checked="false" truevalue="-s" falsevalue=""
+            label="Define -l and -r based on strand"
+            help="For example. if used, -l 500 for a negative-stranded feature, it will add 500 bp to the end coordinate" />
+        <expand macro="addition" />
+    </inputs>
+    <outputs>
+        <data metadata_source="input" format_source="input" name="output" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="a.bed" ftype="bed" />
+            <param name="genome" value="mm9_chr1.len"/>
+            <param name="addition_select" value="b"/>
+            <param name="b" value="5"/>
+            <output name="output" file="flankBed_result1.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="input" value="a.bed" ftype="bed" />
+            <param name="genome" value="mm9_chr1.len"/>
+            <param name="addition_select" value="lr"/>
+            <param name="l" value="2"/>
+            <param name="r" value="3"/>
+            <output name="output" file="flankBed_result2.bed" ftype="bed" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+bedtools flank will optionally create flanking intervals whose size is user-specified fraction of the original interval.
+
+.. image:: $PATH_TO_IMAGES/flank-glyph.png
+
+.. class:: warningmark
+
+In order to prevent creating intervals that violate chromosome boundaries, bedtools flank requires a genome file defining the length of each chromosome or contig.
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 flankbed.xml
--- a/flankbed.xml Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,49 +0,0 @@
-<tool id="bedtools_flankbed" name="FlankBed" version="@WRAPPER_VERSION@.0">
-    <description></description>
-    <macros>
-        <import>macros.xml</import>
-    </macros>
-    <expand macro="requirements" />
-    <expand macro="stdio" />
-    <command>
-        flankBed
-        $pct
-        $strand
-        -g $genome
-        -i $inputA
-
-        #if $addition.addition_select == 'b':
-            -b $addition.b
-        #else:
-            -l $addition.l
-            -r $addition.r
-        #end if
-
-        &gt; $output
-    </command>
-    <inputs>
-        <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
-        <expand macro="genome" />
-        <param name="pct" type="boolean" checked="false" truevalue="-pct" falsevalue="" label="Define -l and -r as a fraction of the feature’s length" help="E.g. if used on a 1000bp feature, -l 0.50, will add 500 bp “upstream”" />
-        <param name="strand" type="boolean" checked="false" truevalue="-s" falsevalue="" label="Define -l and -r based on strand" help="For example. if used, -l 500 for a negative-stranded feature, it will add 500 bp to the end coordinate" />
-        <expand macro="addition" />
-    </inputs>
-    <outputs>
-        <data format="bed" name="output"  label=""/>
-    </outputs>
-    <help>
-
-**What it does**
-
-bedtools flank will optionally create flanking intervals whose size is user-specified fraction of the original interval.
-
-.. image:: $PATH_TO_IMAGES/flank-glyph.png
-
-.. class:: warningmark
-
-In order to prevent creating intervals that violate chromosome boundaries, bedtools flank requires a genome file defining the length of each chromosome or contig.
-
-@REFERENCES@
-    </help>
-    <expand macro="citations" />
-</tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 genomeCoverageBed.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/genomeCoverageBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -0,0 +1,168 @@
+<tool id="bedtools_genomecoveragebed" name="Genome Coverage" version="@WRAPPER_VERSION@.0">
+    <description>in bedGraph or histogram format</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <command>
+<![CDATA[
+        bedtools genomecov
+        #if $input.ext == "bam"
+            -ibam '$input'
+        #else
+            -i '$input'
+            -g $genome
+        #end if
+
+        $split
+        $strand
+
+        #if str($report.report_select) == "bg":
+            #if $zero_regions.value:
+                $zero_regions
+            #else:
+                -bg
+            #end if
+
+            #if str($scale):
+              -scale $scale
+            #end if
+        #else:
+            #if str($report.max):
+              -max $report.max
+            #end if
+        #end if
+        $d
+        $dz
+        $five
+        $three
+
+        > '$output'
+]]>
+    </command>
+    <inputs>
+        <param format="bed,bam" name="input" type="data" label="The BAM or BED file from which coverage should be computed">
+              <validator type="unspecified_build" />
+        </param>
+        <conditional name="report">
+            <param name="report_select" type="select" label="Output type">
+                <option value="bg" selected="true">BedGraph coverage file</option>
+                <option value="hist">Data suiteable for Histogram</option>
+            </param>
+            <when value="bg">
+                <param name="zero_regions" type="boolean" checked="False" truevalue="-bga" falsevalue=""
+                    label="Report regions with zero coverage" help="If set, regions without any coverage will also be reported.  (-bga)" />
+                <param name="scale" type="float" value="1.0"
+                    label="Scale the coverage by a constant factor"
+                    help="Each bedGraph coverage value is multiplied by this factor before being reported. Useful for normalizing coverage by, e.g., reads per million (RPM). (-scale)"/>
+            </when>
+            <when value="hist">
+                <param name="max" type="integer" label="Specify max depth" value="0"
+                    help="Combine all positions with a depth >= max into a single bin in the histogram. (-max)"/>
+            </when>
+        </conditional>
+        <expand macro="genome" />
+        <expand macro="split" />
+        <param name="strand" type="select" label="Calculate coverage based on" help="(-strand)">
+            <option value="">both strands combined</option>
+            <option value="-strand +">positive strand only</option>
+            <option value="-strand -">negative strand only</option>
+        </param>
+
+        <param name="d" type="boolean" checked="False" truevalue="-d" falsevalue=""
+            label="Report the depth at each genome position with 1-based coordinates" help="(-d)" />
+        <param name="dz" type="boolean" checked="False" truevalue="-dz" falsevalue=""
+            label="Report the depth at each genome position with 0-based coordinatess" help="(-dz)" />
+        <param name="five" type="boolean" checked="False" truevalue="-d" falsevalue=""
+            label="Calculate coverage of 5’ positions" help="Instead of entire interval. (-5)" />
+        <param name="three" type="boolean" checked="False" truevalue="-3" falsevalue=""
+            label="Calculate coverage of 3’ positions" help="Instead of entire interval. (-3)" />
+    </inputs>
+    <outputs>
+        <data format="bedgraph" name="output">
+            <change_format>
+                <when input="report.report_select" value="hist" format="tabular" />
+            </change_format>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="genomeCoverageBed1.bed" ftype="bed" />
+            <param name="genome" value="genomeCoverageBed1.len" />
+            <param name="report_select" value="hist" />
+            <output name="output" file="genomeCoverageBed_result1.bed" ftype="tabular" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+This tool calculates the genome-wide coverage of intervals defined in a BAM or BED file and reports them in BedGraph format.
+
+.. image:: $PATH_TO_IMAGES/genomecov-glyph.png
+
+.. class:: warningmark
+
+The input BED or BAM file must be sorted by chromosome name (but doesn't necessarily have to be sorted by start position).
+
+-----
+
+**Example 1**
+
+Input (BED format)-
+Overlapping, un-sorted intervals::
+
+    chr1    140 176
+    chr1    100 130
+    chr1    120 147
+
+
+Output (BedGraph format)-
+Sorted, non-overlapping intervals, with coverage value on the 4th column::
+
+    chr1    100 120 1
+    chr1    120 130 2
+    chr1    130 140 1
+    chr1    140 147 2
+    chr1    147 176 1
+
+-----
+
+**Example 2 - with ZERO-Regions selected (assuming hg19)**
+
+Input (BED format)-
+Overlapping, un-sorted intervals::
+
+    chr1    140 176
+    chr1    100 130
+    chr1    120 147
+
+
+BedGraph output will contain five columns:
+
+    * 1. Chromosome name (or 'genome' for whole-genome coverage)
+    * 2. Coverage depth
+    * 3. The number of bases on chromosome (or genome) with depth equal to column 2.
+    * 4. The size of chromosome (or entire genome) in base pairs
+    * 5. The fraction of bases on chromosome (or entire genome) with depth equal to column 2.
+
+**Example Output**:
+    
+    chr2L       0           1379895     23011544    0.0599653
+    chr2L       1           837250      23011544    0.0363839
+    chr2L       2           904442      23011544    0.0393038
+    chr2L       3           913723      23011544    0.0397072
+    chr2L       4           952166      23011544    0.0413778
+    chr2L       5           967763      23011544    0.0420555
+    chr2L       6           986331      23011544    0.0428624
+    chr2L       7           998244      23011544    0.0433801
+    chr2L       8           995791      23011544    0.0432735
+    chr2L       9           996398      23011544    0.0432999
+
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 genomeCoverageBed_bedgraph.xml
--- a/genomeCoverageBed_bedgraph.xml Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,106 +0,0 @@
-<tool id="bedtools_genomecoveragebed_bedgraph" name="Create a BedGraph of genome coverage" version="@WRAPPER_VERSION@.0">
-    <description>
-    </description>
-    <macros>
-        <import>macros.xml</import>
-    </macros>
-    <expand macro="requirements" />
-    <expand macro="stdio" />
-    <command>
-        genomeCoverageBed
-        #if $input.ext == "bam"
-            -ibam '$input'
-        #else
-            -i '$input'
-            -g ${chromInfo}
-        #end if
-        
-        #if str($scale):
-          -scale $scale
-        #end if
-
-        -bg
-        $zero_regions
-        $split
-        $strand
-        &gt; '$output'
-    </command>
-    <inputs>
-        <param format="bed,bam" name="input" type="data" label="The BAM or BED file from which coverage should be computed">
-              <validator type="unspecified_build" />
-        </param>
-
-        <param name="zero_regions" type="boolean" checked="true" truevalue="-bga" falsevalue="" label="Report regions with zero coverage" help="If set, regions without any coverage will also be reported." />
-
-        <param name="split" type="boolean" checked="false" truevalue="-split" falsevalue="" label="Treat split/spliced BAM or BED12 entries as distinct BED intervals when computing coverage." help="If set, the coverage will be calculated based the spliced intervals only. For BAM files, this inspects the CIGAR N operation to infer the blocks for computing coverage. For BED12 files, this inspects the BlockCount, BlockStarts, and BlockEnds fields (i.e., columns 10,11,12). If this option is not set, coverage will be calculated based on the interval's START/END coordinates, and would include introns in the case of RNAseq data." />
-
-        <param name="strand" type="select" label="Calculate coverage based on">
-            <option value="">both strands combined</option>
-            <option value="-strand +">positive strand only</option>
-            <option value="-strand -">negative strand only</option>
-        </param>
-
-        <param name="scale" type="float" optional="true" label="Scale the coverage by a constant factor" help="Each BEDGRAPH coverage value is multiplied by this factor before being reported. Useful for normalizing coverage by, e.g., reads per million (RPM)"/>
-    </inputs>
-    <outputs>
-        <data format="bedgraph" name="output"  metadata_source="input" label="${input.name} (Genome Coverage BedGraph)" />
-    </outputs>
-    <help>
-
-
-**What it does**
-
-This tool calculates the genome-wide coverage of intervals defined in a BAM or BED file and reports them in BedGraph format.
-
-.. class:: warningmark
-
-The input BED or BAM file must be sorted by chromosome name (but doesn't necessarily have to be sorted by start position).
-
------
-
-**Example 1**
-
-Input (BED format)-
-Overlapping, un-sorted intervals::
-
-    chr1    140 176
-    chr1    100 130
-    chr1    120 147
-
-
-Output (BedGraph format)-
-Sorted, non-overlapping intervals, with coverage value on the 4th column::
-
-    chr1    100 120 1
-    chr1    120 130 2
-    chr1    130 140 1
-    chr1    140 147 2
-    chr1    147 176 1
-
------
-
-**Example 2 - with ZERO-Regions selected (assuming hg19)**
-
-Input (BED format)-
-Overlapping, un-sorted intervals::
-
-    chr1    140 176
-    chr1    100 130
-    chr1    120 147
-
-
-Output (BedGraph format)-
-Sorted, non-overlapping intervals, with coverage value on the 4th column::
-
-    chr1    0 100 0
-    chr1    100 120 1
-    chr1    120 130 2
-    chr1    130 140 1
-    chr1    140 147 2
-    chr1    147 176 1
-    chr1    176 249250621 0
-
-@REFERENCES@
-    </help>
-    <expand macro="citations" />
-</tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 genomeCoverageBed_histogram.xml
--- a/genomeCoverageBed_histogram.xml Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,68 +0,0 @@
-<tool id="bedtools_genomecoveragebed_histogram" name="Create a histogram of genome coverage" version="@WRAPPER_VERSION@.0">
-    <description>
-    </description>
-    <macros>
-        <import>macros.xml</import>
-    </macros>
-    <expand macro="requirements" />
-    <expand macro="stdio" />
-    <command>
-    genomeCoverageBed
-        #if $input.ext == "bam"
-            -ibam '$input'
-        #else
-            -i '$input'
-            -g ${chromInfo}
-        #end if
-        #if str($max):
-          -max $max
-        #end if
-        &gt; '$output'
-    </command>
-
-    <inputs>
-        <param format="bed,bam" name="input" type="data" label="The BAM or BED file from which coverage should be computed"></param>
-        <param name="max" type="text" optional="true" label="Max depth" help="Combine all positions with a depth >= max into a single bin in the histogram."/>
-    </inputs>
-
-    <outputs>
-        <data format="tabular" name="output"  metadata_source="input" label="${input.name} (Genome Coverage Histogram)" />
-    </outputs>
-
-<help>
-**What it does**
-
-This tool calculates a histogram of genome coverage depth based on mapped reads in BAM format or intervals in BED format.
-
-
-------
-
-
-.. class:: infomark
-
-The output file will contain five columns:
-
-    * 1. Chromosome name (or 'genome' for whole-genome coverage)
-    * 2. Coverage depth
-    * 3. The number of bases on chromosome (or genome) with depth equal to column 2.
-    * 4. The size of chromosome (or entire genome) in base pairs
-    * 5. The fraction of bases on chromosome (or entire genome) with depth equal to column 2.
-
-**Example Output**::
-    
-    chr2L       0           1379895     23011544    0.0599653
-    chr2L       1           837250      23011544    0.0363839
-    chr2L       2           904442      23011544    0.0393038
-    chr2L       3           913723      23011544    0.0397072
-    chr2L       4           952166      23011544    0.0413778
-    chr2L       5           967763      23011544    0.0420555
-    chr2L       6           986331      23011544    0.0428624
-    chr2L       7           998244      23011544    0.0433801
-    chr2L       8           995791      23011544    0.0432735
-    chr2L       9           996398      23011544    0.0432999
-
-
-@REFERENCES@
-    </help>
-    <expand macro="citations" />
-</tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 getfastaBed.xml
--- a/getfastaBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/getfastaBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,30 +6,59 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools getfasta
         $name
         $tab
         $strand
         $split
         -fi $fasta 
-        -bed $inputA
+        -bed $input
         -fo $output
+]]>
     </command>
     <inputs>
-        <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file" />
+        <param format="bed,vcf,gff,gff3" name="input" type="data" label="BED/VCF/GFF file" />
         <param format="fasta" name="fasta" type="data" label="Fasta file" />
-        <param name="name" type="boolean" checked="false" truevalue="-name" falsevalue="" label="Use the “name” column in the BED file for the FASTA headers in the output FASTA file" />
-        <param name="tab" type="boolean" checked="false" truevalue="-tab" falsevalue="" label="Report extract sequences in a tab-delimited format instead of in FASTA format" />
-        <param name="strand" type="boolean" checked="false" truevalue="-s" falsevalue="" label="Force strandedness" help="If the feature occupies the antisense strand, the sequence will be reverse complemented." />
-        <param name="split" type="boolean" checked="false" truevalue="-split" falsevalue="" label="Given BED12 input, extract and concatenate the sequences from the BED 'blocks' (e.g., exons)" />
+        <param name="name" type="boolean" checked="false" truevalue="-name" falsevalue=""
+            label="Use the 'name' column in the BED file for the FASTA headers in the output FASTA file"
+            help="(-name)" />
+        <param name="tab" type="boolean" checked="false" truevalue="-tab" falsevalue=""
+            label="Report extract sequences in a tab-delimited format instead of in FASTA format"
+            help="(-tab)" />
+        <param name="strand" type="boolean" checked="false" truevalue="-s" falsevalue=""
+            label="Force strandedness"
+            help="If the feature occupies the antisense strand, the sequence will be reverse complemented. (-s)" />
+        <expand macro="split" />
     </inputs>
     <outputs>
-        <data format="fasta" name="output" />
+        <data format="fasta" name="output">
+            <change_format>
+                <when input="tab" value="-tab" format="tabular" />
+            </change_format>
+        </data>
     </outputs>
+    <tests>
+        <test>
+            <param name="input" value="nucBed1.bed" ftype="bed" />
+            <param name="fasta" value="nucBed1.fasta" ftype="fasta" />
+            <param name="tab" value="False" />
+            <param name="split" value="False" />
+            <output name="output" file="getfastaBed_result1.bed" ftype="fasta" />
+        </test>
+        <test>
+            <param name="input" value="nucBed1.bed" ftype="bed" />
+            <param name="fasta" value="nucBed1.fasta" ftype="fasta" />
+            <param name="tab" value="True" />
+            <param name="split" value="False" />
+            <output name="output" file="getfastaBed_result2.tabular" ftype="tabular" />
+        </test>
+    </tests>
     <help>
+<![CDATA[
 **What it does**
 
-bedtools getfasta will extract the sequence defined by the coordinates in a BED interval and create a new FASTA entry in the output file for each extracted sequence. By default, the FASTA header for each extracted sequence will be formatted as follows: “&lt;chrom>:&lt;start>-&lt;end>”.
+bedtools getfasta will extract the sequence defined by the coordinates in a BED interval and create a new FASTA entry in the output file for each extracted sequence. By default, the FASTA header for each extracted sequence will be formatted as follows: “>chrom>:&lt;start>-&lt;end>”.
 
 .. image:: $PATH_TO_IMAGES/getfasta-glyph.png
 
@@ -40,6 +69,7 @@
 2. You can use the UNIX fold command to set the line width of the FASTA output. For example, fold -w 60 will make each line of the FASTA file have at most 60 nucleotides for easy viewing.
 
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 groupbyBed.xml
--- a/groupbyBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/groupbyBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,23 +6,31 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools groupby
-        -c $cols
+        -c "${cols}"
         -g $group
         -o $operation
-        -i $inputA
-        &gt; $output
+        -i "${inputA}"
+        > "${output}"
+]]>
     </command>
     <inputs>
-        <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
-        <param name="cols" type="text" value="" label="Specify the column(s) (comma separated) that should be summarized" />
-        <param name="group" type="text" value="1,2,3" label="Specifies which column(s) (1-based) should be used to group the input. Columns may be comma-separated with each column must be explicitly listed. Or, ranges (e.g. 1-4) are also allowed." />
-        <param name="operation" type="select" label="Specify the operation">
+        <param format="bed" name="inputA" type="data" label="BED file"/>
+        <expand macro="choose_columns" />
+        <param name="group" type="text" value="1,2,3" 
+            label="Specifies which column(s) (1-based) should be used to group the input"
+            help="Columns may be comma-separated with each column must be explicitly listed. Or, ranges (e.g. 1-4) are also allowed. (-g)">
+            <sanitizer invalid_char="">
+                <valid initial="string.digits"><add value=","/><add value="-"/></valid>
+            </sanitizer>
+        </param>
+        <param name="operation" type="select" label="Specify the operation" help="(-o)">
             <option value="sum" selected="True">Sum - numeric only</option>
             <option value="stdev">Stdev - numeric only</option>
             <option value="sstdev">Sstdev - numeric only</option>
-            <option value="freqasc">Freqasc - print a comma separated list of values observed and the number of times they were observed. Reported in ascending order of frequency*</option>
-            <option value="freqdesc">Freqdesc - - print a comma separated list of values observed and the number of times they were observed. Reported in descending order of frequency*</option>
+            <option value="freqasc">Freqasc - comma separated list of values observed and the number of times they were observed (ascending)</option>
+            <option value="freqdesc">Freqdesc - comma separated list of values observed and the number of times they were observed (descending)</option>
             <option value="first">First - numeric or text</option>
             <option value="last">Last - numeric or text</option>
             <expand macro="math_options" />
@@ -30,15 +38,39 @@
         </param>
     </inputs>
     <outputs>
-        <data format_source="inputA" name="output" metadata_source="inputA" label=""/>
+        <data format_source="inputA" name="output" metadata_source="inputA"/>
     </outputs>
+    <tests>
+        <test>
+            <param name="inputA" value="groupbyBed1.bed" ftype="bed" />
+            <param name="cols" value="9" />
+            <param name="group" value="1,2,3" />
+            <param name="operation" value="sum" />
+            <output name="output" file="groupbyBed_result1.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="groupbyBed1.bed" ftype="bed" />
+            <param name="cols" value="9" />
+            <param name="group" value="1,2,3" />
+            <param name="operation" value="min" />
+            <output name="output" file="groupbyBed_result2.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="groupbyBed1.bed" ftype="bed" />
+            <param name="cols" value="9" />
+            <param name="group" value="1-4" />
+            <param name="operation" value="median" />
+            <output name="output" file="groupbyBed_result3.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 Replicate lines in a file based on columns of comma-separated values.
 
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 intersectBed.xml
--- a/intersectBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/intersectBed.xml Thu Jan 08 14:25:51 2015 -0500
[
b'@@ -6,65 +6,92 @@\n     <expand macro="requirements" />\n     <expand macro="stdio" />\n     <command>\n-        intersectBed\n-        #if $inputA.ext == "bam":\n-            -abam $inputA\n-        #else:\n-            -a $inputA\n-        #end if\n+<![CDATA[\n+        #set inputBs = \'" "\'.join( [ str( $file ) for $file in $inputB ] )\n+        #set modes = \' \'.join( str($overlap_mode).split(\',\') )\n+\n+        bedtools intersect\n+            #if $inputA.ext == "bam":\n+                -abam "${inputA}"\n+            #else:\n+                -a "${inputA}"\n+            #end if\n \n-        -b $inputB\n-        $split\n-        $strand\n-        #if str($fraction):\n-          -f $fraction\n-        #end if\n-        $reciprocal\n-        $invert\n-        $once\n-        $header\n-        $overlap_mode\n-        &gt; $output\n+            -b "${inputBs}"\n+            $split\n+            $strand\n+            #if str($fraction) != "None" and str($fraction):\n+              -f "${fraction}"\n+            #end if\n+            $reciprocal\n+            $invert\n+            $once\n+            $header\n+            $modes\n+            > "${output}"\n+]]>\n     </command>\n     <inputs>\n         <param format="bed,bam,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF/BAM file"/>\n-        <param format="bed,gff,vcf,gff3" name="inputB" type="data" label="overlap intervals in this BED file?"/>\n-\n-        <param name="strand" type="select" label="Calculate the intersection based on strandedness?">\n-            <option value="" selected="True">Overlaps on either strand</option>\n-            <option value="-s">Only overlaps occurring on the **same** strand.</option>\n-            <option value="-S">Only overlaps occurring on the **opposite** strand.</option>\n-        </param>\n-\n-        <param name="overlap_mode" type="select" label="What should be written to the output file?">\n-            <option value="-wa" selected="True">Write the original entry in A for each overlap.</option>\n-            <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.</option>\n-            <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.</option>\n-            <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.</option>\n-            <option value="-loj">Perform a "left outer join". That is, for each feature in A report each overlap with B.  If no overlaps are found, report a NULL feature for B.</option>\n+        <param format="bed,bam,gff,vcf,gff3" name="inputB" type="data" multiple="True" label="One or more BAM/BED/GFF/VCF file(s)"/>\n+        <expand macro="strand2" />\n+        <param name="overlap_mode" type="select" multiple="True" label="What should be written to the output file?">\n+            <option value="-wa" selected="True">Write the original entry in A for each overlap (-wa)</option>\n+            <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>\n+            <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>\n+            <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>\n+            <option v'..b'he above fraction of both the alignment and the BED interval. (-r)" />\n+        <expand macro="reciprocal" />\n         <!-- -v -->\n-        <param name="invert" type="boolean" checked="false" truevalue="-v" falsevalue="" label="Report only those alignments that **do not** overlap the BED file. (-v)"/>\n+        <param name="invert" type="boolean" checked="false" truevalue="-v" falsevalue=""\n+            label="Report only those alignments that **do not** overlap the BED file"\n+            help="(-v)"/>\n         <!-- -u -->\n-        <param name="once" type="boolean" checked="false" truevalue="-u" falsevalue="" label="Write the original A entry _once_ if _any_ overlaps found in B." help="Just report the fact >=1 hit was found. (-u)" />\n+        <param name="once" type="boolean" checked="false" truevalue="-u" falsevalue=""\n+            label="Write the original A entry _once_ if _any_ overlaps found in B."\n+            help="Just report the fact >=1 hit was found. (-u)" />\n         <!-- -c -->\n-        <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)" />\n-        <!-- header -->\n-        <param name="header" type="boolean" checked="false" truevalue="-header" falsevalue="" label="Print the header from the A file prior to results." />\n-        <!-- header -->\n-        <param name="header" type="boolean" checked="false" truevalue="-header" falsevalue="" label="Print the header from the A file prior to results." />\n+        <param name="count" type="boolean" checked="false" truevalue="-c" falsevalue=""\n+            label="For each entry in A, report the number of overlaps with B."\n+            help="Reports 0 for A entries that have no overlap with B. (-c)" />\n+        <expand macro="print_header" />\n     </inputs>\n     <outputs>\n-        <data format_source="inputA" name="output" metadata_source="inputA" label="Intersection of ${inputA.name} and ${inputB.name}"/>\n+        <data format_source="inputA" name="output" metadata_source="inputA"/>\n     </outputs>\n+    <tests>\n+        <test>\n+            <param name="inputA" value="intersectBed1.bed" ftype="bed" />\n+            <param name="inputB" value="intersectBed2.bed" ftype="bed" />\n+            <param name="overlap_mode" value="-wa" />\n+            <param name="split" value="False" />\n+            <output name="output" file="intersectBed_result1.bed" ftype="bed" />\n+        </test>\n+        <test>\n+            <param name="inputA" value="intersectBed1.bed" ftype="bed" />\n+            <param name="inputB" value="intersectBed2.bed" ftype="bed" />\n+            <param name="overlap_mode" value="-wa,-wb" />\n+            <param name="split" value="False" />\n+            <output name="output" file="intersectBed_result2.bed" ftype="bed" />\n+        </test>\n+        <test>\n+            <param name="inputA" value="intersectBed1.bed" ftype="bed" />\n+            <param name="inputB" value="intersectBed2.bed" ftype="bed" />\n+            <param name="invert" value="True" />\n+            <param name="split" value="False" />\n+            <output name="output" file="intersectBed_result3.bed" ftype="bed" />\n+        </test>\n+    </tests>\n     <help>\n-\n+<![CDATA[\n **What it does**\n \n By far, the most common question asked of two sets of genomic features is whether or not any of the features in the two sets \xe2\x80\x9coverlap\xe2\x80\x9d with one another. This is known as feature intersection. bedtools intersect allows one to screen for overlaps between two sets of genomic features. Moreover, it allows one to have fine control as to how the intersections are reported. bedtools intersect works with both BED/GFF/VCF and BAM files as input.\n@@ -80,7 +107,7 @@\n Note that a BAM alignment will be sent to the output file **once** even if it overlaps more than one interval in the BED file.\n \n @REFERENCES@\n-\n+]]>\n     </help>\n     <expand macro="citations" />\n </tool>\n'
b
diff -r b8348686a0b9 -r 82aac94b06c3 jaccardBed.xml
--- a/jaccardBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/jaccardBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,29 +6,44 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools jaccard
-        
-        $reciprocal
-        $strand
-        $split
-        -f $overlap 
-        -a $inputA
-        -b $inputB
-        &gt; $output
+            $strand
+            $split
+            $reciprocal
+            -f $overlap
+            -a $inputA
+            -b $inputB
+            > $output
+]]>
     </command>
     <inputs>
         <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
         <param format="bed,vcf,gff,gff3" name="inputB" type="data" label="BED/VCF/GFF file"/>
-        <param name="overlap" type="float" value="0.000000001" label="Minimum overlap required as a fraction of A" />
-
-        <param name="reciprocal" type="boolean" checked="false" truevalue="-f" falsevalue="" label="Require that the fraction of overlap be reciprocal for A and B. 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" />
-        <param name="tab" type="boolean" checked="false" truevalue="-tab" falsevalue="" label="Report extract sequences in a tab-delimited format instead of in FASTA format." />
-    <param name="strand" type="boolean" checked="false" truevalue="-s" falsevalue="" label="Force strandedness" help="That is, only report hits in B that overlap A on the same strand. By default, overlaps are reported without respect to strand" />
+        <expand macro="overlap" />
+        <expand macro="reciprocal" />
+        <param name="strand" type="boolean" checked="false" truevalue="-s" falsevalue="" 
+            label="Force strandedness"
+            help="That is, only report hits in B that overlap A on the same strand. By default, overlaps are reported without respect to strand. (-s)" />
         <expand macro="strand2" />
+        <expand macro="split" />
     </inputs>
     <outputs>
         <data format_source="inputA" name="output" metadata_source="inputA" label="Intersection of ${inputA.name} and ${inputB.name}" />
     </outputs>
+    <tests>
+        <test>
+            <param name="inputA" value="jaccardBed1.bed" ftype="bed" />
+            <param name="inputB" value="jaccardBed2.bed" ftype="bed" />
+            <output name="output" file="jaccardBed_result1.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="jaccardBed1.bed" ftype="bed" />
+            <param name="inputB" value="jaccardBed2.bed" ftype="bed" />
+            <param name="overlap" value="0.1" />
+            <output name="output" file="jaccardBed_result2.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
 
 **What it does**
b
diff -r b8348686a0b9 -r 82aac94b06c3 linksBed.xml
--- a/linksBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/linksBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,29 +6,49 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
-        linksBed
-        -base $basename
-        -org $org
-        -db $db
-        -i $inputA
-        &gt; $output
+<![CDATA[
+        bedtools links
+            -base "${basename}"
+            -org "${org}"
+            -db "${db}"
+            -i "${input}"
+            > "${output}"
+]]>
     </command>
     <inputs>
-        <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
-        <param name="basename" type="text" value="http://genome.ucsc.edu" label="The “basename” for the UCSC browser" />
-        <param name="org" type="text" value="human" label="The organism (e.g. mouse, human)" />
-        <param name="db" type="text" value="hg18" label="The genome build" />
+        <param format="bed,vcf,gff,gff3" name="input" type="data" label="BED/VCF/GFF file"/>
+        <param name="basename" type="text" value="http://genome.ucsc.edu"
+            label="The 'basename' for the UCSC genome browser" />
+        <param name="org" type="text" value="human" label="Organism name" help="e.g. mouse, human (-org)" />
+        <param name="db" type="text" value="hg19" label="The genome build" help="(-db)"/>
     </inputs>
     <outputs>
         <data name="output" format="html" />
     </outputs>
+    <tests>
+        <test>
+            <param name="input" value="linksBed1.bed" ftype="bed" />
+            <param name="basename" value="http://genome.ucsc.edu" />
+            <param name="org" value="" />
+            <param name="db" value="" />
+            <output name="output" file="linksBed_result1.html" lines_diff="2" ftype="html" />
+        </test>
+        <test>
+            <param name="input" value="linksBed1.bed" ftype="bed" />
+            <param name="basename" value="http://genome.ucsc.edu" />
+            <param name="org" value="mouse" />
+            <param name="db" value="mm9" />
+            <output name="output" file="linksBed_result2.html" lines_diff="2" ftype="html" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 Creates an HTML file with links to an instance of the UCSC Genome Browser for all features / intervals in a file. This is useful for cases when one wants to manually inspect through a large set of annotations or features.
 
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 macros.xml
--- a/macros.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/macros.xml Thu Jan 08 14:25:51 2015 -0500
[
b'@@ -1,11 +1,12 @@\n <macros>\n     <xml name="requirements">\n         <requirements>\n-            <requirement type="package" version="2.19.1">bedtools</requirement>\n+            <requirement type="package" version="2.22">bedtools</requirement>\n+            <yield/>\n         </requirements>\n         <version_command>bedtools --version</version_command>\n     </xml>\n-    <token name="@WRAPPER_VERSION@">2.19</token>\n+    <token name="@WRAPPER_VERSION@">2.22</token>\n     <xml name="stdio">\n         <stdio>\n             <!-- Anything other than zero is an error -->\n@@ -16,9 +17,13 @@\n             <regex match="Exception:" />\n         </stdio>\n     </xml>\n-\n+    <xml name="reciprocal">\n+        <param name="reciprocal" type="boolean" checked="false" truevalue="-r" falsevalue=""\n+            label="Require that the fraction of overlap be reciprocal for A and B"\n+            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)" />\n+    </xml>\n     <xml name="overlap">\n-        <param name="overlap" type="float" value="0.000000001" label="Minimum overlap required as a fraction of A" />\n+        <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)"/>\n     </xml>\n     <xml name="strand2">\n         <param name="strand" type="select" label="Calculation based on strandedness?">\n@@ -29,19 +34,24 @@\n     </xml>\n     <xml name="seed">\n         <conditional name="seed">\n-            <param name="choose" type="boolean" label="Choose Seed?" selected="False" truevalue="True" falsevalue="False" />\n+            <param name="seed_choose" type="select" label="Choose Seed?" help="(-seed)">\n+                <option value="False" selected="True">Random Shuffling</option>\n+                <option value="True">Choose fixed seed</option>\n+            </param>\n             <when value="True">\n                 <param name="seed" type="integer" value="12345" label="Enter Seed" />\n             </when>\n+            <when value="False" />\n         </conditional>\n     </xml>\n     <xml name="split">\n-        <param name="split" type="boolean" checked="true" truevalue="-split" falsevalue="" \n+        <param name="split" type="boolean" checked="false" truevalue="-split" falsevalue="" \n             label="Treat split/spliced BAM or BED12 entries as distinct BED intervals when computing coverage." \n-            help="If set, the coverage will be calculated based the spliced intervals only. For BAM files, this inspects the CIGAR N operation to infer the blocks for computing coverage. For BED12 files, this inspects the BlockCount, BlockStarts, and BlockEnds fields (i.e., columns 10,11,12). If this option is not set, coverage will be calculated based on the interval\'s START/END coordinates, and would include introns in the case of RNAseq data." />\n+            help="If set, the coverage will be calculated based the spliced intervals only. For BAM files, this inspects the CIGAR N operation to infer the blocks for computing coverage. For BED12 files, this inspects the BlockCount, BlockStarts, and BlockEnds fields (i.e., columns 10,11,12). If this option is not set, coverage will be calculated based on the interval\'s START/END coordinates, and would include introns in the case of RNAseq data. (-split)" />\n     </xml>\n     <xml name="genome">\n-        <param format="bed,vcf,gff,gff3" name="genome" type="data" label="Genome file" />\n+        <param format="tabular" name="genome" type="data" label="Genome file" />\n+        <!--TODO: make use of: ${chromInfo} -->\n     </xml>\n     <xml name="addition">\n         <conditional name="addition">\n@@ -50,30 +60,61 @@\n                 <option value="lr">Increase by Start Coordinate and End Coordinate</option>\n             </param>\n             <when value="b">\n-                <param name="b" label="Give Value" type="integer" value="0"  />\n+              '..b'                <param name="r" type="integer" value="0" label="The number of base pairs to add to the end coordinate" />\n             </when>\n         </conditional>\n     </xml>\n+    <xml name="print_header">\n+        <param name="header" type="boolean" checked="False" truevalue="-header" falsevalue=""\n+            label="Print the header from the A file prior to results" help="(-header)" />\n+    </xml>\n+    <!-- TODO this is currently not used, but we should make use of it -->\n+    <xml name="genome_validator">\n+        <validator type="unspecified_build" />\n+        <validator type="dataset_metadata_in_data_table" table_name="fasta_indexes" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." />\n+    </xml>\n+\n+    <!-- ToDo column_picker -->\n+    <xml name="choose_columns">\n+        <param name="cols" type="text" value=""\n+            label="Specify the column(s) (comma separated) that should be summarized"\n+            help="(-c)">\n+            <sanitizer invalid_char="">\n+                <valid initial="string.digits"><add value=","/></valid>\n+            </sanitizer>\n+        </param>\n+    </xml>\n+\n+    <xml name="choose_operations">\n+        <param name="operation" type="select" label="Specify the operation">\n+            <yield />\n+        </param>\n+    </xml>\n+\n     <xml name="math_options">\n-            <option value="min">Min - numeric only</option>\n-            <option value="max">Max - numeric only</option>\n-             <option value="mean">Mean - numeric only</option>\n-            <option value="median">Median - numeric only</option>\n-            <option value="mode">Mode - numeric only</option>\n-            <option value="antimode">Antimode - numeric only</option>\n-            <option value="collapse">collapse (i.e., print a comma separated list) - numeric or text</option>\n-       </xml>\n+        <option value="sum" selected="True">Sum - numeric only</option>\n+        <option value="min">Min - numeric only</option>\n+        <option value="max">Max - numeric only</option>\n+        <option value="absmin">AbsMin - numeric only</option>\n+        <option value="absmax">AbsMax - numeric only</option>\n+        <option value="mean">Mean - numeric only</option>\n+        <option value="median">Median - numeric only</option>\n+        <option value="mode">Mode - numeric only</option>\n+        <option value="antimode">Antimode - numeric only</option>\n+        <option value="collapse">collapse (i.e., print a comma separated list) - numeric or text</option>\n+    </xml>\n     <xml name="additional_math_options">\n-            <option value="count">Count - numeric or text</option>\n-            <option value="count_disctinct">Count Distinct - numeric or text</option>\n-            <option value="distinct">distinct (i.e., print a comma separated list) - numeric or text</option>\n-            <option value="concat">concat (i.e., print a comma separated list) - numeric or text</option>\n+        <option value="count">Count - numeric or text</option>\n+        <option value="count_disctinct">Count Distinct - numeric or text</option>\n+        <option value="distinct">distinct (i.e., print a comma separated list) - numeric or text</option>\n+        <option value="concat">concat (i.e., print a comma separated list) - numeric or text</option>\n     </xml>\n     <token name="@REFERENCES@">\n+<![CDATA[\n ------\n \n This tool is part of the `bedtools package`_ from the `Quinlan laboratory`_.\n@@ -81,10 +122,18 @@\n .. _bedtools package: https://github.com/arq5x/bedtools2\n .. _Quinlan laboratory: http://cphg.virginia.edu/quinlan/\n \n+\n+**Citation**\n+\n+If you use this tool in Galaxy, please cite:\n+\n+Bjoern A. Gruening (2014), `Galaxy wrapper <https://github.com/bgruening/galaxytools>`_\n+]]>\n     </token>\n     <xml name="citations">\n         <citations>\n             <citation type="doi">10.1093/bioinformatics/btq033</citation>\n+            <yield />\n         </citations>\n     </xml>\n </macros>\n'
b
diff -r b8348686a0b9 -r 82aac94b06c3 makeWindowsBed.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/makeWindowsBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -0,0 +1,125 @@
+<tool id="bedtools_makewindowsbed" name="MakeWindowsBed" version="@WRAPPER_VERSION@.0">
+    <description></description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <command>
+<![CDATA[
+        bedtools makewindows
+        #if $type.type_select == 'genome':
+            -g $type.genome
+        #else:
+            -b $type.input
+        #end if
+        #if $action.action_select == 'windowsize':
+            -w $action.windowsize
+            #if $action.step_size.step_size_select == 'yes':
+                -s $action.step_size.step_size
+            #end if
+        #else:
+            -n $action.number
+            -s $action.step_size
+        #end if
+        $sourcename
+        > $output
+]]>
+    </command>
+    <inputs>
+         <conditional name="type">
+            <param name="type_select" type="select" label="Work with">
+                <option value="bed" selected="True">Bed File</option>
+                <option value="genome">Genome File</option>
+            </param>
+            <when value="bed">
+                <param  name="input" format="bed,vcf,gff,gff3" type="data" label="BED/VCF/GFF file"/>
+            </when>
+            <when value="genome">
+                <expand macro="genome" />
+            </when>
+        </conditional>
+        <conditional name="action">
+            <param name="action_select" type="select" label="Work with">
+                <option value="windowsize" selected="True">Set WindowSize</option>
+                <option value="number">Give Number of Windows</option>
+            </param>
+            <when value="windowsize">
+                <param name="windowsize" type="integer" value="1"
+                    label="Divide each input interval (either a chromosome or a BED interval) to fixed-sized windows"
+                    help="i.e. same number of nucleotide in each window" />
+                 <conditional name="step_size">
+                    <param name="step_size_select" type="select"
+                        label="Specify Step size? i.e. how many base pairs to step before creating a new window"
+                        help="Used to create 'sliding' windows. Defaults to window size (non-sliding windows).">
+                        <option value="yes">Yes</option>
+                        <option value="no" selected="True">No</option>
+                    </param>
+                    <when value="yes">
+                        <param name="step_size" type="integer" value="100" label="Specify it" />
+                    </when>
+                    <when value="no" />
+                 </conditional>
+            </when>
+            <when value="number">
+                <param name="number" type="integer" value="1"
+                    label="Divide each input interval (either a chromosome or a BED interval) to fixed number of windows"
+                    help="i.e. same number of windows, with varying window sizes" />
+                <param name="step_size" type="integer" value="100" label="Specify it" />
+            </when>
+        </conditional>
+        <param name="sourcename" type="select" label="ID Naming Options">
+            <option value="" selected="True">Default</option>
+            <option value="-i src">use the source interval's name</option>
+            <option value="-i winnum">use the window number as the ID (e.g. 1,2,3,4...)</option>
+            <option value="-i srcwinnum">use the source interval's name with the window number.</option>
+        </param>
+    </inputs>
+    <outputs>
+        <data name="output" format="bed" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="type_select" value="genome" />
+            <param name="genome" value="mm9_chr1.len" ftype="tabular" />
+            <param name="action_select" value="windowsize" />
+            <param name="windowsize" value="1000000" />
+            <output name="output" file="makeWindowBed_result1.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="type_select" value="genome" />
+            <param name="genome" value="mm9_chr1.len" ftype="tabular" />
+            <param name="action_select" value="windowsize" />
+            <param name="windowsize" value="1000000" />
+            <param name="step_size_select" value="yes" />
+            <param name="step_size" value="50000" />
+            <output name="output" file="makeWindowBed_result2.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="type_select" value="genome" />
+            <param name="genome" value="mm9_chr1.len" ftype="tabular" />
+            <param name="action_select" value="number" />
+            <param name="number" value="100" />
+            <param name="step_size" value="10000" />
+            <output name="output" file="makeWindowBed_result3.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="type_select" value="bed" />
+            <param name="input" value="makeWindowBed1.bed" ftype="bed" />
+            <param name="action_select" value="number" />
+            <param name="number" value="15" />
+            <param name="step_size" value="100" />
+            <output name="output" file="makeWindowBed_result4.bed" ftype="bed" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+Makes adjacent or sliding windows across a genome or BED file.
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 makewindowsBed.xml
--- a/makewindowsBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,79 +0,0 @@
-<tool id="bedtools_makewindowsbed" name="MakeWindowsBed" version="@WRAPPER_VERSION@.0">
-    <description></description>
-    <macros>
-        <import>macros.xml</import>
-    </macros>
-    <expand macro="requirements" />
-    <expand macro="stdio" />
-    <command>
-        bedtools makewindows
-        #if $type.type_select == 'genome':
-            -g $type.genome
-        #else:
-            -i $type.inputA
-        #end if
-        #if $action.action_select == 'windowsize':
-            -w $action.windowsize
-            #if $action.step_size.step_size_select == 'yes':
-                -s $action.step_size.step_size
-            #end if
-        #else:
-            -n $action.number
-        #end if
-        $sourcename
-        &gt; $output
-    </command>
-    <inputs>
-         <conditional name="type">
-            <param name="type_select" type="select" label="Work with">
-                <option value="bed" selected="True">Bed File</option>
-                <option value="genome">Genome File</option>
-            </param>
-            <when value="bed">
-                <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
-            </when>
-            <when value="genome">
-                <expand macro="genome" />
-            </when>
-        </conditional>
-        <conditional name="action">
-            <param name="action_select" type="select" label="Work with">
-                <option value="windowsize" selected="True">Set WindowSize</option>
-                <option value="number">Give Number of Windows</option>
-            </param>
-            <when value="windowsize">
-                <param name="windowsize" type="integer" value="1" label="Divide each input interval (either a chromosome or a BED interval) to fixed-sized windows (i.e. same number of nucleotide in each window)." />
-                 <conditional name="step_size">
-                    <param name="step_size_select" type="select" label="Specify Step size? i.e. how many base pairs to step before creating a new window. Used to create 'sliding' windows. Defaults to window size (non-sliding windows).">
-                        <option value="yes">Yes</option>
-                        <option value="no" selected="True">No</option>
-                    </param>
-                    <when value="yes">
-                        <param name="step_size" type="integer" value="100" label="Specify it" />
-                    </when>
-                 </conditional>
-            </when>
-            <when value="number">
-                <param name="number" type="integer" value="1" label="Divide each input interval (either a chromosome or a BED interval) to fixed number of windows (i.e. same number of windows, with varying window sizes)." />
-            </when>
-        </conditional>
-        <param name="sourcename" type="select" label="ID Naming Options">
-            <option value="" selected="True">Default</option>
-            <option value="-i src">use the source interval's name</option>
-            <option value="-i winnum">use the window number as the ID (e.g. 1,2,3,4...)</option>
-            <option value="-i srcwinnum">use the source interval's name with the window number.</option>
-        </param>
-    </inputs>
-    <outputs>
-        <data format_source="inputA" name="output" metadata_source="inputA" label=""/>
-    </outputs>
-    <help>
-
-**What it does**
-
-Makes adjacent or sliding windows across a genome or BED file.
-
-@REFERENCES@
-    </help>
-    <expand macro="citations" />
-</tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 mapBed.xml
--- a/mapBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/mapBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,39 +6,41 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools map
-        -a $inputA
-        -b $inputB
+        -a "${inputA}"
+        -b "${inputB}"
         $strand
         -o $operation
-        -c $col
+        -c "${cols}"
         -f $overlap
         $reciprocal
         $split
         $header
         #if $genome.genome_choose == "-g" :
             -g $genome.genome
-        #end if 
-        &gt; $output
+        #end if
+        > "${output}"
+]]>
     </command>
     <inputs>
-        <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file A"/>
-        <param format="bed,gff,vcf,gff3" name="inputB" type="data" label="BED/VCF/GFF file B"/>
-        <param name="col" type="integer" value="5" label="Specify the column from the B file to map onto intervals in A" />
+        <param format="bam,bed,vcf,gff,gff3" name="inputA" type="data" label="File A (BAM/BED/VCF/GFF)" />
+        <param format="bam,bed,gff,vcf,gff3" name="inputB" type="data" label="File B (BAM/BED/VCF/GFF)" />
+        <expand macro="choose_columns" /> 
         <expand macro="overlap" />
-        <param name="reciprocal" type="boolean" checked="false" truevalue="-r" falsevalue="" label="Require reciprocal overlap." help="If set, the overlap between the BAM alignment and the BED interval must affect the above fraction of both the alignment and the BED interval." />
+        <param name="reciprocal" type="boolean" checked="false" truevalue="-r" falsevalue="" 
+            label="Require reciprocal overlap"
+            help="If set, the overlap between the BAM alignment and the BED interval must affect the above fraction of both the alignment and the BED interval. (-r)" />
         <expand macro="strand2" />
-        <param name="operation" type="select" label="Specify the operation">
-            <option value="sum">Sum - numeric only</option>
-            <option value="absmin">AbsMin - numeric only</option>
-            <option value="absmax">AbsMax - numeric only</option>
+        <expand macro="choose_operations">
             <expand macro="math_options" />
             <expand macro="additional_math_options" />
-        </param>
-        <param name="split" type="boolean" checked="true" truevalue="-split" falsevalue="" label="Treat split/spliced BAM or BED12 entries as distinct BED intervals when computing coverage." help="If set, the coverage will be calculated based the spliced intervals only. For BAM files, this inspects the CIGAR N operation to infer the blocks for computing coverage. For BED12 files, this inspects the BlockCount, BlockStarts, and BlockEnds fields (i.e., columns 10,11,12). If this option is not set, coverage will be calculated based on the interval's START/END coordinates, and would include introns in the case of RNAseq data." />
-        <param name="header" type="boolean" checked="false" truevalue="-header" falsevalue="" label="Print the header from the A file prior to results." />
+        </expand>
+        <expand macro="split" />
+        <expand macro="print_header" />
         <conditional name="genome">
-            <param name="genome_choose" type="boolean" checked="false" truevalue="-g" falsevalue="" label="Treat split/spliced BAM or BED12 entries as distinct BED intervals when computing coverage." help="" />
+            <param name="genome_choose" type="boolean" checked="false" truevalue="-g" falsevalue=""
+                label="Treat split/spliced BAM or BED12 entries as distinct BED intervals when computing coverage." help="(-g)" />
             <when value="-g">
                 <expand macro="genome" />
             </when>
@@ -47,8 +49,40 @@
     <outputs>
         <data format_source="inputA" name="output" metadata_source="inputA" label="Mapping of ${inputB.name} into ${inputA.name}"/>
     </outputs>
+    <tests>
+        <test>
+            <param name="inputA" value="mapBed1.bed" ftype="bed" />
+            <param name="inputB" value="mapBed2.bed" ftype="bed" />
+            <param name="cols" value="5" />
+            <param name="operation" value="mean" />
+            <output name="output" file="mapBed_result1.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="mapBed1.bed" ftype="bed" />
+            <param name="inputB" value="mapBed2.bed" ftype="bed" />
+            <param name="cols" value="5" />
+            <param name="operation" value="collapse" />
+            <output name="output" file="mapBed_result2.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="mapBed1.bed" ftype="bed" />
+            <param name="inputB" value="mapBed2.bed" ftype="bed" />
+            <param name="cols" value="5" />
+            <param name="operation" value="collapse" />
+            <param name="strand" value="-S" />
+            <output name="output" file="mapBed_result3.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="mapBed1.bed" ftype="bed" />
+            <param name="inputB" value="mapBed2.bed" ftype="bed" />
+            <param name="cols" value="5" />
+            <param name="operation" value="collapse" />
+            <param name="strand" value="-s" />
+            <output name="output" file="mapBed_result4.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 bedtools map allows one to map overlapping features in a B file onto features in an A file and apply statistics and/or summary operations on those features.
@@ -64,7 +98,7 @@
 The map tool is substantially faster in versions 2.19.0 and later. The plot below demonstrates the increased speed when, for example, counting the number of exome alignments that align to each exon. The bedtools times are compared to the bedops bedmap utility as a point of reference.
 
 @REFERENCES@
-
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 maskFastaBed.xml
--- a/maskFastaBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/maskFastaBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,25 +6,44 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools maskfasta
-        $soft
-        -mc $mc
-        -fi $fasta 
-        -bed $inputA
-        -fo $output
+            $soft
+            -mc "${mc}"
+            -fi "${fasta}"
+            -bed "${input}"
+            -fo "${output}"
+]]>
     </command>
     <inputs>
-        <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
+        <param format="bed,vcf,gff,gff3" name="input" type="data" label="BED/VCF/GFF file"/>
         <param format="fasta" name="fasta" type="data" label="Fasta file"/>
-
-        <param name="soft" type="boolean" checked="false" truevalue="-name" falsevalue="" label="Soft-mask (that is, convert to lower-case bases) the FASTA sequence. By default, hard-masking (that is, conversion to Ns) is performed" />
-        <param name="mc" type="text"  value="N" length="1" falsevalue="" label="Replace masking character. That is, instead of masking with Ns, use another character." />
+        <param name="soft" type="boolean" checked="false" truevalue="-soft" falsevalue=""
+            label="Soft-mask (that is, convert to lower-case bases) the FASTA sequence"
+            help="By default, hard-masking (that is, conversion to Ns) is performed. (-soft)" />
+        <param name="mc" type="text"  value="N" length="1"
+            label="Replace masking character"
+            help="That is, instead of masking with Ns, use another character. (-mc)" />
     </inputs>
     <outputs>
         <data format="fasta" name="output" />
     </outputs>
+    <tests>
+        <test>
+            <param name="input" value="nucBed1.bed" ftype="bed" />
+            <param name="fasta" value="nucBed1.fasta" ftype="fasta" />
+            <param name="soft" value="False" />
+            <output name="output" file="maskFastaBed_result1.bed" ftype="fasta" />
+        </test>
+        <test>
+            <param name="input" value="nucBed1.bed" ftype="bed" />
+            <param name="fasta" value="nucBed1.fasta" ftype="fasta" />
+            <param name="soft" value="True" />
+            <output name="output" file="maskFastaBed_result2.bed" ftype="fasta" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 bedtools maskfasta masks sequences in a FASTA file based on intervals defined in a feature file. The headers in the input FASTA file must exactly match the chromosome column in the feature file. This may be useful fro creating your own masked genome file based on custom annotations or for masking all but your target regions when aligning sequence data from a targeted capture experiment.
@@ -32,6 +51,7 @@
 .. image:: $PATH_TO_IMAGES/maskfasta-glyph.png
 
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 mergeBed.xml
--- a/mergeBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/mergeBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,60 +6,59 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
-        mergeBed 
-            -i $input
-            $strandedness
-            $report_number
+<![CDATA[
+        mergeBed
+            -i "${input}"
+            $strand
             -d $distance
-            $nms
-            #if str($scores) != 'none'
-                -scores $scores
-            #end if
-            &gt; $output
+            $header
+            > "${output}"
+]]>
     </command>
     <inputs>
-        <param  name="input" format="bed,gff,vcf" type="data" label="Sort the following BED/VCF/GFF file"/>
-        <param name="strandedness" type="boolean" label="Force strandedness." truevalue="-s" falsevalue="" checked="false" 
-            help="That is, only merge features that are the same strand."/>
-        <param name="report_number" type="boolean" label="Report the number of BED entries that were merged." truevalue="-n" falsevalue="" checked="false" 
-            help="1 is reported if no merging occurred."/>
-        <param name="nms" type="boolean" label="Report the names of the merged features separated by commas." truevalue="-nms" falsevalue="" checked="false" 
-            help="1 is reported if no merging occurred."/>
-
-        <param name="distance" type="integer" value="0" label="Maximum distance between features allowed for features to be merged." 
-            help="That is, overlapping and/or book-ended features are merged."/>
-        <param name="scores" type="select" label="Report the scores of the merged features as">
-            <option value="none" selected="True">Do not report at all</option>
-            <option value="sum">Sum</option>
+        <param  name="input" format="bam,bed,gff,vcf" type="data" label="Sort the following BAM/BED/VCF/GFF file"/>
+        <param name="strand" type="select" label="Calculation based on strandedness?">
+            <option value="" selected="True">Overlaps on either strand</option>
+            <option value="-s">Force strandedness. That is, only merge features that are the same strand.</option>
+            <option value="-S +">Force merge for forward strand only.</option>
+            <option value="-S -">Force merge for reverse strand only.</option>
+        </param>
+        <param name="distance" type="integer" value="0"
+            label="Maximum distance between features allowed for features to be merged"
+            help="That is, overlapping and/or book-ended features are merged. (-d)"/>
+        <expand macro="print_header" />
+        <expand macro="choose_columns" />
+        <expand macro="choose_operations">
             <expand macro="math_options" />
-        </param>
+            <expand macro="additional_math_options" />
+        </expand>
     </inputs>
     <outputs>
         <data format="bed" name="output" metadata_source="input" label="Merged ${input.name}"/>
     </outputs>
     <tests>
         <test>
-            <param name="input" value="0.bed" ftype="bed" />
-            <output name="output" file="0_result.bed" ftype="bed" />
+            <param name="input" value="mergedBed1.bed" ftype="bed" />
+            <output name="output" file="mergedBed_result1.bed" ftype="bed" />
         </test>
         <test>
-            <param name="input" value="1.bed" ftype="bed" />
+            <param name="input" value="mergedBed2.bed" ftype="bed" />
             <param name="strandedness" value="-s" />
-            <output name="output" file="1_result.bed" ftype="bed" />
+            <output name="output" file="mergedBed_result2.bed" ftype="bed" />
         </test>
         <test>
-            <param name="input" value="2.bed" ftype="bed" />
+            <param name="input" value="mergedBed3.bed" ftype="bed" />
             <param name="report_number" value="-n" />
-            <output name="output" file="2_result.bed" ftype="bed" />
+            <output name="output" file="mergedBed_result3.bed" ftype="bed" />
         </test>
         <test>
-            <param name="input" value="3.bed" ftype="bed" />
+            <param name="input" value="mergedBed4.bed" ftype="bed" />
             <param name="distance" value="1000" />
-            <output name="output" file="3_result.bed" ftype="bed" />
+            <output name="output" file="mergedBed_result4.bed" ftype="bed" />
         </test>
     </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 bedtools merge combines overlapping or "book-ended" features in an interval file into a single feature which spans all of the combined features.
@@ -197,8 +196,8 @@
   $ bedtools merge -i A.bed -scores collapse
   chr1  100  500  1,2,3
 
-
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 multiCov.xml
--- a/multiCov.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/multiCov.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,53 +6,70 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
-        bedtools multicov
-        -bed $input1
-        -bam 
-        #for $bam in $bams:
-            $bam.input
+<![CDATA[
+        #for $i, $bam in enumerate( $bams ):
+            ln -s -f $bam ${i}.bam &&
+            ln -s -f $bam.metadata.bam_index ${i}.bam.bai &&
         #end for
-        $strand
-        -f $overlap
-        $reciprocal
-        $split
-        -q $mapq
-        $duplicate
-        $failed
-        $proper
-        &gt; $output
+
+        bedtools multicov
+            -bed $input
+            -bams
+            #for $i, $bam in enumerate( $bams ):
+                ${i}.bam
+            #end for
+            $strand
+            -f $overlap
+            $reciprocal
+            $split
+            -q $q
+            $duplicate
+            $failed
+            $proper
+            > $output
+]]>
     </command>
     <inputs>
-        <param name="input1" format="bed" type="data" label="First sorted BED file" />
+        <param name="input" format="bed" type="data" label="Sorted BED file" />
         <!-- Additional files, if the user needs more -->
-        <repeat name="bams" title="Add BAM files" >
-            <param name="input" format="bam" type="data" label="BAM file" />
-        </repeat>
+        <param name="bams" format="bam" type="data" multiple="True" label="BAM file" />
+
         <expand macro="strand2" />
         <expand macro="overlap" />
-        <param name="reciprocal" type="boolean" checked="false" truevalue="-r" falsevalue="" label="Require that the fraction overlap be reciprocal for A and B. In other words, if -f is 0.90 and -r is used, this requires that B overlap 90% of A and A _also_ overlaps 90% of B." />
+        <expand macro="reciprocal" />
         <expand macro="split" />
-
-        <param name="duplicate" type="boolean" checked="false" truevalue="-D" falsevalue="" label="Include duplicate reads. Default counts non-duplicates only" />
-        <param name="failed" type="boolean" checked="false" truevalue="-F" falsevalue="" label="  Include failed-QC reads. Default counts pass-QC reads only" />
-        <param name="proper" type="boolean" checked="false" truevalue="-p" falsevalue="" label="Only count proper pairs. Default counts all alignments with MAPQ > -q argument, regardless of the BAM FLAG field." />
+        <param name="q" type="integer" value="0" label="Minimum mapping quality (MAPQ) allowed" help="(-q)" />
+        <param name="duplicate" type="boolean" checked="False" truevalue="-D" falsevalue=""
+            label="Include duplicate reads"
+            help="Default counts non-duplicates only. (-D)" />
+        <param name="failed" type="boolean" checked="false" truevalue="-F" falsevalue=""
+            label="Include failed-QC reads" 
+            help="Default counts pass-QC reads only (-F)"/>
+        <param name="proper" type="boolean" checked="false" truevalue="-p" falsevalue=""
+            label="Only count proper pairs"
+            help="Default counts all alignments with MAPQ > -q argument, regardless of the BAM FLAG field. (-p)" />
     </inputs>
-
     <outputs>
-        <data format="bed" name="output" label="" />
+        <data name="output" metadata_source="input" format_source="input" />
     </outputs>
+    <tests>
+        <test>
+            <param name="input" value="multiCov1.bed" ftype="bed" />
+            <param name="bams" value="srma_in3.bam,srma_in3.bam" ftpye="bam"/>
+            <param name="q" value="1"/>
+            <param name="split" value="False"/>
+            <output name="output" file="multiCovBed_result1.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-    
+<![CDATA[
 **What it does**
 
 bedtools multicov, reports the count of alignments from multiple position-sorted and indexed BAM files that overlap intervals in a BED file. Specifically, for each BED interval provided, it reports a separate count of overlapping alignments from each BAM file.
 
-.. class:: infomark
-
-bedtools multicov depends upon index BAM files in order to count the number of overlaps in each BAM file. As such, each BAM file should be position sorted (samtool sort aln.bam aln.sort) and indexed (samtools index aln.sort.bam) with either samtools or bamtools.
 
 @REFERENCES@
-
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 multiIntersectBed.xml
--- a/multiIntersectBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/multiIntersectBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,108 +6,92 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
-        multiIntersectBed
+<![CDATA[
+        bedtools multiinter
         $header
+        $cluster
+        -filler "${filler}"
         #if $zero.value == True:
             -empty
-            -g ${chromInfo}
-        #end if
-        
-        -i '$input1'
-        '$input2'
-        #for $q in $beds
-            '${q.input}'
-        #end for
-
-        -names
-        #if $name1.choice == "tag":
-            '${input1.name}'
-        #else
-            '${name1.custom_name}'
+            -g $genome
         #end if
 
-        #if $name2.choice == "tag":
-            '${input2.name}'
-        #else
-            '${name2.custom_name}'
+        #if str($tag.tag_select) == "tag":
+            #set files = '" "'.join( [ str( $file ) for $file in $tag.inputs ] )
+            -i "${files}"
+        #else:
+            -i
+            #for $file in $tag.beds:
+                "${file.input}"
+            #end for
+            -names
+            #for $file in $tag.beds:
+                "{$file.custom_name}"
+            #end for
         #end if
 
-        #for $q in $beds
-            #if $q.name.choice == "tag":
-                '${q.input.name}'
-            #else
-                '${q.input.custom_name}'
-            #end if
-        #end for
-        &gt; '$output'
+        > '$output'
+]]>
     </command>
-    
     <inputs>
-        <!-- Make it easy for the user, first two input files are always shown -->
-        <!-- INPUT 1 -->
-        <param name="input1" format="bed" type="data" label="First sorted BED file" />
-        
-        <conditional name="name1">
-            <param name="choice" type="select" label="Sample name">
+        <conditional name="tag">
+            <param name="tag_select" type="select" label="Sample name">
                 <option value="tag" selected="true">Use input's tag</option>
-                <option value="custom">Enter custom table name</option>
+                <option value="custom">Enter custom name per file</option>
             </param>
             <when value="tag">
+                <param name="inputs" format="bed" type="data" multiple="True" label="BED files" />
             </when>
             <when value="custom">
-                <param name="custom_name" type="text" area="false" label="Custom sample name"/>
-            </when>
-        </conditional>
-
-        <!-- INPUT 2 -->
-        <param name="input2" format="bed" type="data" label="Second sorted BED file" />
-        
-        <conditional name="name2">
-            <param name="choice" type="select" label="Sample name">
-                <option value="tag" selected="true">Use input's tag</option>
-                <option value="custom">Enter custom table name</option>
-            </param>
-            <when value="tag">
-            </when>
-            <when value="custom">
-                <param name="custom_name" type="text" area="false" label="Custom sample name"/>
+                <repeat name="beds" title="Add BED files" min="2" >
+                    <param name="input" format="bed" type="data" multiple="True" label="BED file" />
+                    <param name="custom_name" type="text" area="false" label="Custom sample name"/>
+                </repeat>
             </when>
         </conditional>
-
-        <!-- Additional files, if the user needs more -->
-        <repeat name="beds" title="Add'l sorted BED files" >
-            <param name="input" format="bed" type="data" label="BED file" />
-
-            <conditional name="name">
-                <param name="choice" type="select" label="Sample name">
-                    <option value="tag" selected="true">Use input's tag</option>
-                    <option value="custom">Enter custom table name</option>
-                </param>
-                <when value="tag">
-                </when>
-                <when value="custom">
-                    <param name="custom_name" type="text" area="false" label="Custom sample name"/>
-                </when>
-            </conditional>
-        </repeat>
-
-        <param name="header" type="boolean" checked="true" truevalue="-header" falsevalue="" label="Print header line" help="The first line will include the name of each sample." />
-
-        <param name="zero" type="boolean" checked="true" label="Report regions that are not covered by any of the files" help="If set, regions that are not overlapped by any file will also be reported. Requires a valid organism key for all input datasets" />
+        <expand macro="genome" />
+        <param name="cluster" type="boolean" checked="false" truevalue="-cluster" falsevalue="" 
+            label="Invoke Ryan Layers's clustering algorithm"
+            help="(-cluster)" />
+        <param name="zero" type="boolean" checked="true"
+            label="Report regions that are not covered by any of the files"
+            help="If set, regions that are not overlapped by any file will also be reported. Requires a valid organism key for all input datasets" />
+        <param name="filler" type="text" value="N/A"
+            label="Text to use for no-coverage value"
+            help="Can be 0.0, N/A, - or any other value. (-filler)" />
+        <expand macro="print_header" />
 
     </inputs>
-
     <outputs>
-        <data format="tabular" name="output"  metadata_source="input1" label="Common intervals identified from among ${input1.name}, ${input2.name} and so on." />
+        <data format="bed" name="output" />
     </outputs>
+    <tests>
+        <test>
+            <param name="tag_select" value="tag"/>
+            <param name="inputs" value="multiIntersectBed1.bed,multiIntersectBed2.bed,multiIntersectBed3.bed" ftype="bed" />
+            <param name="zero" value="False"/>
+            <output name="output" file="multiIntersectBed_result1.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="tag_select" value="tag"/>
+            <param name="inputs" value="multiIntersectBed1.bed,multiIntersectBed2.bed,multiIntersectBed3.bed" ftype="bed" />
+            <param name="header" value="True"/>
+            <param name="zero" value="False"/>
+            <output name="output" file="multiIntersectBed_result2.bed" lines_diff="2" ftype="bed" />
+        </test>
+        <test>
+            <param name="tag_select" value="tag"/>
+            <param name="inputs" value="multiIntersectBed1.bed,multiIntersectBed2.bed,multiIntersectBed3.bed" ftype="bed" />
+            <param name="zero" value="True"/>
+            <param name="genome" value="multiIntersectBed1.len"/>
+            <output name="output" file="multiIntersectBed_result3.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-    
+<![CDATA[
 **What it does**
 
-This tool identifies common intervals among multiple, sorted BED files. Intervals can be common among 0 to N of the N input BED files. The pictorial and raw data examples below illustrate the behavior of this tool more clearly.
-
-
-.. image:: http://people.virginia.edu/~arq5x/files/bedtools-galaxy/mbi.png
+This tool identifies common intervals among multiple, sorted BED files. Intervals can be common among 0 to N of the N input BED files.
 
 
 .. class:: warningmark
@@ -131,7 +115,7 @@
 **Example input**::
 
     # a.bed
-    chr1  6   12
+    chr1  6   12bed
     chr1  10  20
     chr1  22  27
     chr1  24  30
@@ -190,7 +174,7 @@
 
 
 @REFERENCES@
-
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 nucBed.xml
--- a/nucBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/nucBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,34 +6,54 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools nuc
         $strand
         $seq
         $pattern
         $case
-        -fi $fasta 
-        -bed $inputA
-        &gt; $output
+        -fi $fasta
+        -bed $input
+        > $output
+]]>
     </command>
     <inputs>
-        <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
-        <param format="fasta" name="fasta" type="data" label="Fasta file"/>
+        <param format="bed,vcf,gff,gff3" name="input" type="data" label="BED/VCF/GFF file"/>
+        <param format="fasta" name="fasta" type="data" label="FASTA file"/>
 
-        <param name="strand" type="boolean" checked="false" truevalue="-s" falsevalue="" label="Profile the sequence according to strand." />
-        <param name="seq" type="boolean" checked="false" truevalue="-seq" falsevalue="" label="Print the extracted sequence." />
-        <param name="pattern" type="boolean" checked="false" truevalue="-pattern" falsevalue="" label="Report the number of times a user-defined sequence is observed (case-sensitive)." />
-        <param name="case" type="boolean" checked="false" truevalue="-C" falsevalue="" label="Igore case when matching -pattern." />
+        <param name="strand" type="boolean" checked="false" truevalue="-s" falsevalue=""
+            label="Profile the sequence according to strand" help="(-s)"/>
+        <param name="seq" type="boolean" checked="false" truevalue="-seq" falsevalue=""
+            label="Print the extracted sequence" help="(-seq)"/>
+        <param name="pattern" type="boolean" checked="false" truevalue="-pattern" falsevalue=""
+            label="Report the number of times a user-defined sequence is observed" help="case-sensitive (-pattern)" />
+        <param name="case" type="boolean" checked="false" truevalue="-C" falsevalue=""
+            label="Igore case when matching -pattern" help="(-C)"/>
     </inputs>
     <outputs>
-        <data format="fasta" name="output" />
+        <data format="tabular" name="output" />
     </outputs>
+    <tests>
+        <test>
+            <param name="input" value="nucBed1.bed" ftype="bed" />
+            <param name="fasta" value="nucBed1.fasta" ftype="fasta" />
+            <output name="output" file="nucBed_result1.bed" ftype="tabular" />
+        </test>
+        <test>
+            <param name="input" value="nucBed1.bed" ftype="bed" />
+            <param name="fasta" value="nucBed1.fasta" ftype="fasta" />
+            <param name="seq" value="True" />
+            <output name="output" file="nucBed_result2.bed" ftype="tabular" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 Profiles the nucleotide content of intervals in a fasta file.
 
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 overlapBed.xml
--- a/overlapBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/overlapBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,25 +6,37 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
-        overlap
-        -i $inputA
+<![CDATA[
+        bedtools overlap
+        -i $input
         -cols $cols
-        &gt; $output
+        > $output
+]]>
     </command>
     <inputs>
-        <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
-        <param name="cols" type="text" value="" area="True" size="20x10" label="Specify the columns (1-based) for the starts and ends of the features for which you’d like to compute the overlap/distance. The columns must be listed in the following order: start1,end1,start2,end2" />
+        <param format="bed,vcf,gff,gff3" name="input" type="data" label="BED/VCF/GFF file"/>
+        <param name="cols" type="data_column" multiple="True" data_ref="input"
+            label="Specify the columns for the starts and ends of the features for which you’d like to compute the overlap/distance"
+            help="The columns must be listed in the following order: start1,end1,start2,end2" />
     </inputs>
     <outputs>
-        <data format_source="inputA" name="output" metadata_source="inputA" label="Overlap of ${inputA.name}"/>
+        <data format_source="input" name="output" metadata_source="input" label="Overlap of ${input.name}"/>
     </outputs>
+    <tests>
+        <test>
+            <param name="input" value="windowBed_result1.bed" ftype="bed" />
+            <param name="cols" value="2,3,5,6" />
+            <output name="output" file="overlapBed_result1.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 overlap computes the amount of overlap (in the case of positive values) or distance (in the case of negative values) between feature coordinates occurring on the same input line and reports the result at the end of the same line. In this way, it is a useful method for computing custom overlap scores from the output of other BEDTools.
 
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 randomBed.xml
--- a/randomBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/randomBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,30 +6,44 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools random
         -g $genome
         -l $length
         -n $intervals
-        #if $seed.choose:
-        -seed $seed.seed
+        #if $seed.seed_choose:
+            -seed $seed.seed
         #end if
+        > "$output"
+]]>
     </command>
     <inputs>
         <expand macro="genome" />
-        <param name="length" type="integer" value="100" label="The length of the intervals to generate." />
-        <param name="intervals" type="integer" value="1000000" label="The number of intervals to generate." />
+        <param name="length" type="integer" value="100" label="The length of the intervals to generate" help="(-l)" />
+        <param name="intervals" type="integer" value="1000000" label="The number of intervals to generate" help="(-n)" />
         <expand macro="seed" />
     </inputs>
     <outputs>
         <data format="bed" name="output" />
     </outputs>
+    <tests>
+        <test>
+            <param name="genome" value="mm9_chr1.len" />
+            <param name="seed_choose" value="True" />
+            <param name="seed" value="1" />
+            <param name="length" value="5" />
+            <param name="intervals" value="3" />
+            <output name="output" file="randomBed_result1.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 bedtools random will generate a random set of intervals in BED6 format. One can specify both the number (-n) and the size (-l) of the intervals that should be generated.
 
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 reldist.xml
--- a/reldist.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/reldist.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,31 +6,44 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools reldist
         -a $inputA
         -b $inputB
         $detail
+        > "$output"
+]]>
     </command>
     <inputs>
         <param format="bed,bam,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF/BAM file"/>
         <param format="bed,gff,vcf,gff3" name="inputB" type="data" label="BED/VCF/GFF file"/>
-        <param name="detail" type="boolean" checked="false" truevalue="-detail" falsevalue="" label="Instead of a summary, report the relative distance for each interval in A" help="" />
+        <param name="detail" type="boolean" checked="false" truevalue="-detail" falsevalue=""
+            label="Instead of a summary, report the relative distance for each interval in A" help="(-detail)" />
     </inputs>
     <outputs>
-        <data format_source="inputA" name="output" metadata_source="inputA" label="Intersection of ${inputA.name} and ${inputB.name}"/>
+        <data format_source="inputA" name="output" metadata_source="inputA" label="Relalative distance of ${inputA.name} and ${inputB.name}"/>
     </outputs>
+    <tests>
+        <test>
+            <param name="inputA" value="windowBed_result1.bed" ftype="bed" />
+            <param name="inputB" value="windowBed_result1.bed" ftype="bed" />
+            <output name="output" file="reldistBed_result1.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
-Traditional approaches to summarizing the similarity between two sets of genomic intervals are based upon the number or proportion of intersecting intervals. However, such measures are largely blind to spatial correlations between the two sets where, dpesite consistent spacing or proximity, intersections are rare (for example, enhancers and transcription start sites rarely overlap, yet they are much closer to one another than two sets of random intervals). Favorov et al [1] proposed a relative distance metric that describes distribution of relative distances between each interval in one set nd the two closest intervals in another set (see figure above). If there is no spatial correlation between the two sets, one would expect the relative distances to be uniformaly distributed among the relative distances ranging from 0 to 0.5. If, however, the intervals tend to be much closer than expected by chance, the distribution of observed relative distances would be shifted towards low relative distance values (e.g., the figure below).
+Traditional approaches to summarizing the similarity between two sets of genomic intervals are based upon the number or proportion of intersecting intervals. However, such measures are largely blind to spatial correlations between the two sets where, dpesite consistent spacing or proximity, intersections are rare (for example, enhancers and transcription start sites rarely overlap, yet they are much closer to one another than two sets of random intervals). Favorov et al proposed a relative distance metric that describes distribution of relative distances between each interval in one set nd the two closest intervals in another set (see figure above). If there is no spatial correlation between the two sets, one would expect the relative distances to be uniformaly distributed among the relative distances ranging from 0 to 0.5. If, however, the intervals tend to be much closer than expected by chance, the distribution of observed relative distances would be shifted towards low relative distance values (e.g., the figure below).
 
 .. image:: $PATH_TO_IMAGES/reldist-glyph.png
 
 .. class:: infomark
 
 @REFERENCES@
-
+]]>
     </help>
-    <expand macro="citations" />
+    <expand macro="citations">
+        <citation type="doi">10.1371/journal.pcbi.1002529</citation>
+    </expand>
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 shuffleBed.xml
--- a/shuffleBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/shuffleBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,63 +6,107 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools shuffle
         -g $genome
         -i $inputA
         $bedpe
-        #if $seed.choose:
-        -seed $seed.seed
+        #if str($seed.seed_choose) == "True":
+            -seed $seed.seed
         #end if
-        #if $excl.choose:
-        -excl $excl.excl
-        -f $overlap
-        #end if
-         #if $incl.choose:
-        -incl $incl.incl
+        #if str($add_bed.add_bed_select) == "not_be":
+            -excl $add_bed_select.excl
+            -f $add_bed_select.overlap
+        #elif str($add_bed.add_bed_select) == "be":
+            -incl $add_bed_select.incl
         #end if
         $chrom
         $chromfirst
-        $nooverlap
-        $allowBeyond
+        $no_overlap
+        $allow_beyond
         -maxTries $maxtries
-        &gt; $output
+        > $output
+]]>
     </command>
     <inputs>
         <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
         <param name="bedpe" type="boolean" label="The file is in BEDPE format" selected="False" truevalue="-bedpe" falsevalue="" />
         <expand macro="genome" />
-        <param name="chrom" type="boolean" label="Keep features in the input file on the same chromosome. Solely permute their location on the chromosome. By default, both the chromosome and position are randomly chosen" selected="False" truevalue="-chrom" falsevalue="" />
+        <param name="chrom" type="boolean" selected="False" truevalue="-chrom" falsevalue=""
+            label="Keep features in the input file on the same chromosome"
+            help="Solely permute their location on the chromosome. By default, both the chromosome and position are randomly chosen. (-chrom)" />
         <expand macro="seed" />
-        <conditional name="excl">
-            <param name="choose" type="boolean" label="Choose a BED file of coordinates in which features from -i should not be placed?" selected="False" truevalue="True" falsevalue="False" />
-            <when value="True">
+        <conditional name="add_bed">
+            <param name="add_bed_select" type="select" label="Choose an additional BED file">
+                <option value="no" selected="True">No additional BED file</option>
+                <option value="not_be">Coordinates in which features from -i should not be placed?</option>
+                <option value="be">coordinates in which features from -i should be placed?</option>
+            </param>
+            <when value="not_be">
                 <param name="excl" type="data" format="bed" label="Choose File" />
                 <expand macro="overlap" />
             </when>
-        </conditional>
-        <conditional name="incl">
-            <param name="choose" type="boolean" label="Choose a BED file of coordinates in which features from -i should be placed?" selected="False" truevalue="True" falsevalue="False" />
-            <when value="True">
+            <when value="be">
                 <param name="incl" type="data" format="bed" label="Choose File" />
             </when>
         </conditional>
-        
         <param name="chromfirst" type="boolean" selected="False" truevalue="-chromFirst" falsevalue="" 
-            label="Instead of choosing a position randomly among the entire genome (the default), first choose a chrom randomly, and then choose a random start coordinate on that chrom. This leads to features being ~uniformly distributed among the chroms, as opposed to features being distribute as a function of chrom size" />
-        <param name="maxtries" type="integer" value="1000" label="Max. number of attempts to find a home for a shuffled interval in the presence of -incl or -excl" />
-        <param name="nooverlap" type="boolean" selected="False" truevalue="-noOverlapping" falsevalue="" label="Don’t allow shuffled intervals to overlap" />
-        <param name="allowBeyond" type="boolean" selected="False" truevalue="-allowBeyondChromEnd" falsevalue="" label="Allow the original the length of the original records to extebd beyond the length of the chromosome." />
+            label="Choose chromosome first"
+            help="Instead of choosing a position randomly among the entire genome (the default), first choose a chrom randomly, and then choose a random start coordinate on that chrom. This leads to features being ~uniformly distributed among the chroms, as opposed to features being distribute as a function of chrom size. (-chromFirst)" />
+        <param name="maxtries" type="integer" value="1000"
+            label="Max. number of attempts to find a home for a shuffled interval in the presence of -incl or -excl" help="(-maxTries)" />
+        <param name="no_overlap" type="boolean" selected="False" truevalue="-noOverlapping" falsevalue=""
+            label="Don’t allow shuffled intervals to overlap" help="(-noOverlapping)" />
+        <param name="allow_beyond" type="boolean" selected="False" truevalue="-allowBeyondChromEnd" falsevalue=""
+            label="Allow the original the length of the original records to extebd beyond the length of the chromosome" help="(-allowBeyondChromEnd)" />
     </inputs>
     <outputs>
         <data format="bed" name="output" />
     </outputs>
+    <tests>
+        <test>
+            <param name="inputA" value="shuffleBed1.bed" ftype="bed" />
+            <param name="genome" value="shuffleBed.len" ftype="tabular" />
+            <param name="chrom" value="" />
+            <param name="seed_choose" value="True" />
+            <param name="seed" value="1" />
+            <output name="output" file="shuffleBed_result1.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="shuffleBed1.bed" ftype="bed" />
+            <param name="genome" value="shuffleBed.len" ftype="tabular" />
+            <param name="chrom" value="True" />
+            <param name="seed_choose" value="True" />
+            <param name="seed" value="1" />
+            <output name="output" file="shuffleBed_result2.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="shuffleBed1.bed" ftype="bed" />
+            <param name="genome" value="shuffleBed.len" ftype="tabular" />
+            <param name="excl" value="shuffleBed2.bed" ftype="bed" />
+            <param name="seed_choose" value="True" />
+            <param name="seed" value="1" />
+            <output name="output" file="shuffleBed_result3.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="shuffleBed1.bed" ftype="bed" />
+            <param name="genome" value="shuffleBed.len" ftype="bed" />
+            <param name="allow_beyond" value="True" />
+            <param name="seed_choose" value="True" />
+            <param name="seed" value="1" />
+            <output name="output" file="shuffleBed_result4.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 bedtools shuffle will randomly permute the genomic locations of a feature file among a genome defined in a genome file. One can also provide an “exclusions” BED/GFF/VCF file that lists regions where you do not want the permuted features to be placed. For example, one might want to prevent features from being placed in known genome gaps. shuffle is useful as a null basis against which to test the significance of associations of one feature with another.
+
 .. image:: $PATH_TO_IMAGES/shuffle-glyph.png
+
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 slopBed.xml
--- a/slopBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/slopBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,34 +6,56 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools slop
         $pct
         $strand
         -g $genome
         -i $inputA
         #if $addition.addition_select == 'b':
-        -b $addition.b
+            -b $addition.b
         #else:
-        -l $addition.l
-        -r $addition.r
+            -l $addition.l
+            -r $addition.r
         #end if
         $header
-
-        &gt; $output
+        > $output
+]]>
     </command>
     <inputs>
         <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
         <expand macro="genome" />
-        <param name="pct" type="boolean" checked="false" truevalue="-pct" falsevalue="" label="Define -l and -r as a fraction of the feature’s length" help="E.g. if used on a 1000bp feature, -l 0.50, will add 500 bp “upstream”" />
-        <param name="strand" type="boolean" checked="false" truevalue="-s" falsevalue="" label="Define -l and -r based on strand" help="For example. if used, -l 500 for a negative-stranded feature, it will add 500 bp to the end coordinate" />
+        <param name="pct" type="boolean" checked="false" truevalue="-pct" falsevalue=""
+            label="Define -l and -r as a fraction of the feature’s length"
+            help="E.g. if used on a 1000bp feature, -l 0.50, will add 500 bp “upstream”" />
+        <param name="strand" type="boolean" checked="false" truevalue="-s" falsevalue=""
+            label="Define -l and -r based on strand"
+            help="If used, -l 500 for a negative-stranded feature, it will add 500 bp to the end coordinate" />
         <expand macro="addition" />
-        <param name="header" type="boolean" checked="false" truevalue="-header" falsevalue="" label="Print the header from the input file prior to results." />
+        <expand macro="print_header" />
     </inputs>
     <outputs>
-        <data format="bed" name="output" label=""/>
+        <data format="bed" name="output"/>
     </outputs>
+    <tests>
+        <test>
+            <param name="inputA" value="a.bed" ftype="bed" />
+            <param name="genome" value="mm9_chr1.len" ftype="bed" />
+            <param name="addition_select" value="b" />
+            <param name="b" value="5" />
+            <output name="output" file="slopBed_result1.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="a.bed" ftype="bed" />
+            <param name="genome" value="mm9_chr1.len" ftype="bed" />
+            <param name="addition_select" value="lr" />
+            <param name="l" value="2" />
+            <param name="r" value="3" />
+            <output name="output" file="slopBed_result2.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 bedtools slop will increase the size of each feature in a feature file by a user-defined number of bases. While something like this could be done with an awk '{OFS="\t" print $1,$2-&lt;slop>,$3+&lt;slop>}', bedtools slop will restrict the resizing to the size of the chromosome (i.e. no start &lt; 0 and no end > chromosome size).
@@ -44,6 +66,7 @@
 
 In order to prevent the extension of intervals beyond chromosome boundaries, bedtools slop requires a genome file defining the length of each chromosome or contig.
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 sortBed.xml
--- a/sortBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/sortBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,7 +6,12 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
-        sortBed -i $input $option &gt; $output
+<![CDATA[
+        sortBed 
+            -i $input 
+            $option 
+            > $output
+]]>
     </command>
     <inputs>
         <param format="bed" name="input" type="data" label="Sort the following BED file"/>
@@ -21,13 +26,18 @@
             <option value="-chrThenScoreD">chromosome, then by score (desc).</option>
         </param>
     </inputs>
-
     <outputs>
         <data format="bed" name="output" metadata_source="input" label="${input.name} (as BED)"/>
     </outputs>
-
+    <tests>
+        <test>
+            <param name="input" value="sortBed1.bed" ftype="bed" />
+            <param name="option" value="" />
+            <output name="output" file="sortBed_result1.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 Sorts a feature file by chromosome and other criteria.
@@ -40,7 +50,7 @@
 by chromosome then by start position in the following manner: sort -k 1,1 -k2,2 -n a.bed
 
 @REFERENCES@
-
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 static/images/closest-glyph.png
b
Binary file static/images/closest-glyph.png has changed
b
diff -r b8348686a0b9 -r 82aac94b06c3 subtractBed.xml
--- a/subtractBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/subtractBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,37 +6,51 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools subtract
         $strand
         -a $inputA
         -b $inputB
         -f $overlap
         $removeIfOverlap
-        &gt; $output
+        > $output
+]]>
     </command>
     <inputs>
         <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
         <param format="bed,gff,vcf,gff3" name="inputB" type="data" label="BED/VCF/GFF file"/>
         <expand macro="strand2" />
         <expand macro="overlap" />
-
-        <param name="strand" type="select" label="Calculation based on strandedness?">
-            <option value="" selected="True">Overlaps on either strand</option>
-            <option value="-s">Only overlaps occurring on the **same** strand.</option>
-            <option value="-S">Only overlaps occurring on the **opposite** strand.</option>
-        </param>
-
         <param name="removeIfOverlap" type="select" label="Calculation based on strandedness?">
             <option value="" selected="True">Dont Remove entire feature on overlap</option>
-            <option value="-A">Remove entire feature if any overlap. That is, by default, only subtract the portion of A that overlaps B. Here, if any overlap is found (or -f amount), the entire feature is removed.</option>
-            <option value="-N">Same as -A except when used with -f, the amount is the sum of all features (not any single feature).</option>
+            <option value="-A">Remove entire feature if any overlap. That is, by default, only subtract the portion of A that overlaps B. Here, if any overlap is found (or -f amount), the entire feature is removed</option>
+            <option value="-N">Same as -A except when used with -f, the amount is the sum of all features (not any single feature)</option>
         </param>
     </inputs>
     <outputs>
-        <data format_source="inputA" name="output" metadata_source="inputA" label=""/>
+        <data format_source="inputA" name="output" metadata_source="inputA"/>
     </outputs>
+    <tests>
+        <test>
+            <param name="inputA" value="subtractBed1.bed" ftype="bed" />
+            <param name="inputB" value="subtractBed2.bed" ftype="bed" />
+            <output name="output" file="subtractBed_result1.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="subtractBed1.bed" ftype="bed" />
+            <param name="inputB" value="subtractBed2.bed" ftype="bed" />
+            <param name="overlap" value="0.80" />
+            <output name="output" file="subtractBed_result2.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="subtractBed1.bed" ftype="bed" />
+            <param name="inputB" value="subtractBed2.bed" ftype="bed" />
+            <param name="removeIfOverlap" value="-A" />
+            <output name="output" file="subtractBed_result3.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 bedtools subtract searches for features in B that overlap A. If an overlapping feature is found in B, the overlapping portion is removed from A and the remaining portion of A is reported. If a feature in B overlaps all of a feature in A, the A feature will not be reported.
@@ -44,6 +58,7 @@
 .. image:: $PATH_TO_IMAGES/subtract-glyph.png
 
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 tagBed.xml
--- a/tagBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/tagBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,46 +6,50 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
+        #set files = '" "'.join( [ str( $file ) for $file in $inputB ] )
         bedtools tag
-        -i $inputA
-        -files 
-        #for $bed in beds:
-            $bed.input
-        #end for
+        -i "${inputA}"
+        -files "${files}"
         -f $overlap
         $strand
-        -tag $tag
+        -tag "${tag}"
         $field
-        &gt; $output
+        > "${output}"
+]]>
     </command>
     <inputs>
-        <param format="bam" name="inputA" type="data" label="BAM file"/>
-
-        <repeat name="beds" title="Add files" >
-            <param name="input" format="bed,gff,vcf" type="data" label="BED/VCF/GFF file" />
-        </repeat>
+        <param name="inputA" format="bam" type="data" label="BAM file"/>
+        <param name="inputB" format="bed,gff,vcf" multiple="True" type="data" label="BED/VCF/GFF file" />
         <expand macro="strand2" />
         <expand macro="overlap" />
-        
-        <param name="tag" type="text" value="YB" label="Dictate what the tag should be." />
-        <param name="field" type="select" label="Use which field from the annotation files to populate tags?">
-            <option value="-labels" selected="True">labels</option>
+        <param name="tag" type="text" value="YB" label="Specify the tag to use" />
+        <param name="field" type="select" label="Field from the annotation files to populate tags?">
+            <option value="-labels" selected="True">Labels</option>
             <option value="-scores">Scores</option>
             <option value="-names">Names</option>
             <option value="-labels -intervals">Intervals</option>
         </param>
     </inputs>
     <outputs>
-        <data format="bed" name="output" label="" />
+        <data format="bam" name="output"/>
     </outputs>
+    <tests>
+        <test>
+            <param name="inputA" value="srma_in3.bam" ftype="bam" />
+            <param name="inputB" value="tagBed1.bed" ftype="bed" />
+            <param name="field" value="-names" />
+            <output name="output" file="tagBed_result1.bam" ftype="bam" />
+        </test>
+    </tests>
     <help>
-    
+<![CDATA[
 **What it does**
 
 Annotates a BAM file based on overlaps with multiple BED/GFF/VCF files on the intervals in an input bam file
 
 @REFERENCES@
-
+]]>
     </help>
     <expand macro="citations" />
 </tool>
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/0.bed
--- a/test-data/0.bed Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,4 +0,0 @@
-chr1 100 200
-chr1 180 250
-chr1 250 500
-chr1 501 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/0_result.bed
--- a/test-data/0_result.bed Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,2 +0,0 @@
-chr1 100 500
-chr1 501 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/1.bed
--- a/test-data/1.bed Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,4 +0,0 @@
-chr1 100 200 a1 1 +
-chr1 180 250 a2 2 +
-chr1 250 500 a3 3 -
-chr1 501 1000 a4 4 +
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/1_result.bed
--- a/test-data/1_result.bed Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,3 +0,0 @@
-chr1 100 250 +
-chr1 501 1000 +
-chr1 250 500 -
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/2.bed
--- a/test-data/2.bed Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,4 +0,0 @@
-chr1 100 200
-chr1 180 250
-chr1 250 500
-chr1 501 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/2_result.bed
--- a/test-data/2_result.bed Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,2 +0,0 @@
-chr1 100 500 3
-chr1 501 1000 1
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/3.bed
--- a/test-data/3.bed Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,2 +0,0 @@
-chr1 100 200
-chr1 501 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/3_result_1000.bed
--- a/test-data/3_result_1000.bed Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,1 +0,0 @@
-chr1 100 200 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/A.bed
--- a/test-data/A.bed Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,5 +0,0 @@
-chr1 100 200
-chr1 180 250
-chr1 250 500
-chr1 501 1000
-
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/a.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/a.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,4 @@
+chr1 100 200
+chr1 180 250
+chr1 250 500
+chr1 501 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/annotateBed_result.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/annotateBed_result.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr1 100 200 nasty 1 - 0.500000 1.000000 0.300000
+chr2 500 1000 ugly 2 + 0.000000 0.600000 1.000000
+chr3 1000 5000 big 3 - 1.000000 0.250000 0.000000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/bamToBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bamToBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,8 @@
+dummy_chr 1278 1354 GA5:3:2:1710:1301#0 18 +
+dummy_chr 128881 128957 GA5:3:24:462:583#0 37 +
+dummy_chr 5591012 5591088 GA5:3:29:1241:1653#0 37 +
+dummy_chr 11880047 11880123 GA5:3:33:1591:303#0 37 +
+dummy_chr 11880930 11881006 GA5:3:31:677:1537#0 37 -
+dummy_chr 11913867 11913943 GA5:3:49:1480:1116#0 37 -
+dummy_chr 13030395 13030471 GA5:3:61:213:1812#0 37 -
+dummy_chr 15055983 15056059 GA5:3:116:1581:552#0 37 -
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/bamToBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bamToBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,8 @@
+dummy_chr 1278 1354 GA5:3:2:1710:1301#0 0 +
+dummy_chr 128881 128957 GA5:3:24:462:583#0 3 +
+dummy_chr 5591012 5591088 GA5:3:29:1241:1653#0 1 +
+dummy_chr 11880047 11880123 GA5:3:33:1591:303#0 0 +
+dummy_chr 11880930 11881006 GA5:3:31:677:1537#0 0 -
+dummy_chr 11913867 11913943 GA5:3:49:1480:1116#0 1 -
+dummy_chr 13030395 13030471 GA5:3:61:213:1812#0 1 -
+dummy_chr 15055983 15056059 GA5:3:116:1581:552#0 0 -
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/bed12.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bed12.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr1 14756 15038 JUNC00000001 294 - 14756 15038 255,0,0 2 73,69 0,213
+chr1 14969 15836 JUNC00000002 144 - 14969 15836 255,0,0 2 69,41 0,826
+chr1 15905 16677 JUNC00000003 12 - 15905 16677 255,0,0 2 42,71 0,701
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/bed12ToBed6_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bed12ToBed6_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,6 @@
+chr1 14756 14829 JUNC00000001 294 -
+chr1 14969 15038 JUNC00000001 294 -
+chr1 14969 15038 JUNC00000002 144 -
+chr1 15795 15836 JUNC00000002 144 -
+chr1 15905 15947 JUNC00000003 12 -
+chr1 16606 16677 JUNC00000003 12 -
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/bedToBam1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bedToBam1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,5 @@
+chr1 100 200 foo
+chr1 180 250 bar
+chr1 250 500 world
+chr1 501 1000 peace
+
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/bedToBam_result.bam
b
Binary file test-data/bedToBam_result.bam has changed
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/bedpeToBamBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bedpeToBamBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 100 200 chr5 5000 5100 bedpe_example1 30 + -
+chr9 1000 5000 chr9 3000 3800 bedpe_example2 100 + -
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/bedpeToBam_result1.bam
b
Binary file test-data/bedpeToBam_result1.bam has changed
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/closestBed_a.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/closestBed_a.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 10 20 a1 1 -
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/closestBed_b1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/closestBed_b1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 5 6 b1.1 1 -
+chr1 30 40 b1.2 2 +
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/closestBed_b2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/closestBed_b2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 0 1 b2.1 1 -
+chr1 21 22 b2.2 2 +
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/closestBed_c.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/closestBed_c.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 10 20 a1 1 +
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/closestBed_d.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/closestBed_d.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 7 8 b1 1 +
+chr1 22 23 b2 2 -
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/closestBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/closestBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 100 200 chr1 500 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/closestBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/closestBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 10 20 a1 1 - 1 chr1 5 6 b1.1 1 - 5
+chr1 10 20 a1 1 - 2 chr1 21 22 b2.2 2 + 2
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/closestBed_result3.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/closestBed_result3.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 10 20 a1 1 - 2 chr1 21 22 b2.2 2 + 2
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/closestBed_result4.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/closestBed_result4.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 10 20 a1 1 + chr1 7 8 b1 1 + -3
+chr1 10 20 a1 1 + chr1 22 23 b2 2 - 3
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/closestBed_result5.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/closestBed_result5.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 10 20 a1 1 + chr1 7 8 b1 1 + -3
+chr1 10 20 a1 1 + chr1 22 23 b2 2 - 3
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/clusterBed_result.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/clusterBed_result.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,4 @@
+chr1 100 200 1
+chr1 180 250 1
+chr1 250 500 1
+chr1 501 1000 2
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/complementBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/complementBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr1 0 100
+chr1 500 501
+chr1 1000 197195432
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/coverageBedA.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/coverageBedA.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,4 @@
+chr1 10 20
+chr1 20 30
+chr1 30 40
+chr1 100 200
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/coverageBedB.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/coverageBedB.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr1 0 100
+chr1 100 200
+chr2 0 100
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/coverageBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/coverageBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,4 @@
+chr1 10 20 1 10 10 1.0000000
+chr1 20 30 1 10 10 1.0000000
+chr1 30 40 1 10 10 1.0000000
+chr1 100 200 1 100 100 1.0000000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/expandBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/expandBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 10 20 1,2,3 10,20,30
+chr1 40 50 4,5,6 40,50,60
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/expandBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/expandBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,6 @@
+chr1 10 20 1,2,3 10
+chr1 10 20 1,2,3 20
+chr1 10 20 1,2,3 30
+chr1 40 50 4,5,6 40
+chr1 40 50 4,5,6 50
+chr1 40 50 4,5,6 60
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/expandBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/expandBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,6 @@
+chr1 10 20 1 10
+chr1 10 20 2 20
+chr1 10 20 3 30
+chr1 40 50 4 40
+chr1 40 50 5 50
+chr1 40 50 6 60
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/fisherBed.len
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/fisherBed.len Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 500
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/fisherBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/fisherBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr1 10 20
+chr1 30 40
+chr1 51 52
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/fisherBed2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/fisherBed2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 15 25
+chr1 51 52
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/fisherBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/fisherBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,14 @@
+# Number of query intervals: 3
+# Number of db intervals: 2
+# Number of overlaps: 2
+# Number of possible intervals (estimated): 34
+# phyper(2 - 1, 3, 34 - 3, 2, lower.tail=F)
+# Contingency Table Of Counts
+#_________________________________________
+#           |  in -b       | not in -b    |
+#     in -a | 2            | 1            |
+# not in -a | 0            | 31           |
+#_________________________________________
+# p-values for fisher's exact test
+left right two-tail ratio
+1 0.0053476 0.0053476 inf
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/flankBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/flankBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,8 @@
+chr1 95 100
+chr1 200 205
+chr1 175 180
+chr1 250 255
+chr1 245 250
+chr1 500 505
+chr1 496 501
+chr1 1000 1005
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/flankBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/flankBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,8 @@
+chr1 98 100
+chr1 200 203
+chr1 178 180
+chr1 250 253
+chr1 248 250
+chr1 500 503
+chr1 499 501
+chr1 1000 1003
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/genomeCoverageBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/genomeCoverageBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr1 10 20
+chr1 20 30
+chr2 0 500
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/genomeCoverageBed1.len
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/genomeCoverageBed1.len Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 1000
+chr2 500
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/genomeCoverageBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/genomeCoverageBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr1 0 1000 1000 1
+chr2 0 500 500 1
+genome 0 1500 1500 1
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/getfastaBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/getfastaBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+>chr1:10-100
+TTCTTACCTATTAGTGGTTGAACATCGTGATATGTATGTTGACGGCCATAAGGCTGCTTCTTGTTGTCGATAGAACTTCATGTGCCTGTA
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/getfastaBed_result2.tabular
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/getfastaBed_result2.tabular Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1:10-100 TTCTTACCTATTAGTGGTTGAACATCGTGATATGTATGTTGACGGCCATAAGGCTGCTTCTTGTTGTCGATAGAACTTCATGTGCCTGTA
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/groupbyBed.bed
--- a/test-data/groupbyBed.bed Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,14 +0,0 @@
-chr21 9719758 9729320 variant1 chr21 9719768 9721892 ALR/Alpha 1004 +
-chr21 9719758 9729320 variant1 chr21 9721905 9725582 ALR/Alpha 1010 +
-chr21 9719758 9729320 variant1 chr21 9725582 9725977 L1PA3 3288 +
-chr21 9719758 9729320 variant1 chr21 9726021 9729309 ALR/Alpha 1051 +
-chr21 9729310 9757478 variant2 chr21 9729320 9729809 L1PA3 3897 -
-chr21 9729310 9757478 variant2 chr21 9729809 9730866 L1P1 8367 +
-chr21 9729310 9757478 variant2 chr21 9730866 9734026 ALR/Alpha 1036 -
-chr21 9729310 9757478 variant2 chr21 9734037 9757471 ALR/Alpha 1182 -
-chr21 9795588 9796685 variant3 chr21 9795589 9795713 (GAATG)n 308 +
-chr21 9795588 9796685 variant3 chr21 9795736 9795894 (GAATG)n 683 +
-chr21 9795588 9796685 variant3 chr21 9795911 9796007 (GAATG)n 345 +
-chr21 9795588 9796685 variant3 chr21 9796028 9796187 (GAATG)n 756 +
-chr21 9795588 9796685 variant3 chr21 9796202 9796615 (GAATG)n 891 +
-chr21 9795588 9796685 variant3 chr21 9796637 9796824 (GAATG)n 621 +
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/groupbyBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/groupbyBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,14 @@
+chr21 9719758 9729320 variant1 chr21 9719768 9721892 ALR/Alpha 1004 +
+chr21 9719758 9729320 variant1 chr21 9721905 9725582 ALR/Alpha 1010 +
+chr21 9719758 9729320 variant1 chr21 9725582 9725977 L1PA3 3288 +
+chr21 9719758 9729320 variant1 chr21 9726021 9729309 ALR/Alpha 1051 +
+chr21 9729310 9757478 variant2 chr21 9729320 9729809 L1PA3 3897 -
+chr21 9729310 9757478 variant2 chr21 9729809 9730866 L1P1 8367 +
+chr21 9729310 9757478 variant2 chr21 9730866 9734026 ALR/Alpha 1036 -
+chr21 9729310 9757478 variant2 chr21 9734037 9757471 ALR/Alpha 1182 -
+chr21 9795588 9796685 variant3 chr21 9795589 9795713 (GAATG)n 308 +
+chr21 9795588 9796685 variant3 chr21 9795736 9795894 (GAATG)n 683 +
+chr21 9795588 9796685 variant3 chr21 9795911 9796007 (GAATG)n 345 +
+chr21 9795588 9796685 variant3 chr21 9796028 9796187 (GAATG)n 756 +
+chr21 9795588 9796685 variant3 chr21 9796202 9796615 (GAATG)n 891 +
+chr21 9795588 9796685 variant3 chr21 9796637 9796824 (GAATG)n 621 +
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/groupbyBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/groupbyBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr21 9719758 9729320 6353
+chr21 9729310 9757478 14482
+chr21 9795588 9796685 3604
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/groupbyBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/groupbyBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr21 9719758 9729320 1004
+chr21 9729310 9757478 1036
+chr21 9795588 9796685 308
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/groupbyBed_result3.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/groupbyBed_result3.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr21 9719758 9729320 variant1 1030.5
+chr21 9729310 9757478 variant2 2539.5
+chr21 9795588 9796685 variant3 652
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/groupbyinput.bed
--- a/test-data/groupbyinput.bed Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,14 +0,0 @@
-chr21 9719758 9729320 variant1 chr21 9719768 9721892 ALR/Alpha 1004 +
-chr21 9719758 9729320 variant1 chr21 9721905 9725582 ALR/Alpha 1010 +
-chr21 9719758 9729320 variant1 chr21 9725582 9725977 L1PA3 3288 +
-chr21 9719758 9729320 variant1 chr21 9726021 9729309 ALR/Alpha 1051 +
-chr21 9729310 9757478 variant2 chr21 9729320 9729809 L1PA3 3897 -
-chr21 9729310 9757478 variant2 chr21 9729809 9730866 L1P1 8367 +
-chr21 9729310 9757478 variant2 chr21 9730866 9734026 ALR/Alpha 1036 -
-chr21 9729310 9757478 variant2 chr21 9734037 9757471 ALR/Alpha 1182 -
-chr21 9795588 9796685 variant3 chr21 9795589 9795713 (GAATG)n 308 +
-chr21 9795588 9796685 variant3 chr21 9795736 9795894 (GAATG)n 683 +
-chr21 9795588 9796685 variant3 chr21 9795911 9796007 (GAATG)n 345 +
-chr21 9795588 9796685 variant3 chr21 9796028 9796187 (GAATG)n 756 +
-chr21 9795588 9796685 variant3 chr21 9796202 9796615 (GAATG)n 891 +
-chr21 9795588 9796685 variant3 chr21 9796637 9796824 (GAATG)n 621 +
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/intersectBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersectBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 10 20
+chr1 30 40
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/intersectBed2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersectBed2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 15 20
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/intersectBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersectBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 10 20
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/intersectBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersectBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 10 20 chr1 15 20
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/intersectBed_result3.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intersectBed_result3.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 30 40
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/jaccardBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/jaccardBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 10 20
+chr1 30 40
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/jaccardBed2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/jaccardBed2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 15 20
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/jaccardBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/jaccardBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+intersection union-intersection jaccard n_intersections
+5 20 0.25 1
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/jaccardBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/jaccardBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+intersection union-intersection jaccard n_intersections
+5 20 0.25 1
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/linksBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/linksBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr21 9928613 10012791 uc002yip.1 0 -
+chr21 9928613 10012791 uc002yiq.1 0 -
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/linksBed_result1.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/linksBed_result1.html Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,33 @@
+<html>
+ <body>
+<title>/tmp/tmp5hihJcfiles/000/dataset_1.dat</title>
+<br>Firefox users: Press and hold the "apple" or "alt" key and click link to open in new tab.
+<p style="font-family:courier">
+<table border="0" align="justify"
+<h3>BED Entries from: stdin </h3>
+<tr>
+ <td>
+ <a href=http://genome.ucsc.edu/cgi-bin/hgTracks?org=&db=&position=chr21:9928613-10012791>chr21:9928614-10012791</a>
+ </td>
+ <td>
+uc002yip.1 0
+ </td>
+ <td>
+-
+ </td>
+</tr>
+<tr>
+ <td>
+ <a href=http://genome.ucsc.edu/cgi-bin/hgTracks?org=&db=&position=chr21:9928613-10012791>chr21:9928614-10012791</a>
+ </td>
+ <td>
+uc002yiq.1 0
+ </td>
+ <td>
+-
+ </td>
+</tr>
+</table>
+</p>
+ </body>
+</html>
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/linksBed_result2.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/linksBed_result2.html Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,33 @@
+<html>
+ <body>
+<title>/tmp/tmp5hihJcfiles/000/dataset_3.dat</title>
+<br>Firefox users: Press and hold the "apple" or "alt" key and click link to open in new tab.
+<p style="font-family:courier">
+<table border="0" align="justify"
+<h3>BED Entries from: stdin </h3>
+<tr>
+ <td>
+ <a href=http://genome.ucsc.edu/cgi-bin/hgTracks?org=mouse&db=mm9&position=chr21:9928613-10012791>chr21:9928614-10012791</a>
+ </td>
+ <td>
+uc002yip.1 0
+ </td>
+ <td>
+-
+ </td>
+</tr>
+<tr>
+ <td>
+ <a href=http://genome.ucsc.edu/cgi-bin/hgTracks?org=mouse&db=mm9&position=chr21:9928613-10012791>chr21:9928614-10012791</a>
+ </td>
+ <td>
+uc002yiq.1 0
+ </td>
+ <td>
+-
+ </td>
+</tr>
+</table>
+</p>
+ </body>
+</html>
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/makeWindowBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/makeWindowBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr5 60000 70000
+chr5 73000 90000
+chr5 100000 101000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/makeWindowBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/makeWindowBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,198 @@
+chr1 0 1000000
+chr1 1000000 2000000
+chr1 2000000 3000000
+chr1 3000000 4000000
+chr1 4000000 5000000
+chr1 5000000 6000000
+chr1 6000000 7000000
+chr1 7000000 8000000
+chr1 8000000 9000000
+chr1 9000000 10000000
+chr1 10000000 11000000
+chr1 11000000 12000000
+chr1 12000000 13000000
+chr1 13000000 14000000
+chr1 14000000 15000000
+chr1 15000000 16000000
+chr1 16000000 17000000
+chr1 17000000 18000000
+chr1 18000000 19000000
+chr1 19000000 20000000
+chr1 20000000 21000000
+chr1 21000000 22000000
+chr1 22000000 23000000
+chr1 23000000 24000000
+chr1 24000000 25000000
+chr1 25000000 26000000
+chr1 26000000 27000000
+chr1 27000000 28000000
+chr1 28000000 29000000
+chr1 29000000 30000000
+chr1 30000000 31000000
+chr1 31000000 32000000
+chr1 32000000 33000000
+chr1 33000000 34000000
+chr1 34000000 35000000
+chr1 35000000 36000000
+chr1 36000000 37000000
+chr1 37000000 38000000
+chr1 38000000 39000000
+chr1 39000000 40000000
+chr1 40000000 41000000
+chr1 41000000 42000000
+chr1 42000000 43000000
+chr1 43000000 44000000
+chr1 44000000 45000000
+chr1 45000000 46000000
+chr1 46000000 47000000
+chr1 47000000 48000000
+chr1 48000000 49000000
+chr1 49000000 50000000
+chr1 50000000 51000000
+chr1 51000000 52000000
+chr1 52000000 53000000
+chr1 53000000 54000000
+chr1 54000000 55000000
+chr1 55000000 56000000
+chr1 56000000 57000000
+chr1 57000000 58000000
+chr1 58000000 59000000
+chr1 59000000 60000000
+chr1 60000000 61000000
+chr1 61000000 62000000
+chr1 62000000 63000000
+chr1 63000000 64000000
+chr1 64000000 65000000
+chr1 65000000 66000000
+chr1 66000000 67000000
+chr1 67000000 68000000
+chr1 68000000 69000000
+chr1 69000000 70000000
+chr1 70000000 71000000
+chr1 71000000 72000000
+chr1 72000000 73000000
+chr1 73000000 74000000
+chr1 74000000 75000000
+chr1 75000000 76000000
+chr1 76000000 77000000
+chr1 77000000 78000000
+chr1 78000000 79000000
+chr1 79000000 80000000
+chr1 80000000 81000000
+chr1 81000000 82000000
+chr1 82000000 83000000
+chr1 83000000 84000000
+chr1 84000000 85000000
+chr1 85000000 86000000
+chr1 86000000 87000000
+chr1 87000000 88000000
+chr1 88000000 89000000
+chr1 89000000 90000000
+chr1 90000000 91000000
+chr1 91000000 92000000
+chr1 92000000 93000000
+chr1 93000000 94000000
+chr1 94000000 95000000
+chr1 95000000 96000000
+chr1 96000000 97000000
+chr1 97000000 98000000
+chr1 98000000 99000000
+chr1 99000000 100000000
+chr1 100000000 101000000
+chr1 101000000 102000000
+chr1 102000000 103000000
+chr1 103000000 104000000
+chr1 104000000 105000000
+chr1 105000000 106000000
+chr1 106000000 107000000
+chr1 107000000 108000000
+chr1 108000000 109000000
+chr1 109000000 110000000
+chr1 110000000 111000000
+chr1 111000000 112000000
+chr1 112000000 113000000
+chr1 113000000 114000000
+chr1 114000000 115000000
+chr1 115000000 116000000
+chr1 116000000 117000000
+chr1 117000000 118000000
+chr1 118000000 119000000
+chr1 119000000 120000000
+chr1 120000000 121000000
+chr1 121000000 122000000
+chr1 122000000 123000000
+chr1 123000000 124000000
+chr1 124000000 125000000
+chr1 125000000 126000000
+chr1 126000000 127000000
+chr1 127000000 128000000
+chr1 128000000 129000000
+chr1 129000000 130000000
+chr1 130000000 131000000
+chr1 131000000 132000000
+chr1 132000000 133000000
+chr1 133000000 134000000
+chr1 134000000 135000000
+chr1 135000000 136000000
+chr1 136000000 137000000
+chr1 137000000 138000000
+chr1 138000000 139000000
+chr1 139000000 140000000
+chr1 140000000 141000000
+chr1 141000000 142000000
+chr1 142000000 143000000
+chr1 143000000 144000000
+chr1 144000000 145000000
+chr1 145000000 146000000
+chr1 146000000 147000000
+chr1 147000000 148000000
+chr1 148000000 149000000
+chr1 149000000 150000000
+chr1 150000000 151000000
+chr1 151000000 152000000
+chr1 152000000 153000000
+chr1 153000000 154000000
+chr1 154000000 155000000
+chr1 155000000 156000000
+chr1 156000000 157000000
+chr1 157000000 158000000
+chr1 158000000 159000000
+chr1 159000000 160000000
+chr1 160000000 161000000
+chr1 161000000 162000000
+chr1 162000000 163000000
+chr1 163000000 164000000
+chr1 164000000 165000000
+chr1 165000000 166000000
+chr1 166000000 167000000
+chr1 167000000 168000000
+chr1 168000000 169000000
+chr1 169000000 170000000
+chr1 170000000 171000000
+chr1 171000000 172000000
+chr1 172000000 173000000
+chr1 173000000 174000000
+chr1 174000000 175000000
+chr1 175000000 176000000
+chr1 176000000 177000000
+chr1 177000000 178000000
+chr1 178000000 179000000
+chr1 179000000 180000000
+chr1 180000000 181000000
+chr1 181000000 182000000
+chr1 182000000 183000000
+chr1 183000000 184000000
+chr1 184000000 185000000
+chr1 185000000 186000000
+chr1 186000000 187000000
+chr1 187000000 188000000
+chr1 188000000 189000000
+chr1 189000000 190000000
+chr1 190000000 191000000
+chr1 191000000 192000000
+chr1 192000000 193000000
+chr1 193000000 194000000
+chr1 194000000 195000000
+chr1 195000000 196000000
+chr1 196000000 197000000
+chr1 197000000 197195432
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/makeWindowBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/makeWindowBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
b'@@ -0,0 +1,3944 @@\n+chr1\t0\t1000000\n+chr1\t50000\t1050000\n+chr1\t100000\t1100000\n+chr1\t150000\t1150000\n+chr1\t200000\t1200000\n+chr1\t250000\t1250000\n+chr1\t300000\t1300000\n+chr1\t350000\t1350000\n+chr1\t400000\t1400000\n+chr1\t450000\t1450000\n+chr1\t500000\t1500000\n+chr1\t550000\t1550000\n+chr1\t600000\t1600000\n+chr1\t650000\t1650000\n+chr1\t700000\t1700000\n+chr1\t750000\t1750000\n+chr1\t800000\t1800000\n+chr1\t850000\t1850000\n+chr1\t900000\t1900000\n+chr1\t950000\t1950000\n+chr1\t1000000\t2000000\n+chr1\t1050000\t2050000\n+chr1\t1100000\t2100000\n+chr1\t1150000\t2150000\n+chr1\t1200000\t2200000\n+chr1\t1250000\t2250000\n+chr1\t1300000\t2300000\n+chr1\t1350000\t2350000\n+chr1\t1400000\t2400000\n+chr1\t1450000\t2450000\n+chr1\t1500000\t2500000\n+chr1\t1550000\t2550000\n+chr1\t1600000\t2600000\n+chr1\t1650000\t2650000\n+chr1\t1700000\t2700000\n+chr1\t1750000\t2750000\n+chr1\t1800000\t2800000\n+chr1\t1850000\t2850000\n+chr1\t1900000\t2900000\n+chr1\t1950000\t2950000\n+chr1\t2000000\t3000000\n+chr1\t2050000\t3050000\n+chr1\t2100000\t3100000\n+chr1\t2150000\t3150000\n+chr1\t2200000\t3200000\n+chr1\t2250000\t3250000\n+chr1\t2300000\t3300000\n+chr1\t2350000\t3350000\n+chr1\t2400000\t3400000\n+chr1\t2450000\t3450000\n+chr1\t2500000\t3500000\n+chr1\t2550000\t3550000\n+chr1\t2600000\t3600000\n+chr1\t2650000\t3650000\n+chr1\t2700000\t3700000\n+chr1\t2750000\t3750000\n+chr1\t2800000\t3800000\n+chr1\t2850000\t3850000\n+chr1\t2900000\t3900000\n+chr1\t2950000\t3950000\n+chr1\t3000000\t4000000\n+chr1\t3050000\t4050000\n+chr1\t3100000\t4100000\n+chr1\t3150000\t4150000\n+chr1\t3200000\t4200000\n+chr1\t3250000\t4250000\n+chr1\t3300000\t4300000\n+chr1\t3350000\t4350000\n+chr1\t3400000\t4400000\n+chr1\t3450000\t4450000\n+chr1\t3500000\t4500000\n+chr1\t3550000\t4550000\n+chr1\t3600000\t4600000\n+chr1\t3650000\t4650000\n+chr1\t3700000\t4700000\n+chr1\t3750000\t4750000\n+chr1\t3800000\t4800000\n+chr1\t3850000\t4850000\n+chr1\t3900000\t4900000\n+chr1\t3950000\t4950000\n+chr1\t4000000\t5000000\n+chr1\t4050000\t5050000\n+chr1\t4100000\t5100000\n+chr1\t4150000\t5150000\n+chr1\t4200000\t5200000\n+chr1\t4250000\t5250000\n+chr1\t4300000\t5300000\n+chr1\t4350000\t5350000\n+chr1\t4400000\t5400000\n+chr1\t4450000\t5450000\n+chr1\t4500000\t5500000\n+chr1\t4550000\t5550000\n+chr1\t4600000\t5600000\n+chr1\t4650000\t5650000\n+chr1\t4700000\t5700000\n+chr1\t4750000\t5750000\n+chr1\t4800000\t5800000\n+chr1\t4850000\t5850000\n+chr1\t4900000\t5900000\n+chr1\t4950000\t5950000\n+chr1\t5000000\t6000000\n+chr1\t5050000\t6050000\n+chr1\t5100000\t6100000\n+chr1\t5150000\t6150000\n+chr1\t5200000\t6200000\n+chr1\t5250000\t6250000\n+chr1\t5300000\t6300000\n+chr1\t5350000\t6350000\n+chr1\t5400000\t6400000\n+chr1\t5450000\t6450000\n+chr1\t5500000\t6500000\n+chr1\t5550000\t6550000\n+chr1\t5600000\t6600000\n+chr1\t5650000\t6650000\n+chr1\t5700000\t6700000\n+chr1\t5750000\t6750000\n+chr1\t5800000\t6800000\n+chr1\t5850000\t6850000\n+chr1\t5900000\t6900000\n+chr1\t5950000\t6950000\n+chr1\t6000000\t7000000\n+chr1\t6050000\t7050000\n+chr1\t6100000\t7100000\n+chr1\t6150000\t7150000\n+chr1\t6200000\t7200000\n+chr1\t6250000\t7250000\n+chr1\t6300000\t7300000\n+chr1\t6350000\t7350000\n+chr1\t6400000\t7400000\n+chr1\t6450000\t7450000\n+chr1\t6500000\t7500000\n+chr1\t6550000\t7550000\n+chr1\t6600000\t7600000\n+chr1\t6650000\t7650000\n+chr1\t6700000\t7700000\n+chr1\t6750000\t7750000\n+chr1\t6800000\t7800000\n+chr1\t6850000\t7850000\n+chr1\t6900000\t7900000\n+chr1\t6950000\t7950000\n+chr1\t7000000\t8000000\n+chr1\t7050000\t8050000\n+chr1\t7100000\t8100000\n+chr1\t7150000\t8150000\n+chr1\t7200000\t8200000\n+chr1\t7250000\t8250000\n+chr1\t7300000\t8300000\n+chr1\t7350000\t8350000\n+chr1\t7400000\t8400000\n+chr1\t7450000\t8450000\n+chr1\t7500000\t8500000\n+chr1\t7550000\t8550000\n+chr1\t7600000\t8600000\n+chr1\t7650000\t8650000\n+chr1\t7700000\t8700000\n+chr1\t7750000\t8750000\n+chr1\t7800000\t8800000\n+chr1\t7850000\t8850000\n+chr1\t7900000\t8900000\n+chr1\t7950000\t8950000\n+chr1\t8000000\t9000000\n+chr1\t8050000\t9050000\n+chr1\t8100000\t9100000\n+chr1\t8150000\t9150000\n+chr1\t8200000\t9200000\n+chr1\t8250000\t9250000\n+chr1\t8300000\t9300000\n+chr1\t8350000\t9350000\n+chr1\t8400000\t9400000\n+chr1\t8450000\t9450000\n+chr1\t8500000\t9500000\n+chr1\t8550000\t9550000\n+chr1\t8600000\t9600000\n+chr1\t8650000\t9650000\n+chr1\t8700000\t9700000\n+chr1\t8750000\t9750000\n+chr1\t8800000\t9800000\n+chr1\t8850000\t9850000\n+chr1\t8900000\t9900000\n+chr1\t8950000\t9950000\n+chr1\t9000000\t10000000\n+chr1\t9050000\t10050000\n'..b'\t189500000\t190500000\n+chr1\t189550000\t190550000\n+chr1\t189600000\t190600000\n+chr1\t189650000\t190650000\n+chr1\t189700000\t190700000\n+chr1\t189750000\t190750000\n+chr1\t189800000\t190800000\n+chr1\t189850000\t190850000\n+chr1\t189900000\t190900000\n+chr1\t189950000\t190950000\n+chr1\t190000000\t191000000\n+chr1\t190050000\t191050000\n+chr1\t190100000\t191100000\n+chr1\t190150000\t191150000\n+chr1\t190200000\t191200000\n+chr1\t190250000\t191250000\n+chr1\t190300000\t191300000\n+chr1\t190350000\t191350000\n+chr1\t190400000\t191400000\n+chr1\t190450000\t191450000\n+chr1\t190500000\t191500000\n+chr1\t190550000\t191550000\n+chr1\t190600000\t191600000\n+chr1\t190650000\t191650000\n+chr1\t190700000\t191700000\n+chr1\t190750000\t191750000\n+chr1\t190800000\t191800000\n+chr1\t190850000\t191850000\n+chr1\t190900000\t191900000\n+chr1\t190950000\t191950000\n+chr1\t191000000\t192000000\n+chr1\t191050000\t192050000\n+chr1\t191100000\t192100000\n+chr1\t191150000\t192150000\n+chr1\t191200000\t192200000\n+chr1\t191250000\t192250000\n+chr1\t191300000\t192300000\n+chr1\t191350000\t192350000\n+chr1\t191400000\t192400000\n+chr1\t191450000\t192450000\n+chr1\t191500000\t192500000\n+chr1\t191550000\t192550000\n+chr1\t191600000\t192600000\n+chr1\t191650000\t192650000\n+chr1\t191700000\t192700000\n+chr1\t191750000\t192750000\n+chr1\t191800000\t192800000\n+chr1\t191850000\t192850000\n+chr1\t191900000\t192900000\n+chr1\t191950000\t192950000\n+chr1\t192000000\t193000000\n+chr1\t192050000\t193050000\n+chr1\t192100000\t193100000\n+chr1\t192150000\t193150000\n+chr1\t192200000\t193200000\n+chr1\t192250000\t193250000\n+chr1\t192300000\t193300000\n+chr1\t192350000\t193350000\n+chr1\t192400000\t193400000\n+chr1\t192450000\t193450000\n+chr1\t192500000\t193500000\n+chr1\t192550000\t193550000\n+chr1\t192600000\t193600000\n+chr1\t192650000\t193650000\n+chr1\t192700000\t193700000\n+chr1\t192750000\t193750000\n+chr1\t192800000\t193800000\n+chr1\t192850000\t193850000\n+chr1\t192900000\t193900000\n+chr1\t192950000\t193950000\n+chr1\t193000000\t194000000\n+chr1\t193050000\t194050000\n+chr1\t193100000\t194100000\n+chr1\t193150000\t194150000\n+chr1\t193200000\t194200000\n+chr1\t193250000\t194250000\n+chr1\t193300000\t194300000\n+chr1\t193350000\t194350000\n+chr1\t193400000\t194400000\n+chr1\t193450000\t194450000\n+chr1\t193500000\t194500000\n+chr1\t193550000\t194550000\n+chr1\t193600000\t194600000\n+chr1\t193650000\t194650000\n+chr1\t193700000\t194700000\n+chr1\t193750000\t194750000\n+chr1\t193800000\t194800000\n+chr1\t193850000\t194850000\n+chr1\t193900000\t194900000\n+chr1\t193950000\t194950000\n+chr1\t194000000\t195000000\n+chr1\t194050000\t195050000\n+chr1\t194100000\t195100000\n+chr1\t194150000\t195150000\n+chr1\t194200000\t195200000\n+chr1\t194250000\t195250000\n+chr1\t194300000\t195300000\n+chr1\t194350000\t195350000\n+chr1\t194400000\t195400000\n+chr1\t194450000\t195450000\n+chr1\t194500000\t195500000\n+chr1\t194550000\t195550000\n+chr1\t194600000\t195600000\n+chr1\t194650000\t195650000\n+chr1\t194700000\t195700000\n+chr1\t194750000\t195750000\n+chr1\t194800000\t195800000\n+chr1\t194850000\t195850000\n+chr1\t194900000\t195900000\n+chr1\t194950000\t195950000\n+chr1\t195000000\t196000000\n+chr1\t195050000\t196050000\n+chr1\t195100000\t196100000\n+chr1\t195150000\t196150000\n+chr1\t195200000\t196200000\n+chr1\t195250000\t196250000\n+chr1\t195300000\t196300000\n+chr1\t195350000\t196350000\n+chr1\t195400000\t196400000\n+chr1\t195450000\t196450000\n+chr1\t195500000\t196500000\n+chr1\t195550000\t196550000\n+chr1\t195600000\t196600000\n+chr1\t195650000\t196650000\n+chr1\t195700000\t196700000\n+chr1\t195750000\t196750000\n+chr1\t195800000\t196800000\n+chr1\t195850000\t196850000\n+chr1\t195900000\t196900000\n+chr1\t195950000\t196950000\n+chr1\t196000000\t197000000\n+chr1\t196050000\t197050000\n+chr1\t196100000\t197100000\n+chr1\t196150000\t197150000\n+chr1\t196200000\t197195432\n+chr1\t196250000\t197195432\n+chr1\t196300000\t197195432\n+chr1\t196350000\t197195432\n+chr1\t196400000\t197195432\n+chr1\t196450000\t197195432\n+chr1\t196500000\t197195432\n+chr1\t196550000\t197195432\n+chr1\t196600000\t197195432\n+chr1\t196650000\t197195432\n+chr1\t196700000\t197195432\n+chr1\t196750000\t197195432\n+chr1\t196800000\t197195432\n+chr1\t196850000\t197195432\n+chr1\t196900000\t197195432\n+chr1\t196950000\t197195432\n+chr1\t197000000\t197195432\n+chr1\t197050000\t197195432\n+chr1\t197100000\t197195432\n+chr1\t197150000\t197195432\n'
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/makeWindowBed_result3.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/makeWindowBed_result3.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,100 @@
+chr1 0 1971955
+chr1 1971955 3943910
+chr1 3943910 5915865
+chr1 5915865 7887820
+chr1 7887820 9859775
+chr1 9859775 11831730
+chr1 11831730 13803685
+chr1 13803685 15775640
+chr1 15775640 17747595
+chr1 17747595 19719550
+chr1 19719550 21691505
+chr1 21691505 23663460
+chr1 23663460 25635415
+chr1 25635415 27607370
+chr1 27607370 29579325
+chr1 29579325 31551280
+chr1 31551280 33523235
+chr1 33523235 35495190
+chr1 35495190 37467145
+chr1 37467145 39439100
+chr1 39439100 41411055
+chr1 41411055 43383010
+chr1 43383010 45354965
+chr1 45354965 47326920
+chr1 47326920 49298875
+chr1 49298875 51270830
+chr1 51270830 53242785
+chr1 53242785 55214740
+chr1 55214740 57186695
+chr1 57186695 59158650
+chr1 59158650 61130605
+chr1 61130605 63102560
+chr1 63102560 65074515
+chr1 65074515 67046470
+chr1 67046470 69018425
+chr1 69018425 70990380
+chr1 70990380 72962335
+chr1 72962335 74934290
+chr1 74934290 76906245
+chr1 76906245 78878200
+chr1 78878200 80850155
+chr1 80850155 82822110
+chr1 82822110 84794065
+chr1 84794065 86766020
+chr1 86766020 88737975
+chr1 88737975 90709930
+chr1 90709930 92681885
+chr1 92681885 94653840
+chr1 94653840 96625795
+chr1 96625795 98597750
+chr1 98597750 100569705
+chr1 100569705 102541660
+chr1 102541660 104513615
+chr1 104513615 106485570
+chr1 106485570 108457525
+chr1 108457525 110429480
+chr1 110429480 112401435
+chr1 112401435 114373390
+chr1 114373390 116345345
+chr1 116345345 118317300
+chr1 118317300 120289255
+chr1 120289255 122261210
+chr1 122261210 124233165
+chr1 124233165 126205120
+chr1 126205120 128177075
+chr1 128177075 130149030
+chr1 130149030 132120985
+chr1 132120985 134092940
+chr1 134092940 136064895
+chr1 136064895 138036850
+chr1 138036850 140008805
+chr1 140008805 141980760
+chr1 141980760 143952715
+chr1 143952715 145924670
+chr1 145924670 147896625
+chr1 147896625 149868580
+chr1 149868580 151840535
+chr1 151840535 153812490
+chr1 153812490 155784445
+chr1 155784445 157756400
+chr1 157756400 159728355
+chr1 159728355 161700310
+chr1 161700310 163672265
+chr1 163672265 165644220
+chr1 165644220 167616175
+chr1 167616175 169588130
+chr1 169588130 171560085
+chr1 171560085 173532040
+chr1 173532040 175503995
+chr1 175503995 177475950
+chr1 177475950 179447905
+chr1 179447905 181419860
+chr1 181419860 183391815
+chr1 183391815 185363770
+chr1 185363770 187335725
+chr1 187335725 189307680
+chr1 189307680 191279635
+chr1 191279635 193251590
+chr1 193251590 195223545
+chr1 195223545 197195432
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/makeWindowBed_result4.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/makeWindowBed_result4.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,45 @@
+chr5 60000 60667
+chr5 60667 61334
+chr5 61334 62001
+chr5 62001 62668
+chr5 62668 63335
+chr5 63335 64002
+chr5 64002 64669
+chr5 64669 65336
+chr5 65336 66003
+chr5 66003 66670
+chr5 66670 67337
+chr5 67337 68004
+chr5 68004 68671
+chr5 68671 69338
+chr5 69338 70000
+chr5 73000 74134
+chr5 74134 75268
+chr5 75268 76402
+chr5 76402 77536
+chr5 77536 78670
+chr5 78670 79804
+chr5 79804 80938
+chr5 80938 82072
+chr5 82072 83206
+chr5 83206 84340
+chr5 84340 85474
+chr5 85474 86608
+chr5 86608 87742
+chr5 87742 88876
+chr5 88876 90000
+chr5 100000 100067
+chr5 100067 100134
+chr5 100134 100201
+chr5 100201 100268
+chr5 100268 100335
+chr5 100335 100402
+chr5 100402 100469
+chr5 100469 100536
+chr5 100536 100603
+chr5 100603 100670
+chr5 100670 100737
+chr5 100737 100804
+chr5 100804 100871
+chr5 100871 100938
+chr5 100938 101000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mapBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mapBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr1 10 20 a1 1 +
+chr1 50 60 a2 2 -
+chr1 80 90 a3 3 -
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mapBed2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mapBed2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,5 @@
+chr1 12 14 b1 2 +
+chr1 13 15 b2 5 -
+chr1 16 18 b3 5 +
+chr1 82 85 b4 2 -
+chr1 85 87 b5 3 +
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mapBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mapBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr1 10 20 a1 1 + 4
+chr1 50 60 a2 2 - .
+chr1 80 90 a3 3 - 2.5
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mapBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mapBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr1 10 20 a1 1 + 2,5,5
+chr1 50 60 a2 2 - .
+chr1 80 90 a3 3 - 2,3
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mapBed_result3.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mapBed_result3.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr1 10 20 a1 1 + 5
+chr1 50 60 a2 2 - .
+chr1 80 90 a3 3 - 3
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mapBed_result4.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mapBed_result4.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr1 10 20 a1 1 + 2,5
+chr1 50 60 a2 2 - .
+chr1 80 90 a3 3 - 2
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/maskFastaBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/maskFastaBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,6 @@
+>chr1
+GACTCATGATNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
+NNNNNNNNNNNNNNNNNNNNAAACAAGTACCAACCAGAACGTGAAAAAGCGTCCTGCGTGTAGCGTTTATGTTGGTTTCA
+TGGTTTTGTCTAACTTTATCGCTTTACCGTCTTTCCAGAAATTGTTCCAAGTATCGGCTTGTTTACGAATTAAATCGAAG
+TGGACTGCTGGCGTTATAACGCCGAAGCGGTAAAAATTTTTATTTTTTTTCTCACTTCTGTTACTCCAGCTTCTTCGGCA
+CCTGTGGCCTGTTGATTCTAAAGGTTAGTTTCTTCACGC
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/maskFastaBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/maskFastaBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,6 @@
+>chr1
+GACTCATGATttcttacctattagtggttgaacatcgtgatatgtatgttgacggccataaggctgcttcttgttgtcga
+tagaacttcatgtgcctgtaAAACAAGTACCAACCAGAACGTGAAAAAGCGTCCTGCGTGTAGCGTTTATGTTGGTTTCA
+TGGTTTTGTCTAACTTTATCGCTTTACCGTCTTTCCAGAAATTGTTCCAAGTATCGGCTTGTTTACGAATTAAATCGAAG
+TGGACTGCTGGCGTTATAACGCCGAAGCGGTAAAAATTTTTATTTTTTTTCTCACTTCTGTTACTCCAGCTTCTTCGGCA
+CCTGTGGCCTGTTGATTCTAAAGGTTAGTTTCTTCACGC
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mergedBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mergedBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,4 @@
+chr1 100 200
+chr1 180 250
+chr1 250 500
+chr1 501 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mergedBed2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mergedBed2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,4 @@
+chr1 100 200 a1 1 +
+chr1 180 250 a2 2 +
+chr1 250 500 a3 3 -
+chr1 501 1000 a4 4 +
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mergedBed3.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mergedBed3.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,4 @@
+chr1 100 200
+chr1 180 250
+chr1 250 500
+chr1 501 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mergedBed4.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mergedBed4.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 100 200
+chr1 501 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mergedBed_result.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mergedBed_result.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 100 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mergedBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mergedBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 100 500
+chr1 501 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mergedBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mergedBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 100 500
+chr1 501 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mergedBed_result3.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mergedBed_result3.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 100 500
+chr1 501 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mergedBed_result4.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mergedBed_result4.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 100 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mm9.len
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mm9.len Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,36 @@
+chr1 197195432
+chr2 181748087
+chr3 159599783
+chr4 155630120
+chr5 152537259
+chr6 149517037
+chr7 152524553
+chr8 131738871
+chr9 124076172
+chr10 129993255
+chr11 121843856
+chr12 121257530
+chr13 120284312
+chr14 125194864
+chr15 103494974
+chr16 98319150
+chr17 95272651
+chr18 90772031
+chr19 61342430
+chrX 166650296
+chrY 15902555
+chrM 16299
+chr13_random 400311
+chr16_random 3994
+chr17_random 628739
+chr1_random 1231697
+chr3_random 41899
+chr4_random 160594
+chr5_random 357350
+chr7_random 362490
+chr8_random 849593
+chr9_random 449403
+chrUn_random 5900358
+chrX_random 1785075
+chrY_random 58682461
+
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mm9_chr1.len
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mm9_chr1.len Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 197195432
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/multiCov1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/multiCov1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+dummy_chr 1 100
+dummy_chr 1000 1000000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/multiCovBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/multiCovBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+dummy_chr 1 100 0 0
+dummy_chr 1000 1000000 2 2
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/multiIntersectBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/multiIntersectBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,4 @@
+chr1 6 12
+chr1 10 20
+chr1 22 27
+chr1 24 30
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/multiIntersectBed1.len
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/multiIntersectBed1.len Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 5000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/multiIntersectBed2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/multiIntersectBed2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 12 32
+chr1 14 30
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/multiIntersectBed3.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/multiIntersectBed3.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr1 8 15
+chr1 10 14
+chr1 32 34
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/multiIntersectBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/multiIntersectBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,8 @@
+chr1 6 8 1 1 1 0 0
+chr1 8 12 2 1,3 1 0 1
+chr1 12 15 3 1,2,3 1 1 1
+chr1 15 20 2 1,2 1 1 0
+chr1 20 22 1 2 0 1 0
+chr1 22 30 2 1,2 1 1 0
+chr1 30 32 1 2 0 1 0
+chr1 32 34 1 3 0 0 1
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/multiIntersectBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/multiIntersectBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,9 @@
+chrom start end num list /tmp/tmpTVZ0hffiles/000/dataset_5.dat /tmp/tmpTVZ0hffiles/000/dataset_6.dat /tmp/tmpTVZ0hffiles/000/dataset_7.dat
+chr1 6 8 1 1 1 0 0
+chr1 8 12 2 1,3 1 0 1
+chr1 12 15 3 1,2,3 1 1 1
+chr1 15 20 2 1,2 1 1 0
+chr1 20 22 1 2 0 1 0
+chr1 22 30 2 1,2 1 1 0
+chr1 30 32 1 2 0 1 0
+chr1 32 34 1 3 0 0 1
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/multiIntersectBed_result3.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/multiIntersectBed_result3.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,10 @@
+chr1 0 6 0 none 0 0 0
+chr1 6 8 1 1 1 0 0
+chr1 8 12 2 1,3 1 0 1
+chr1 12 15 3 1,2,3 1 1 1
+chr1 15 20 2 1,2 1 1 0
+chr1 20 22 1 2 0 1 0
+chr1 22 30 2 1,2 1 1 0
+chr1 30 32 1 2 0 1 0
+chr1 32 34 1 3 0 0 1
+chr1 34 5000 0 none 0 0 0
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/mygenome.bed
--- a/test-data/mygenome.bed Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,2 +0,0 @@
-chr1 1000
-chr2 800
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/nucBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/nucBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 10 100
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/nucBed1.fasta
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/nucBed1.fasta Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,6 @@
+>chr1
+GACTCATGATTTCTTACCTATTAGTGGTTGAACATCGTGATATGTATGTTGACGGCCATAAGGCTGCTTCTTGTTGTCGA
+TAGAACTTCATGTGCCTGTAAAACAAGTACCAACCAGAACGTGAAAAAGCGTCCTGCGTGTAGCGTTTATGTTGGTTTCA
+TGGTTTTGTCTAACTTTATCGCTTTACCGTCTTTCCAGAAATTGTTCCAAGTATCGGCTTGTTTACGAATTAAATCGAAG
+TGGACTGCTGGCGTTATAACGCCGAAGCGGTAAAAATTTTTATTTTTTTTCTCACTTCTGTTACTCCAGCTTCTTCGGCA
+CCTGTGGCCTGTTGATTCTAAAGGTTAGTTTCTTCACGC
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/nucBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/nucBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+#1_usercol 2_usercol 3_usercol 4_pct_at 5_pct_gc 6_num_A 7_num_C 8_num_G 9_num_T 10_num_N 11_num_oth 12_seq_len
+chr1 10 100 0.588889 0.411111 19 16 21 34 0 0 90
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/nucBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/nucBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+#1_usercol 2_usercol 3_usercol 4_pct_at 5_pct_gc 6_num_A 7_num_C 8_num_G 9_num_T 10_num_N 11_num_oth 12_seq_len 13_seq
+chr1 10 100 0.588889 0.411111 19 16 21 34 0 0 90 TTCTTACCTATTAGTGGTTGAACATCGTGATATGTATGTTGACGGCCATAAGGCTGCTTCTTGTTGTCGATAGAACTTCATGTGCCTGTA
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/overlapBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/overlapBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 100 200 chr1 500 1000 -300
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/randomBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/randomBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr1 115594142 115594147 1 5 +
+chr1 167415497 167415502 2 5 -
+chr1 191692404 191692409 3 5 -
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/reldistBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/reldistBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+reldist count total fraction
+0.00 1 1 1.000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/shuffleBed.len
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/shuffleBed.len Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,4 @@
+chr1 10000
+chr2 8000
+chr3 5000
+chr4 2000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/shuffleBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/shuffleBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 0 100 a1 1 +
+chr1 0 1000 a2 2 -
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/shuffleBed2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/shuffleBed2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 0 100
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/shuffleBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/shuffleBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr2 5070 5170 a1 1 +
+chr1 2199 3199 a2 2 -
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/shuffleBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/shuffleBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 9383 9483 a1 1 +
+chr1 886 1886 a2 2 -
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/shuffleBed_result3.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/shuffleBed_result3.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr2 5070 5170 a1 1 +
+chr1 2199 3199 a2 2 -
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/shuffleBed_result4.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/shuffleBed_result4.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr2 5070 5170 a1 1 +
+chr3 4411 5000 a2 2 -
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/slopBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/slopBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,4 @@
+chr1 95 205
+chr1 175 255
+chr1 245 505
+chr1 496 1005
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/slopBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/slopBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,4 @@
+chr1 98 203
+chr1 178 253
+chr1 248 503
+chr1 499 1003
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/sortBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sortBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,4 @@
+chr1 800 1000
+chr1 80 180
+chr1 1 10
+chr1 750 10000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/sortBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sortBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,4 @@
+chr1 1 10
+chr1 80 180
+chr1 750 10000
+chr1 800 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/srma_in3.bam
b
Binary file test-data/srma_in3.bam has changed
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/subtractBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/subtractBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+chr1 10 20
+chr1 100 200
+chr1 301 400
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/subtractBed2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/subtractBed2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 0 30
+chr1 180 300
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/subtractBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/subtractBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 100 180
+chr1 301 400
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/subtractBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/subtractBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 100 200
+chr1 301 400
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/subtractBed_result3.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/subtractBed_result3.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 301 400
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/t
--- a/test-data/t Tue Nov 04 01:45:04 2014 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,4 +0,0 @@
-chr1 100 200 nasty 1 -
-chr2 500 1000 ugly 2 +
-chr3 1000 5000 big 3 -
-
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/tagBed1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/tagBed1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,3 @@
+dummy_chr 1100 1479 foo
+dummy_chr 120882 127882 bar
+dummy_chr 5590013 5596013 42
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/tagBed_result1.bam
b
Binary file test-data/tagBed_result1.bam has changed
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/unionBedGraphs1.bg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/unionBedGraphs1.bg Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 1000 1500 10
+chr1 2000 2100 20
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/unionBedGraphs1.len
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/unionBedGraphs1.len Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 5000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/unionBedGraphs2.bg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/unionBedGraphs2.bg Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 900 1600 60
+chr1 1700 2050 50
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/unionBedGraphs3.bg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/unionBedGraphs3.bg Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 1980 2070 80
+chr1 2090 2100 20
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/unionBedGraphs_result1.bg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/unionBedGraphs_result1.bg Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,5 @@
+chr1 1000 1500 10 N/A N/A
+chr1 1980 2000 N/A N/A 80
+chr1 2000 2070 20 N/A 80
+chr1 2070 2090 20 N/A N/A
+chr1 2090 2100 20 N/A 20
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/unionBedGraphs_result2.bg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/unionBedGraphs_result2.bg Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,6 @@
+chrom start end
+chr1 1000 1500 10 N/A N/A
+chr1 1980 2000 N/A N/A 80
+chr1 2000 2070 20 N/A 80
+chr1 2070 2090 20 N/A N/A
+chr1 2090 2100 20 N/A 20
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/unionBedGraphs_result3.bg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/unionBedGraphs_result3.bg Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,8 @@
+chr1 0 1000 N/A N/A N/A
+chr1 1000 1500 10 N/A N/A
+chr1 1500 1980 N/A N/A N/A
+chr1 1980 2000 N/A N/A 80
+chr1 2000 2070 20 N/A 80
+chr1 2070 2090 20 N/A N/A
+chr1 2090 2100 20 N/A 20
+chr1 2100 5000 N/A N/A N/A
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/unionBedGraphs_result4.bg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/unionBedGraphs_result4.bg Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,8 @@
+chr1 0 1000 N/A N/A N/A
+chr1 1000 1500 10 N/A N/A
+chr1 1500 1980 N/A N/A N/A
+chr1 1980 2000 N/A N/A 80
+chr1 2000 2070 20 N/A 80
+chr1 2070 2090 20 N/A N/A
+chr1 2090 2100 20 N/A 20
+chr1 2100 5000 N/A N/A N/A
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/windowBed_result1.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/windowBed_result1.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,1 @@
+chr1 100 200 chr1 500 1000
b
diff -r b8348686a0b9 -r 82aac94b06c3 test-data/windowBed_result2.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/windowBed_result2.bed Thu Jan 08 14:25:51 2015 -0500
b
@@ -0,0 +1,2 @@
+chr1 100 200 chr1 500 1000
+chr1 100 200 chr1 1300 2000
b
diff -r b8348686a0b9 -r 82aac94b06c3 tool_dependencies.xml
--- a/tool_dependencies.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/tool_dependencies.xml Thu Jan 08 14:25:51 2015 -0500
b
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <tool_dependency>
-  <package name="bedtools" version="2.19.1">
-      <repository changeset_revision="fb3a854c7104" name="package_bedtools_2_19" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
+    <package name="bedtools" version="2.22">
+        <repository changeset_revision="960f83563956" name="package_bedtools_2_22" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
     </package>
 </tool_dependency>
b
diff -r b8348686a0b9 -r 82aac94b06c3 unionBedGraphs.xml
--- a/unionBedGraphs.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/unionBedGraphs.xml Thu Jan 08 14:25:51 2015 -0500
[
b'@@ -1,106 +1,106 @@\n-<tool id="bedtools_mergebedgraph" name="Merge BedGraph files" version="@WRAPPER_VERSION@.0">\n+<tool id="bedtools_unionbedgraph" name="Merge BedGraph files" version="@WRAPPER_VERSION@.0">\n     <description></description>\n     <macros>\n         <import>macros.xml</import>\n     </macros>\n     <expand macro="requirements" />\n     <expand macro="stdio" />\n-    <command>unionBedGraphs\n+    <command>\n+<![CDATA[\n+    unionBedGraphs\n         $header\n-        -filler \'$filler\'\n+        -filler "${filler}"\n         #if $zero.value == True:\n             -empty\n-            -g ${chromInfo}\n-        #end if\n-        \n-        -i \'$input1\'\n-        \'$input2\'\n-        #for $q in $bedgraphs\n-            \'${q.input}\'\n-        #end for\n-\n-        -names\n-        #if $name1.choice == "tag":\n-            \'${input1.name}\'\n-        #else\n-            \'${name1.custom_name}\'\n+            -g $genome\n         #end if\n \n-        #if $name2.choice == "tag":\n-            \'${input2.name}\'\n-        #else\n-            \'${name2.custom_name}\'\n+        #if str($tag.tag_select) == "tag":\n+            #set files = \'" "\'.join( [ str( $file ) for $file in $tag.inputs ] )\n+            -i "${files}"\n+        #else:\n+            -i\n+            #for $bg in $tag.bedgraphs:\n+                "${bg.input}"\n+            #end for\n+            -names\n+            #for $bg in $tag.bedgraphs:\n+                "${bg.custom_name}"\n+            #end for\n         #end if\n-\n-        #for $q in $bedgraphs\n-            #if $q.name.choice == "tag":\n-                \'${q.input.name}\'\n-            #else\n-                \'${q.input.custom_name}\'\n-            #end if\n-        #end for\n-        &gt; \'$output\'\n+        > "${output}"\n+]]>\n     </command>\n     <inputs>\n-        <!-- Make it easy for the user, first two input files are always shown -->\n-        <!-- INPUT 1 -->\n-        <param name="input1" format="bedgraph" type="data" label="First BedGraph file" />\n-        \n-        <conditional name="name1">\n-            <param name="choice" type="select" label="Sample name">\n+        <conditional name="tag">\n+            <param name="tag_select" type="select" label="Sample name">\n                 <option value="tag" selected="true">Use input\'s tag</option>\n-                <option value="custom">Enter custom table name</option>\n+                <option value="custom">Enter custom name per file</option>\n             </param>\n             <when value="tag">\n+                <param name="inputs" format="bedgraph" type="data" multiple="True" label="BedGraph files" />\n             </when>\n             <when value="custom">\n-                <param name="custom_name" type="text" area="false" label="Custom sample name"/>\n-            </when>\n-        </conditional>\n-\n-        <!-- INPUT 2 -->\n-        <param name="input2" format="bedgraph" type="data" label="Second BedGraph file" />\n-        \n-        <conditional name="name2">\n-            <param name="choice" type="select" label="Sample name">\n-                <option value="tag" selected="true">Use input\'s tag</option>\n-                <option value="custom">Enter custom table name</option>\n-            </param>\n-            <when value="tag">\n-            </when>\n-            <when value="custom">\n-                <param name="custom_name" type="text" area="false" label="Custom sample name"/>\n+                <repeat name="bedgraphs" title="Add BedGraph files" min="2" >\n+                    <param name="input" format="bedgraph" type="data" multiple="True" label="BedGraph file" />\n+                    <param name="custom_name" type="text" area="false" label="Custom sample name"/>\n+                </repeat>\n             </when>\n         </conditional>\n-\n-        <!-- Additional files, if the user needs more -->\n-        <repeat name="bedgraphs" title="Add\'l BedGraph files" >\n-            <param name="input" format="bedgraph" type="data" label="BedGraph file" />\n-            <conditional name="name">\n-                <param '..b'ustom sample name"/>\n-                </when>\n-            </conditional>\n-        </repeat>\n-\n-        <param name="header" type="boolean" checked="true" truevalue="-header" falsevalue="" label="Print header line" help="The first line will include the name of each sample." />\n-\n-        <param name="zero" type="boolean" checked="true" label="Report regions with zero coverage" help="If set, regions without any coverage will also be reported. Requires a valid organism key for all input datasets" />\n-\n-        <param name="filler" type="text" value="0" label="Text to use for no-coverage value" help="Can be 0.0, N/A, - or any other value." />\n+        <expand macro="genome" />\n+        <param name="zero" type="boolean" checked="true"\n+            label="Report regions with zero coverage"\n+            help="If set, regions without any coverage will also be reported. Requires a valid organism key for all input datasets" />\n+        <param name="filler" type="text" value="N/A"\n+            label="Text to use for no-coverage value"\n+            help="Can be 0.0, N/A, - or any other value. (-filler)" />\n+        <expand macro="print_header" />\n     </inputs>\n-\n     <outputs>\n-        <data format="tabular" name="output"  metadata_source="input1" label="Merged BedGraphs of ${input1.name}, ${input2.name} and so on." />\n+        <data name="output" format="bedgraph" />\n     </outputs>\n+    <tests>\n+        <test>\n+            <param name="tag_select" value="tag"/>\n+            <param name="inputs" value="unionBedGraphs1.bg,unionBedGraphs2.bg,unionBedGraphs3.bg" ftype="bedgraph" />\n+            <param name="zero" value="False"/>\n+            <output name="output" file="unionBedGraphs_result1.bg" ftype="bedgraph" />\n+        </test>\n+        <test>\n+            <param name="tag_select" value="tag"/>\n+            <param name="inputs" value="unionBedGraphs1.bg,unionBedGraphs2.bg,unionBedGraphs3.bg" ftype="bedgraph" />\n+            <param name="header" value="True"/>\n+            <param name="zero" value="False"/>\n+            <output name="output" file="unionBedGraphs_result2.bg" ftype="bedgraph" />\n+        </test>\n+        <test>\n+            <param name="tag_select" value="tag"/>\n+            <param name="inputs" value="unionBedGraphs1.bg,unionBedGraphs2.bg,unionBedGraphs3.bg" ftype="bedgraph" />\n+            <param name="zero" value="True"/>\n+            <param name="genome" value="unionBedGraphs1.len"/>\n+            <output name="output" file="unionBedGraphs_result3.bg" ftype="bedgraph" />\n+        </test>\n+        <test>\n+            <param name="tag_select" value="custom"/>\n+            <repeat name="bedgraphs">\n+                <param name="input" value="unionBedGraphs1.bg" />\n+                <param name="custom_name" value="first" />\n+            </repeat>\n+            <repeat name="bedgraphs">\n+                <param name="input" value="unionBedGraphs2.bg" />\n+                <param name="custom_name" value="second" />\n+            </repeat>\n+            <repeat name="bedgraphs">\n+                <param name="input" value="unionBedGraphs3.bg" />\n+                <param name="custom_name" value="third" />\n+            </repeat>\n+            <param name="zero" value="True"/>\n+            <param name="genome" value="unionBedGraphs1.len"/>\n+            <output name="output" file="unionBedGraphs_result4.bg" ftype="bedgraph" />\n+        </test>\n+    </tests>\n     <help>\n-    \n+<![CDATA[\n **What it does**\n \n This tool merges multiple BedGraph files, allowing direct and fine-scale coverage comparisons among many samples/files. The BedGraph files need not represent the same intervals; the tool will identify both common and file-specific intervals. In addition, the BedGraph values need not be numeric: one can use any text as the BedGraph value and the tool will compare the values from multiple files.\n@@ -226,7 +226,7 @@\n     chr1   600    700    0         0.43\n \n @REFERENCES@\n- \n+]]>\n     </help>\n     <expand macro="citations" />\n </tool>\n'
b
diff -r b8348686a0b9 -r 82aac94b06c3 windowBed.xml
--- a/windowBed.xml Tue Nov 04 01:45:04 2014 -0500
+++ b/windowBed.xml Thu Jan 08 14:25:51 2015 -0500
[
@@ -6,6 +6,7 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <command>
+<![CDATA[
         bedtools window
         #if $inputA.ext == "bam":
             -abam $inputA
@@ -13,38 +14,42 @@
             -a $inputA
         #end if
         -b $inputB
-        $ubam
         $bed
         $strandB
-        #if $addition.addition_select == 'b':
-        -w $addition.b
+        #if $addition.addition_select == 'window':
+            -w $addition.w
         #elif $addition.addition_select == 'lr':
-        -l $addition.l
-        -r $addition.r
+            -l $addition.l
+            -r $addition.r
         #end if
         $original
         $number
         $nooverlaps
         $header
-        &gt; $output
+        > $output
+]]>
     </command>
     <inputs>
         <param format="bed,bam,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF/BAM file"/>
         <param format="bed,gff,vcf,gff3" name="inputB" type="data" label="BED/VCF/GFF file"/>
-        <param name="ubam" type="boolean" checked="false" truevalue="-ubam" falsevalue="" label="Write uncompressed BAM output" />
-        <param name="bed" type="boolean" checked="false" truevalue="bed" falsevalue="" label="When using BAM input, write output as BED. The default is to write output in BAM when using a bam file" />
+        <param name="bed" type="boolean" checked="false" truevalue="-bed" falsevalue=""
+            label="When using BAM input, write output as BED. The default is to write output in BAM when using a bam file"
+            help="(-bed)" />
         <conditional name="addition">
             <param name="addition_select" type="select" label="Choose what you want to do">
-                <option value="huhn" selected="True">Do not change added base pairs</option>
-                <option value="b">Add Base pairs for **both** upstream and downstream of each entry in A when searching for overlaps in B</option>
+                <option value="window">Add Base pairs for **both** upstream and downstream of each entry in A when searching for overlaps in B</option>
                 <option value="lr">Add Base pairs **separately** for upstream and downstream of each entry in A when searching for overlaps in B</option>
             </param>
-            <when value="b">
-                <param name="b" label="Give Value" type="integer" value="1000"  />
+            <when value="window">
+                <param name="w" type="integer" value="1000" label="Base pairs to add upstream and downstream" />
             </when>
             <when value="lr">
-                <param name="l" label="Base pairs added upstream (left of) of each entry in A when searching for overlaps in B. Allows one to create assymetrical “windows”. Default is 1000bp" type="integer" value="1000"  />
-                <param name="r" label="Base pairs added downstream (right of) of each entry in A when searching for overlaps in B. Allows one to create assymetrical “windows”. Default is 1000bp" type="integer" value="1000"  />
+                <param name="l" type="integer" value="1000"
+                    label="Base pairs added upstream (left) of each entry in A when searching for overlaps in B"
+                    help="Allows one to create assymetrical “windows”. Default is 1000bp. (-l)" />
+                <param name="r" type="integer" value="1000"
+                    label="Base pairs added downstream (right) of each entry in A when searching for overlaps in B"
+                    help="Allows one to create assymetrical “windows”. Default is 1000bp. (-r)" />
             </when>
         </conditional>
         <param name="strandB" type="select" label="Calculation based on strandedness?">
@@ -52,17 +57,43 @@
             <option value="-sm">Only report hits in B that overlap A on the **same** strand</option>
             <option value="-Sm">Only report hits in B that overlap A on the **opposite** strand</option>
         </param>
-        <param name="original" type="boolean" checked="false" truevalue="-u" falsevalue="" label="Write original A entry once if any overlaps found in B. In other words, just report the fact at least one overlap was found in B" />
-        <param name="number" type="boolean" checked="false" truevalue="-c" falsevalue="" label="For each entry in A, report the number of hits in B while restricting to -f. Reports 0 for A entries that have no overlap with B" />
-        <param name="nooverlaps" type="boolean" checked="false" truevalue="-v" falsevalue="" label="Only report those entries in A that have no overlaps with B" />
-        <param name="header" type="boolean" checked="false" truevalue="-header" falsevalue="" label="Print the header from the A file prior to results" />
-
+        <param name="original" type="boolean" checked="false" truevalue="-u" falsevalue=""
+            label="Write original A entry once if any overlaps found in B"
+            help="In other words, just report the fact at least one overlap was found in B. (-u)" />
+        <param name="number" type="boolean" checked="false" truevalue="-c" falsevalue=""
+            label="For each entry in A, report the number of hits in B"
+            help="Reports 0 for A entries that have no overlap with B (-c)" />
+        <param name="nooverlaps" type="boolean" checked="false" truevalue="-v" falsevalue=""
+            label="Only report those entries in A that have no overlaps with B" help="(-v)" />
+        <expand macro="print_header" />
     </inputs>
     <outputs>
         <data format_source="inputA" name="output" metadata_source="inputA" label=""/>
     </outputs>
+    <tests>
+        <test>
+            <param name="inputA" value="windowBedA.bed" ftype="bed" />
+            <param name="inputB" value="windowBedB.bed" ftype="bed" />
+            <output name="output" file="windowBed_result1.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="windowBedA.bed" ftype="bed" />
+            <param name="inputB" value="windowBedB.bed" ftype="bed" />
+            <param name="addition_select" value="window" />
+            <param name="w" value="5000" />
+            <output name="output" file="windowBed_result2.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="inputA" value="windowBedA.bed" ftype="bed" />
+            <param name="inputB" value="windowBedB.bed" ftype="bed" />
+            <param name="addition_select" value="lr" />
+            <param name="l" value="200" />
+            <param name="r" value="20000" />
+            <output name="output" file="windowBed_result2.bed" ftype="bed" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 Similar to bedtools intersect, window searches for overlapping features in A and B. However, window adds a specified number (1000, by default) of base pairs upstream and downstream of each feature in A. In effect, this allows features in B that are “near” features in A to be detected.
@@ -70,6 +101,7 @@
 .. image:: $PATH_TO_IMAGES/window-glyph.png
 
 @REFERENCES@
+]]>
     </help>
     <expand macro="citations" />
 </tool>