changeset 3:e556e34fc12a draft

planemo upload for repository https://github.com/fidelram/deepTools/tree/master/galaxy/wrapper/ commit a92b8557d0985038d24daaab2996fbf8e4cd323f
author bgruening
date Mon, 21 Dec 2015 07:24:37 -0500
parents c5634baf9bf9
children d5b93c88cc6b
files deepTools_macros.xml plotCorrelation.xml test-data/plotCorrelation_result2.png
diffstat 3 files changed, 72 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/deepTools_macros.xml	Fri Dec 18 12:27:26 2015 -0500
+++ b/deepTools_macros.xml	Mon Dec 21 07:24:37 2015 -0500
@@ -14,7 +14,11 @@
     </xml>
 
     <token name="@ADVANCED_OPTS_READ_PROCESSING@">
-        --extendReads $advancedOpt.extendReads
+        #if $advancedOpt.doExtendCustom.doExtend == 'custom':
+            --extendReads $advancedOpt.doExtendCustom.extendReadsValue
+        #else if $advancedOpt.doExtendCustom.doExtend == 'yes':
+            --extendReads
+        #end if
         $advancedOpt.ignoreDuplicates
         $advancedOpt.centerReads
         #if $advancedOpt.minMappingQuality:
@@ -36,15 +40,15 @@
     </xml>
 
     <token name="@HEATMAP_OPTIONS@">
-        #if $zMin:
-            --zMin $zMin
+        #if $plotting_type.zMin:
+            --zMin $plotting_type.zMin
         #end if
-        #if $zMax:
-            --zMax $zMax
+        #if $plotting_type.zMax:
+            --zMax $plotting_type.zMax
         #end if
-        --colorMap '$colorMap'
-        $plotNumbers
-        --plotTitle $plotTitle
+        --colorMap '$plotting_type.colorMap'
+        $plotting_type.plotNumbers
+        --plotTitle '$plotting_type.plotTitle'
     </token>
 
 
@@ -55,9 +59,9 @@
     </xml>
 
     <xml name="zMin_zMax">
-        <param argument="--zMin" type="integer" value="" optional="true" label="Minimum value for the heatmap intensities"
+        <param argument="--zMin" type="float" value="" optional="true" label="Minimum value for the heatmap intensities"
             help="If not specified the value is set automatically."/>
-        <param argument="--zMax" type="integer" value="" optional="true" label="Maximum value for the heatmap intensities"
+        <param argument="--zMax" type="float" value="" optional="true" label="Maximum value for the heatmap intensities"
             help="If not specified the value is set automatically."/>
     </xml>
 
@@ -146,14 +150,26 @@
     </xml>
 
     <xml name="extendReads">
-        <param argument="--extendReads" type="integer" value="" optional="True"
-            label="Extend reads to the given average fragment size"
-            help="(1) Single-end reads and singletons are extended to match this length. (2) Paired-end reads are extended to match the fragment size, regardless of what is set here.
-                    By default *each* read mate is extended.
-                    This can be modified using the SAM flags (see --samFlagInclude and --samFlagExclude options) to keep only the first or the second mate.
-                    Unmated reads, mate reads that map on different chromosomes or too far apart are extended to the given value.
-                    Reads are only extended if --extendReads is set to a value greater than the read length. *NOTE*: For spliced-read data, this option is not
-                    recommended as it will extend reads over skipped regions, e.g. introns in RNA-seq data."/>
+        <conditional name="doExtendCustom">
+            <param name="doExtend" type="select" label="Extend reads to the given average fragment size."
+                help="(1) Single-end reads and singletons are extended to match this length. (2) Paired-end reads are extended to match the fragment size, regardless of what is set here.
+                        By default *each* read mate is extended.
+                        This can be modified using the SAM flags (see --samFlagInclude and --samFlagExclude options) to keep only the first or the second mate.
+                        Unmated reads, mate reads that map on different chromosomes or too far apart are extended to the given value.
+                        Reads are only extended if --extendReads is set to a value greater than the read length. *NOTE*: For spliced-read data, this option is not
+                        recommended as it will extend reads over skipped regions, e.g. introns in RNA-seq data.">
+                <option value="no" selected="True">No extension. The default value and most typically appropriate.</option>
+                <option value="yes">Paired-end extension. Suitable only for paired-end datasets.</option>
+                <option value="custom">A custom length, which will be applied to ALL reads.</option>
+            </param>
+            <when value="no" />
+            <when value="yes" />
+            <when value="custom">
+                <param name="extendReadsValue" type="integer" value="300" min="1"
+                    label="Extend reads to the given average fragment size"
+                    help="Extend all reads to this length" />
+            </when>
+        </conditional>
     </xml>
 
     <xml name="corMethod">
@@ -274,13 +290,13 @@
     </xml>
 
     <xml name="multiple_input_bams">
-        <param argument="--bamfiles" type="data" format="bam"
+        <param argument="--bamfiles" type="data" format="bam" min="2"
             label="Bam file" multiple="true"
             help="The BAM file must be sorted."/>
     </xml>
 
     <xml name="multiple_input_bigwigs">
