diff bamToBed.xml @ 4:315929597efb draft

Uploaded
author iuc
date Wed, 07 Jan 2015 12:45:05 -0500
parents 7511823bdea1
children
line wrap: on
line diff
--- a/bamToBed.xml	Sat Jan 03 16:23:23 2015 -0500
+++ b/bamToBed.xml	Wed Jan 07 12:45:05 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>