changeset 40:20f8dafb554f draft

Uploaded
author bgruening
date Mon, 03 Feb 2014 12:38:00 -0500
parents 62786277147a
children 4cc2d806c27e
files bamCompare.xml bamCoverage.xml bamFingerprint.xml bigwigCompare.xml computeGCBias.xml correctGCBias.xml deepTools_macros.xml tool_dependencies.xml
diffstat 8 files changed, 147 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/bamCompare.xml	Sat Feb 01 08:09:18 2014 -0500
+++ b/bamCompare.xml	Mon Feb 03 12:38:00 2014 -0500
@@ -47,15 +47,15 @@
           #end if
       #end if
 
+      #if str(region).strip() != '':
+          --region 'region'
+      #end if
+
       #if $advancedOpt.showAdvancedOpt == "yes":
             #if $advancedOpt.smoothLength:
             --smoothLength '$advancedOpt.smoothLength'
             #end if
 
-            #if str($advancedOpt.region.value) != '':
-                --region '$advancedOpt.region'
-            #end if
-
             $advancedOpt.doNotExtendPairedEnds
             $advancedOpt.ignoreDuplicates
 
@@ -140,6 +140,8 @@
             <option value="bedgraph">bedgraph</option>
         </param>
 
+        <expand macro="region_limit_operation" />
+
         <conditional name="advancedOpt">
             <param name="showAdvancedOpt" type="select" label="Show advanced options" >
                 <option value="no" selected="true">no</option>
@@ -152,10 +154,6 @@
                     label="Smooth values using the following length (in bp)"
                     help ="The smooth length defines a window, larger than the bin size, to average the number of reads. For example, if the bin size is set to 20 bp and the smooth length is set to 60 bp, then, for each bin size the average of it and its left and right neighbors is considered. Any value smaller than the bin size will be ignored and no smoothing will be applied."/>
 
-                <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."/>
--- a/bamCoverage.xml	Sat Feb 01 08:09:18 2014 -0500
+++ b/bamCoverage.xml	Mon Feb 03 12:38:00 2014 -0500
@@ -31,14 +31,15 @@
             --scaleFactor $scaling.scaleFactor
         #end if
 
+        #if str(region).strip() != '':
+            --region 'region'
+        #end if
+
         #if $advancedOpt.showAdvancedOpt == "yes":
             #if $advancedOpt.smoothLength:
                 --smoothLength '$advancedOpt.smoothLength'
             #end if
 
-            #if str($advancedOpt.region.value) != '':
-                --region '$advancedOpt.region'
-            #end if
             $advancedOpt.doNotExtendPairedEnds
             $advancedOpt.ignoreDuplicates
 
@@ -88,6 +89,8 @@
             <option value="bedgraph">bedgraph</option>
         </param>
 
+        <expand macro="region_limit_operation" />
+
         <conditional name="advancedOpt">
             <param name="showAdvancedOpt" type="select" label="Show advanced options" >
                 <option value="no" selected="true">no</option>
@@ -99,10 +102,6 @@
                     label="Smooth values using the following length (in bp)"
                     help ="The smooth length defines a window, larger than the bin size, to average the number of reads. For example, if the bin size is set to 20 bp and the smooth length is set to 60 bp, then, for each bin size the average of it and its left and right neighbors is considered. Any value smaller than the bin size will be ignored and no smoothing will be applied."/>
 
-                <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."/>
--- a/bamFingerprint.xml	Sat Feb 01 08:09:18 2014 -0500
+++ b/bamFingerprint.xml	Mon Feb 03 12:38:00 2014 -0500
@@ -30,12 +30,11 @@
         --plotFileFormat 'png'
       #end if
 
+      #if str(region).strip() != '':
+          --region 'region'
+      #end if
+
       #if $advancedOpt.showAdvancedOpt == "yes":
-        
-        #if str($advancedOpt.region.value) != '':
-          --region '$advancedOpt.region'
-        #end if
-
         --binSize '$advancedOpt.binSize'
         --numberOfSamples '$advancedOpt.numberOfSamples'
 
@@ -54,8 +53,12 @@
     <inputs>
         <expand macro="multiple_input_bams" />
 
+
         <param name="fragmentLength" type="integer" value="200" min="1"
            label="Length of the average fragment size"/>
+
+        <expand macro="region_limit_operation" />
+
         <conditional name="advancedOpt">
             <param name="showAdvancedOpt" type="select" label="Show advanced options" >
                 <option value="no" selected="true">no</option>
