diff bamCorrelate.xml @ 30:5231f398d784 draft

planemo upload for repository https://github.com/fidelram/deepTools/tree/master/galaxy/wrapper/ commit 3bc1d1c6f4e28ac7ff8df79fe4e3f00a195938e6-dirty
author bgruening
date Tue, 20 Oct 2015 14:43:12 -0400
parents 3a2aab18a217
children
line wrap: on
line diff
--- a/bamCorrelate.xml	Tue Sep 16 13:46:05 2014 -0400
+++ b/bamCorrelate.xml	Tue Oct 20 14:43:12 2015 -0400
@@ -1,12 +1,12 @@
 <tool id="deeptools_bamCorrelate" name="bamCorrelate" version="@WRAPPER_VERSION@.0">
     <description>correlates pairs of BAM files</description>
-    <expand macro="requirements" />
-    <expand macro="stdio" />
     <macros>
         <token name="@BINARY@">bamCorrelate</token>
         <import>deepTools_macros.xml</import>
     </macros>
+    <expand macro="requirements" />
     <command>
+<![CDATA[
         #set files=[]
         #set labels=[]
 
@@ -18,8 +18,8 @@
 
         @THREADS@
 
-        --bamfiles #echo " ".join($files)
-        --labels #echo " ".join($labels)
+        --bamfiles '#echo "' '".join($files)#'
+        --labels '#echo "' '".join($labels)#'
         --fragmentLength $fragmentLength
         --corMethod $corMethod
 
@@ -28,7 +28,7 @@
         #if $output.showOutputSettings == "yes"
             --outRawCounts '$outFileRawCounts' 
             --outFileCorMatrix '$outFileCorMatrix'
-            --plotFileFormat $output.outFileFormat
+            --plotFileFormat '$output.outFileFormat'
         #else:
             --plotFileFormat 'png'
         #end if
@@ -37,7 +37,6 @@
             --binSize '$mode.binSize'
             --distanceBetweenBins '$mode.distanceBetweenBins'
             $mode.doNotRemoveOutliers
-
         #else:
             --BED $mode.region_file
         #end if
@@ -47,6 +46,10 @@
             --region '$mode.region'
         #end if
 
+        #if $plotTitle and str($plotTitle).strip() != "":
+            --plotTitle '$plotTitle'
+        #end if
+        $plotNumbers
         #if $mode.advancedOpt.showAdvancedOpt == "yes":
 
             $mode.advancedOpt.doNotExtendPairedEnds
@@ -66,14 +69,18 @@
             --colorMap '$mode.advancedOpt.colorMap'
 
         #end if
+]]>
     </command>
 
     <inputs>
         <expand macro="multiple_input_bams" />
 
-        <param name="fragmentLength" type="integer" value="300" min="1"
+        <param name="fragmentLength" type="integer" value="200" min="1"
             label="Length of the average fragment size"
-            help ="Reads will be extended to match this length unless they are paired-end, in which case they will be extended to match the fragment length. *NOTE*: If the BAM files contain mated and unmated paired-end reads, unmated reads will be extended to match the fragment length."/>
+            help ="Reads will be extended to match this length unless they are paired-end,
+            in which case they will be extended to match the fragment length.
+            *NOTE*: If the BAM files contain mated and unmated paired-end reads, unmated reads will
+            be extended to match the fragment length. (--fragmentLength)"/>
 
         <param name="corMethod" type="select" label="Correlation method">
             <option value="spearman" selected="True">Spearman</option>
@@ -82,14 +89,18 @@
 
         <conditional name="mode">
             <param name="modeOpt" type="select" label="Choose computation mode" 
-                help="In the bins mode, the correlation is computed based on equal length bins. In the BED file mode, as list of genomic regions in BED format has to be given. For each region in the BED file the number of overlapping reads is counted in each of the BAM files. Then the correlation is computed.">
+                help="In the bins mode, the correlation is computed based on equal
+                length bins. In the BED file mode, as list of genomic regions in BED
+                format has to be given. For each region in the BED file the number of
+                overlapping reads is counted in each of the BAM files.
+                Then the correlation is computed.">
                 <option value="bins" selected="true">Bins</option>
                 <option value="BED-file">Limit correlation to certain regions (BED file)</option>
             </param>
             <when value="bins">
                 <param name="binSize" type="integer" value="10000" min="1" 
                     label="Bin size in bp"
-                    help="Length in base pairs for a window used to sample the genome."/>
+                    help="Length in base pairs for a window used to sample the genome. (--binSize)"/>
 
                 <param name="distanceBetweenBins" type="integer" value="0" min="0"
                     label="Distance between bins"
@@ -97,7 +108,7 @@
                         the specified 'Bin size'. However, to reduce the
                         computation time, a larger distance between bins can
                         by given. Larger distances result in less bins being
-                        considered"/>
+                        considered. (--distanceBetweenBins)"/>
 
                 <param name="doNotRemoveOutliers" type="boolean"
                     truevalue="--doNotRemoveOutliers" falsevalue="" label="Do not filter outliers"
@@ -111,17 +122,19 @@
                         bamCorrelate tries to remove outliers using
                         the median absolute deviation (MAD) method applying a
                         threshold of 200 to only consider extremely large
-                        deviations from the median."/>
+                        deviations from the median. (--doNotRemoveOutliers)"/>
 
                 <expand macro="bamCorrelate_mode_actions" />
             </when>
             <when value="BED-file">
-                <param name="region_file" type="data" format="bed" label="Region file in BED format" help="Correlation is computed for the number of reads that overlap such regions."/>
+                <param name="region_file" type="data" format="bed"
+                    label="Region file in BED format"
+                    help="Correlation is computed for the number of reads that overlap such regions."/>
                 <expand macro="bamCorrelate_mode_actions" />
             </when>
-
         </conditional>
-
+        <expand macro="plotTitle" />
+        <expand macro="plotNumbers" />
         <conditional name="output">
             <param name="showOutputSettings" type="select" label="Show advanced output settings" >
                 <option value="no" selected="true">no</option>
@@ -155,8 +168,24 @@
             </filter>
         </data>
     </outputs>
+    <tests>
+        <test>
+            <repeat name="input_files">
+                <param name="bamfile" value="bowtie2-test1.bam" ftype="bam" />
+                <param name="label" value="first BAM file" />
+            </repeat>
+            <repeat name="input_files">
+                <param name="bamfile" value="bowtie2-test1.bam" ftype="bam" />
+                <param name="label" value="second BAM file" />
+            </repeat>
+            <param name="modeOpt" value="bins" />
+            <param name="binSize" value="10" />
+            <param name="showOutputSettings" value="no" />
+            <output name="outFileName" file="bamCorrelate_result1.png" ftype="png" compare="sim_size" />
+        </test>
+    </tests>
     <help>
-
+<![CDATA[
 **What it does**
 
 This tool is useful to assess the overall similarity of different BAM files. A typical application
@@ -183,7 +212,7 @@
 -----
 
 @REFERENCES@
-
+]]>
     </help>
     <expand macro="citations" />
 </tool>