diff deepTools_macros.xml @ 18:5ea8782d650c draft

Uploaded
author bgruening
date Mon, 03 Feb 2014 13:44:35 -0500
parents ef65d6b68ccc
children e95b45f1ecbb
line wrap: on
line diff
--- a/deepTools_macros.xml	Sat Dec 21 14:26:06 2013 -0500
+++ b/deepTools_macros.xml	Mon Feb 03 13:44:35 2014 -0500
@@ -1,5 +1,8 @@
 <macros>
     <xml name="bamCorrelate_mode_actions">
+
+        <expand macro="region_limit_operation" />
+
         <conditional name="advancedOpt">
             <param name="showAdvancedOpt" type="select" label="Show advanced options" >
                 <option value="no" selected="true">no</option>
@@ -7,10 +10,6 @@
             </param>
             <when value="no" />
             <when value="yes">
-                <param name="region" type="text" value=""
-                    label="Region of the genome to limit the operation to"
-                    help="This is useful when testing parameters to reduce the computing time. The format is chr:start:end, for example &quot;chr10&quot; or &quot;chr10:456700:891000&quot;" />
-
                 <param name="doNotExtendPairedEnds" type="boolean" truevalue="--doNotExtendPairedEnds" falsevalue=""
                     label="Do not extend paired ends"
                     help="If set, reads are not extended to match the fragment length reported in the BAM file, instead they will be extended to match the fragment length. Default is to extend the reads if paired end information is available."/>
@@ -37,13 +36,21 @@
             </when>
         </conditional>
     </xml>
+    
+    <xml name="region_limit_operation">
+        <param name="region" type="text" value=""
+            label="Region of the genome to limit the operation to"
+            help="This is useful when testing parameters to reduce the computing time. The format is chr:start:end, for example &quot;chr10&quot; or &quot;chr10:456700:891000&quot;" />
+    </xml>
+    
     <token name="@THREADS@">--numberOfProcessors "\${GALAXY_SLOTS:-4}"</token>
     <xml name="requirements">
         <requirements>
+            <requirement type="binary">@BINARY@</requirement>
             <requirement type="package" >samtools</requirement>
             <requirement type="package" >deepTools</requirement>
             <requirement type="package" >ucsc_tools</requirement>
-            <requirement type="package" version="1.5.4_e5c75f3e967be0fa1d6dbcbb63a0f992e1cdcd61">deepTools</requirement>
+            <requirement type="package" version="1.5.4_1093b2d281576f23ee04740bd5eae3f7b8422f7e">deepTools</requirement>
             <requirement type="package" version="0.1">ucsc_tools</requirement>
             <requirement type="package" version="1.7.1">numpy</requirement>
             <requirement type="package" version="0.7.7">pysam</requirement>
@@ -53,7 +60,45 @@
             <requirement type="package" version="12-2013">bx-python</requirement>
             <yield />
         </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:" />
@@ -66,7 +111,9 @@
     </xml>
     <token name="@REFERENCES@">
 
-For more informations, please visit our `project site`_.
+.. class:: infomark
+
+For more informations, please visit the `project site`_.
 
 If you would like to give us feedback or you run into any trouble, please send an email to deeptools@googlegroups.com
 
@@ -75,7 +122,7 @@
 
 .. _Bioinformatics and Deep-Sequencing Unit: http://www3.ie-freiburg.mpg.de/facilities/research-facilities/bioinformatics-and-deep-sequencing-unit/
 .. _Max Planck Institute for Immunobiology and Epigenetics: http://www3.ie-freiburg.mpg.de
-.. _project site: https://github.com/fidelram/deepTools
+.. _project site: https://github.com/fidelram/deepTools/wiki/
 
     </token>
 
@@ -146,15 +193,19 @@
                 help="The effective genome size is the portion of the genome that is mappable. Large fractions of the genome are stretches of NNNN that should be discarded. 
                     Also, if repetitive regions were not included in the mapping of reads, the effective genome size needs to be adjusted accordingly. 
                     See Table 2 of http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0030377 or http://www.nature.com/nbt/journal/v27/n1/fig_tab/nbt.1518_T1.html for several effective genome sizes.">
-                <option value="2150570000">mm9</option>
-                <option value="2451960000">hg19</option>
-                <option value="121400000">dm3</option>
-                <option value="93260000">ce10</option>
+                <option value="93260000">ce10 (93260000)</option>
+                <option value="121400000">dm3 (121400000)</option>
+                <option value="2451960000" selected="true">hg19 (2451960000)</option>
+                <option value="2150570000">mm9 (2150570000)</option>
                 <option value="specific">user specified</option>
             </param>
             <when value="specific">
                 <param name="effectiveGenomeSize" type="integer" value="" label="Effective genome size" />
             </when>
+            <when value="2150570000" />
+            <when value="2451960000" />
+            <when value="121400000" />
+            <when value="93260000" />
         </conditional>
     </xml>