@@ -63,10 +66,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="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."/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bigwigCompare.xml	Mon Feb 03 12:38:00 2014 -0500
@@ -0,0 +1,102 @@
+<tool id="deeptools_bigwigCompare" name="bigwigCompare" version="1.0.3">
+    <description>normalizes and compares two bigWig files to obtain the ratio, log2ratio or difference</description>
+    <expand macro="requirements"/>
+    <expand macro="stdio" />
+    <macros>
+        <token name="@BINARY@">bigwigCompare</token>
+        <import>deepTools_macros.xml</import>
+    </macros>
+    <command>
+        bigwigCompare
+
+        @THREADS@
+
+        --bigwig1 '$bigwigFile1'
+        --bigwig2 '$bigwigFile2'
+
+        --outFileName '$outFileName'
+        --outFileFormat '$outFileFormat'
+
+        --ratio $comparison_type
+
+        #if str(region).strip() != '':
+            --region 'region'
+        #end if
+
+        #if $advancedOpt.showAdvancedOpt == "yes":
+
+          --missingDataAsZero $advancedOpt.missingDataAsZero
+          --scaleFactors '$advancedOpt.scaleFactor1:$advancedOpt.scaleFactor2'
+          --pseudocount '$advancedOpt.pseudocount'
+          --binSize $advancedOpt.binSize
+
+        #end if
+    </command>
+    <inputs>
+        <param name="bigwigFile1" format="bigwig" type="data" label="Treatment bigwig file" />
+        <param name="bigwigFile2" format="bigwig" type="data" label="bigWig file" />
+
+        <param name="comparison_type" type="select" 
+                label="How to compare the two files"
+                help="The reciprocal ratio returns the negative of the inverse of the ratio if the ratio is less than 0. The resulting values are interpreted as negative fold changes." >
+            <option value="log2" selected="true">log2 ratio</option>
+            <option value="ratio">simple ratio</option>
+            <option value="subtract">difference (subtract input from treatment)</option>
+            <option value="add">sum</option>
+            <option value="reciprocal_ratio">reciprocal ratio</option>
+        </param>
+
+        <param name="outFileFormat" type="select" label="Coverage file format">
+            <option value="bigwig" selected="true">bigwig</option>
+            <option value="bedgraph">bedgraph</option>
+        </param>
+
+        <expand macro="region_limit_operation" />
+
+        <conditional name="advancedOpt">
+            <param name="showAdvancedOpt" type="select" label="Show advanced options" >
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <param name="binSize" type="integer" value="50" min="1" 
+                    label="Bin size in bp"
+                    help="Size of the bins in bp for the ouput of the bigwig/bedgraph file "/>
+
+                <param name="missingDataAsZero" type="boolean" truevalue="yes" falsevalue="no" checked="True"
+                    label ="Treat missing data as zero"
+                    help  ="This parameter determines if missing data should be replaced with a zero. If set to &quot;no&quot;, missing data will be ignored and will not be included in the output file at all. Missing data is defined as those regions for which no value exists in *any* of the bigwig files. The decision to include or exclude missing data depends on the interpretation of the data. Missing data in a bigwig file may mean that there is no information available for certain regions, for example a repetitive region that is not being considered. In the same file regions with low coverage may get zero read counts. If missing data is replaced by zero, this would convert the excluded repetitive regions into regions of low coverage." />
+
+                <param name="scaleFactor1" type="float" value="1" label="Scale factor for treatment"/>
+                <param name="scaleFactor2" type="float" value="1" label="Scale factor for input"/>
+                <param name="pseudocount" type="float" value="1" label="Pseudocount" help="Small number to avoid dividing by zero."/>
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data format="bigwig" name="outFileName">
+        <change_format>
+            <when input="outFileFormat" value="bigwig" format="bigwig" />
+            <when input="outFileFormat" value="bedgraph" format="bedgraph" />
+        </change_format>
+        </data>
+    </outputs>
+
+  <help>
+
+**What it does**
+
+This tool compares two bigwig files based on the number of mapped reads. To
+compare the bigwig files the genome is partitioned into bins of equal size,
+then the number of reads found in each BAM file are counted for such bins and
+finally a summarizing value is reported. This value can be the ratio of the
+number of reads per bin, the log2 of the ratio, the sum or the difference.
+
+
+-----
+
+@REFERENCES@
+
+    </help>
+</tool>
--- a/computeGCBias.xml	Sat Feb 01 08:09:18 2014 -0500
+++ b/computeGCBias.xml	Mon Feb 03 12:38:00 2014 -0500
@@ -25,10 +25,11 @@
                 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
             #end if
 