-        <param argument="--bigwigfiles" type="data" format="bigwig" multiple="True"
+        <param argument="--bigwigfiles" type="data" format="bigwig" multiple="True" min="2"
             label="Bigwig file"
             help="The Bigwig file must be sorted."/>
     </xml>
@@ -366,15 +382,6 @@
         </conditional>
     </xml>
 
-    <xml name="image_file_format">
-        <param argument="--outFileFormat" type="select" label="Image file format">
-            <option value="png" selected="true">png</option>
-            <option value="pdf">pdf</option>
-            <option value="svg">svg</option>
-            <option value="eps">eps</option>
-        </param>
-    </xml>
-
     <xml name="skipNAs">
         <param argument="--skipNAs" type="boolean" truevalue="--skipNAs" falsevalue="" checked="False"
             label="Ignore missing data?"
@@ -407,13 +414,13 @@
         </conditional>
     </xml>
 
+
     <xml name="input_image_file_format">
-        <param name="outFileFormat" type="select" label="Image file format">
+        <param argument="--outFileFormat" type="select" label="Image file format">
             <option value="png" selected="true">png</option>
             <option value="pdf">pdf</option>
             <option value="svg">svg</option>
             <option value="eps">eps</option>
-            <option value="emf">emf</option>
         </param>
     </xml>
 
@@ -423,7 +430,16 @@
                 <when input="output.outFileFormat" value="pdf" format="pdf" />
                 <when input="output.outFileFormat" value="svg" format="svg" />
                 <when input="output.outFileFormat" value="eps" format="eps" />
-                <when input="output.outFileFormat" value="emf" format="emf" />
+            </change_format>
+        </data>
+    </xml>
+
+    <xml name="output_image_file_format_not_nested">
+        <data format="png" name="outFileName" label="${tool.name} image">
+            <change_format>
+                <when input="outFileFormat" value="pdf" format="pdf" />
+                <when input="outFileFormat" value="svg" format="svg" />
+                <when input="outFileFormat" value="eps" format="eps" />
             </change_format>
         </data>
     </xml>
--- a/plotCorrelation.xml	Fri Dec 18 12:27:26 2015 -0500
+++ b/plotCorrelation.xml	Mon Dec 21 07:24:37 2015 -0500
@@ -11,12 +11,18 @@
             --corData "$corData"
             --plotFile "$outFileName"
             --corMethod "$corMethod"
-            --whatToPlot "$whatToPlot"
+            --whatToPlot "$plotting_type.whatToPlot"
+            #if str($plotting_type.whatToPlot) == 'heatmap':
+                @HEATMAP_OPTIONS@
+            #else:
+                --plotTitle '$plotting_type.plotTitle'
+            #end if
             $skipZeros
             --plotFileFormat "$outFileFormat"
             $removeOutliers
-            --outFileCorMatrix "$matrix"
-            @HEATMAP_OPTIONS@
+            #if $outFileCorMatrix:
+                --outFileCorMatrix "$matrix"
+            #end if
 
 ]]>
     </command>
@@ -24,14 +30,22 @@
         <param name="corData" format="deeptools_coverage_matrix" type="data" label="Matrix file from the bamCorrelate tool"/>
         <expand macro="corMethod" />
 
-        <param argument="--whatToPlot" type="select" label="Plotting type">
-            <option value="heatmap" selected="True">Heatmap</option>
-            <option value="scatterplot">Scatterplot</option>
-        </param>
+        <conditional name="plotting_type" >
+            <param argument="--whatToPlot" type="select" label="Plotting type">
+                <option value="heatmap" selected="True">Heatmap</option>
+                <option value="scatterplot">Scatterplot</option>
+            </param>
+            <when value="heatmap">
+                <expand macro="heatmap_options" />
+            </when>
+            <when value="scatterplot">
+                <expand macro="plotTitle" />
+            </when>
+        </conditional>
 
         <expand macro="skipZeros" />
 
-        <expand macro="image_file_format" />
+        <expand macro="input_image_file_format" />
 
         <param argument="--removeOutliers" type="boolean"
             truevalue="--removeOutliers" falsevalue="" label="Remove regions with very large counts"
@@ -47,11 +61,10 @@
                 unusually high counts."/>
 
         <param name="outFileCorMatrix" type="boolean" label="Save the matrix of values underlying the heatmap"/>
-        <expand macro="heatmap_options" />
 
     </inputs>
     <outputs>
-        <expand macro="output_image_file_format" />
+        <expand macro="output_image_file_format_not_nested" />
         <data format="tabular" name="matrix" label="${tool.name} on ${on_string}: Correlation matrix">
             <filter>outFileCorMatrix is True</filter>
         </data>
@@ -70,7 +83,7 @@
             <param name="whatToPlot" value="scatterplot" />
             <param name="removeOutliers" value="True" />
             <param name="plotTitle" value="Test Plot" />
-            <output name="outFileName" file="plotCorrelation_result2.png" compare="sim_size" delta="100" />
+            <output name="outFileName" file="plotCorrelation_result2.png" ftpye="png" compare="sim_size" delta="100" />
         </test>
     </tests>
     <help>
Binary file test-data/plotCorrelation_result2.png has changed