changeset 36:ea2f64efe70d draft

Uploaded
author bgruening
date Fri, 31 Jan 2014 05:12:41 -0500
parents 7766dfcd2455
children 2f7edf06a5da
files deepTools_macros.xml heatmapper.xml profiler.xml
diffstat 3 files changed, 46 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/deepTools_macros.xml	Thu Jan 30 19:16:15 2014 -0500
+++ b/deepTools_macros.xml	Fri Jan 31 05:12:41 2014 -0500
@@ -56,6 +56,43 @@
         </requirements>
         <version_command>@BINARY@ --version</version_command>
     </xml>
+
+    <xml name="kmeans_clustering">
+
+        <conditional name="used_multiple_regions">
+            <param name="used_multiple_regions_options" type="select" 
+                label="Did you used multiple regions in ComputeMatrix?"
+                help="Would you like to cluster the regions according to the similarity of the signal distribution? This is only possible if you used computeMatrix on only one group of regions.">
+                <option value="yes">Yes, I used multiple regions.</option>
+                <option value="no">No, I used only one region.</option>
+            </param>
+            <when value="no">
+                <conditional name="clustering">
+                    <param name="clustering_options" type="select" label="Clustering algorithm">
+                        <option value="none">No clustering</option>
+                        <option value="kmeans">Kmeans clustering</option>
+                    </param>
+                    <when value="kmeans">
+                        <param name="k_kmeans" type="integer" value="0" label="Number of clusters to compute" 
+                            help="When this option is set, then the matrix is split into clusters using the kmeans algorithm. Only works for data that is not grouped, otherwise only the first group will be clustered. If more specific clustering methods are required it is advisable to save the underlying matrix and run the clustering using other software. The plotting of the clustering may fail (Error: Segmentation fault) if a cluster has very few members compared to the total number or regions. (default: None)."/>
+                    </when>
+                    <when value="none" />
+                </conditional>
+            </when>
+            <when value="yes" />
+        </conditional>
+
+    </xml>
+    <token name="@kmeans_clusterin@">
+        #if $advancedOpt.used_multiple_regions.used_multiple_regions_options == 'no':
+            #if $advancedOpt.used_multiple_regions.clustering.clustering_options == 'kmeans':
+                #if int($advancedOpt.used_multiple_regions.clustering.k_kmeans) > 0:
+                    --kmeans $advancedOpt.used_multiple_regions.clustering.k_kmeans
+                #end if
+            #end if
+        #end if
+    </token>
+
     <xml name="stdio">
         <stdio>
             <exit_code range="1:" />
--- a/heatmapper.xml	Thu Jan 30 19:16:15 2014 -0500
+++ b/heatmapper.xml	Fri Jan 31 05:12:41 2014 -0500
@@ -81,13 +81,7 @@
 
             $advancedOpt.onePlotPerGroup
 
-            #if $advancedOpt.used_multiple_regions.used_multiple_regions_options == 'no':
-                #if $advancedOpt.used_multiple_regions.clustering.clustering_options == 'kmeans':
-                    #if int($advancedOpt.used_multiple_regions.clustering.k_kmeans) > 0:
-                        --kmeans $advancedOpt.used_multiple_regions.clustering.k_kmeans
-                    #end if
-                #end if
-            #end if
+            @kmeans_clusterin@
 
         #end if
     </command>
@@ -171,28 +165,8 @@
                     label="Do one plot per group" 
                     help="When computeMatrix was used on more than one group of genes, the average plots for all the groups will be drawn in one panel by default. If this option is set, each group will get its own plot, stacked on top of each other."/>
 
-                <conditional name="used_multiple_regions">
-                    <param name="used_multiple_regions_options" type="select" 
-                        label="Did you used multiple regions in ComputeMatrix?"
-                        help="Would you like to cluster the regions according to the similarity of the signal distribution? This is only possible if you used computeMatrix on only one group of regions.">
-                        <option value="yes">Yes, I used multiple regions.</option>
-                        <option value="no">No, I used only one region.</option>
-                    </param>
-                    <when value="no">
-                        <conditional name="clustering">
-                            <param name="clustering_options" type="select" label="Clustering algorithm">
-                                <option value="none">No clustering</option>
-                                <option value="kmeans">Kmeans clustering</option>
-                            </param>
-                            <when value="kmeans">
-                                <param name="k_kmeans" type="integer" value="0" label="Number of clusters to compute" 
-                                    help="When this option is set, then the matrix is split into clusters using the kmeans algorithm. Only works for data that is not grouped, otherwise only the first group will be clustered. If more specific clustering methods are required it is advisable to save the underlying matrix and run the clustering using other software. The plotting of the clustering may fail (Error: Segmentation fault) if a cluster has very few members compared to the total number or regions. (default: None)."/>
-                            </when>
-                            <when value="none" />
-                        </conditional>
-                    </when>
-                    <when value="yes" />
-                </conditional>
+                <expand macro="kmeans_clustering" />
+
             </when>
         </conditional>
     </inputs>
--- a/profiler.xml	Thu Jan 30 19:16:15 2014 -0500
+++ b/profiler.xml	Fri Jan 31 05:12:41 2014 -0500
@@ -64,6 +64,9 @@
             #if str($advancedOpt.yAxisLabel.value) != "None":
                 --yAxisLabel '$advancedOpt.yAxisLabel'
             #end if
+
+            @kmeans_clusterin@
+
         #end if
     </command>
     <inputs>
@@ -123,6 +126,9 @@
                 <param name="yMax" type="float" value="" size="3" label="Maximum value for Y-axis of the summary plot. Leave empty for automatic values" optional="true"/>
                 <param name="xAxisLabel" type="text" value="gene distance (bp)" size="50" label="Description for the x-axis label" />
                 <param name="yAxisLabel" type="text" value="" size="50" label="Description for the y-axis label for the top panel" />
+
+                <expand macro="kmeans_clustering" />
+
             </when>
         </conditional>
     </inputs>