+            #if str(region).strip() != '':
+                --region 'region'
+            #end if
+
             #if $advancedOpt.showAdvancedOpt == "yes":
-                #if str($advancedOpt.region.value) != '':
-                    --region '$advancedOpt.region'
-                #end if
 
                 --sampleSize '$advancedOpt.sampleSize'
                 --regionSize '$advancedOpt.regionSize'
@@ -57,6 +58,9 @@
         <param name="fragmentLength" type="integer" value="300" min="1"
             label="Fragment length used for the sequencing"
             help ="If paired-end reads are used, the fragment length is computed from the BAM file."/>
+
+        <expand macro="region_limit_operation" />
+
         <conditional name="advancedOpt">
             <param name="showAdvancedOpt" type="select" label="Show advanced options" >
                 <option value="no" selected="true">no</option>
@@ -64,10 +68,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="sampleSize" type="integer" value="50000000" min="1"
                     label="Number of sampling points to be considered" />
 
--- a/correctGCBias.xml	Sat Feb 01 08:09:18 2014 -0500
+++ b/correctGCBias.xml	Mon Feb 03 12:38:00 2014 -0500
@@ -33,10 +33,11 @@
             --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
         #end if
 
+        #if str(region).strip() != '':
+            --region 'region'
+        #end if
+
         #if $advancedOpt.showAdvancedOpt == "yes":
-            #if str($advancedOpt.region.value) != '':
-                --region '$advancedOpt.region'
-            #end if
             --binSize '$advancedOpt.binSize'  
         #end if
 
@@ -57,6 +58,8 @@
             <option value="bg">bedgraph</option>
         </param>
 
+        <expand macro="region_limit_operation" />
+
         <conditional name="advancedOpt">
             <param name="showAdvancedOpt" type="select" label="Show advanced options" >
                 <option value="no" selected="true">no</option>
@@ -64,10 +67,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="binSize" type="integer" value="50" min="1" 
                     label="Bin size in bp"
                     help="Size of the bins in bp for the ouput of the bigwig/bedgraph file."/>
--- a/deepTools_macros.xml	Sat Feb 01 08:09:18 2014 -0500
+++ b/deepTools_macros.xml	Mon Feb 03 12:38:00 2014 -0500
@@ -1,8 +1,7 @@
 <macros>
     <xml name="bamCorrelate_mode_actions">
-        <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;" />
+
+        <expand macro="region_limit_operation" />
 
         <conditional name="advancedOpt">
             <param name="showAdvancedOpt" type="select" label="Show advanced options" >
@@ -37,6 +36,13 @@
             </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>
@@ -44,7 +50,7 @@
             <requirement type="package" >samtools</requirement>
             <requirement type="package" >deepTools</requirement>
             <requirement type="package" >ucsc_tools</requirement>
-            <requirement type="package" version="1.5.4_b2b025a382f00f05c46cabc16d2cbe90dbb5d63a">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>
--- a/tool_dependencies.xml	Sat Feb 01 08:09:18 2014 -0500
+++ b/tool_dependencies.xml	Mon Feb 03 12:38:00 2014 -0500
@@ -57,7 +57,7 @@
          <readme>The tools downloaded by this dependency definition are free for academic use. TODO: UCSC tools are only available with their latest version. That is not good for reproducibility.</readme>
      </package>
 
-    <package name="deepTools" version="1.5.4_b2b025a382f00f05c46cabc16d2cbe90dbb5d63a">
+    <package name="deepTools" version="1.5.4_1093b2d281576f23ee04740bd5eae3f7b8422f7e">
         <install version="1.0">
             <actions>
                 <action type="shell_command">git clone --recursive https://github.com/fidelram/deepTools.git</action>
@@ -79,7 +79,7 @@
                         <package name="scipy" version="0.12.0" />
                     </repository>
                 </action>
-                <action type="shell_command">git reset --hard b2b025a382f00f05c46cabc16d2cbe90dbb5d63a</action>
+                <action type="shell_command">git reset --hard 1093b2d281576f23ee04740bd5eae3f7b8422f7e</action>
                 <action type="make_directory">$INSTALL_DIR/lib/python</action>
                 <action type="shell_command">
                     export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python &amp;&amp;