diff mapBed.xml @ 1:82aac94b06c3 draft

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