diff windowBed.xml @ 1:82aac94b06c3 draft

Uploaded
author iuc
date Thu, 08 Jan 2015 14:25:51 -0500
parents b8348686a0b9
children 607c0576c6ab
line wrap: on
line diff
--- 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>